You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/cmd/root.go
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,13 @@ import (
19
19
varrunAnyExploitbool
20
20
varexploitNamestring
21
21
varpromptForPasswordbool
22
+
varskipExploits []string
22
23
23
24
funcinit() {
24
25
rootCmd.PersistentFlags().BoolVarP(&runAnyExploit, "any", "a", runAnyExploit, "Attempt to exploit a vulnerability as soon as it is detected. Provides a shell where possible.")
25
26
rootCmd.PersistentFlags().BoolVarP(&promptForPassword, "with-password", "p", promptForPassword, "Prompt for the user password, if you know it. Can provide more GTFOBins possibilities via sudo.")
26
27
rootCmd.PersistentFlags().StringVarP(&exploitName, "exploit", "e", exploitName, "Run the specified exploit, if the system is found to be vulnerable. Provides a shell where possible.")
28
+
rootCmd.PersistentFlags().StringSliceVarP(&skipExploits, "skip", "s", skipExploits, "Exploit(s) to skip - specify multiple times to skip multiple exploits.")
27
29
}
28
30
29
31
varrootCmd=&cobra.Command{
@@ -59,6 +61,9 @@ var rootCmd = &cobra.Command{
59
61
varfoundbool
60
62
varvulnFoundbool
61
63
for_, exploit:=rangeallExploits {
64
+
ifshouldSkip(exploit.Name) {
65
+
continue
66
+
}
62
67
ifexploitName==""||exploitName==exploit.Name {
63
68
found=true
64
69
exploitLogger:=baseLog.WithTitle(exploit.Name)
@@ -100,6 +105,15 @@ var rootCmd = &cobra.Command{
0 commit comments