| skipped 19 lines |
20 | 20 | | fmt.Println(h) |
21 | 21 | | } |
22 | 22 | | |
23 | | - | func ScanUsage() string { |
| 23 | + | func ScanExmaples() string { |
24 | 24 | | h := color.HiCyanString("Example Scan Commands:") |
25 | | - | h += ` |
26 | | - | ## Start a simple scan with default 'general' flow |
27 | | - | osmedeus scan -t sample.com |
| 25 | + | h += color.HiBlueString("\n ## Start a simple scan with default 'general' flow\n") |
| 26 | + | h += " osmedeus scan -t sample.com\n" |
28 | 27 | | |
29 | | - | ## Start a scan directly with a module with inputs as a list of http domains like this https://sub.example.com |
30 | | - | osmedeus scan -m ~/osmedeus-base/workflow/direct-module/dirbscan.yaml -t http-file.txt |
| 28 | + | h += color.HiBlueString("\n ## Start a general scan but exclude some of the module\n") |
| 29 | + | h += " osmedeus scan -t sample.com -x screenshot -x spider\n" |
31 | 30 | | |
32 | | - | ## Start a general scan but exclude some of the module |
33 | | - | osmedeus scan -t sample.com -x screenshot -x spider |
| 31 | + | h += color.HiBlueString("\n ## Start a scan directly with a module with inputs as a list of http domains like this https://sub.example.com\n") |
| 32 | + | h += " osmedeus scan -m content-discovery -t http-file.txt\n" |
| 33 | + | |
| 34 | + | h += color.HiBlueString("\n ## Initiate the scan using a speed option other than the default setting\n") |
| 35 | + | h += " osmedeus scan -f vuln --tactic gently -t sample.com\n" |
| 36 | + | h += " osmedeus scan --threads-hold=10 -t sample.com\n" |
| 37 | + | |
| 38 | + | h += color.HiBlueString("\n ## Start a simple scan with other flow\n") |
| 39 | + | h += " osmedeus scan -f vuln -t sample.com\n" |
| 40 | + | h += " osmedeus scan -f extensive -t sample.com -t another.com\n" |
| 41 | + | h += " osmedeus scan -f urls -t list-of-urls.txt\n" |
34 | 42 | | |
35 | | - | ## Initiate the scan using a speed option other than the default setting. |
36 | | - | osmedeus scan -f vuln --tactic gently -t sample.com |
37 | | - | osmedeus scan --threads-hold=10 -t sample.com |
| 43 | + | h += color.HiBlueString("\n ## Scan list of targets\n") |
| 44 | + | h += " osmedeus scan -T list_of_targets.txt\n" |
| 45 | + | h += " osmedeus scan -f vuln -T list-of-targets.txt\n" |
38 | 46 | | |
39 | | - | ## Start a simple scan with other flow |
40 | | - | osmedeus scan -f vuln -t sample.com |
41 | | - | osmedeus scan -f extensive -t sample.com -t another.com |
| 47 | + | h += color.HiBlueString("\n ## Performing static vulnerability scan and secret scan on a git repo\n") |
| 48 | + | h += " osmedeus scan -m repo-scan -t https://github.com/j3ssie/sample-repo\n" |
| 49 | + | h += " osmedeus scan -m repo-scan -T list-of-repo.txt\n" |
42 | 50 | | |
43 | | - | ## Scan list of targets |
44 | | - | osmedeus scan -T list_of_targets.txt |
| 51 | + | h += color.HiBlueString("\n ## Scan for CIDR with file contains CIDR with the format '1.2.3.4/24'\n") |
| 52 | + | h += " osmedeus scan -f cidr -t list-of-ciders.txt\n" |
| 53 | + | h += " osmedeus scan -f cidr -t '1.2.3.4/24' # this will auto convert the single input to the file and run\n" |
45 | 54 | | |
46 | | - | ## Scan for CIDR with file contains CIDR with the format '1.2.3.4/24' |
47 | | - | osmedeus scan -f cidr -t list-of-ciders.txt |
48 | | - | osmedeus scan -f cidr -t '1.2.3.4/24' # this will auto convert the single input to the file and run |
| 55 | + | h += color.HiBlueString("\n ## Directly run on vuln scan and directory scan on list of domains\n") |
| 56 | + | h += " osmedeus scan -f domains -t list-of-domains.txt\n" |
| 57 | + | h += " osmedeus scan -f vuln-and-dirb -t list-of-domains.txt\n" |
49 | 58 | | |
50 | | - | ## Directly run on vuln scan and directory scan on list of domains |
51 | | - | osmedeus scan -f vuln-and-dirb -t list-of-domains.txt |
| 59 | + | h += color.HiBlueString("\n ## Use a custom wordlist\n") |
| 60 | + | h += " osmedeus scan -t sample.com -p 'wordlists={{Data}}/wordlists/content/big.txt'\n" |
52 | 61 | | |
53 | | - | ## Use a custom wordlist |
54 | | - | osmedeus scan -t sample.com -p 'wordlists={{Data}}/wordlists/content/big.txt' |
| 62 | + | h += color.HiBlueString("\n ## Use a custom wordlist\n") |
| 63 | + | h += " cat list_of_targets.txt | osmedeus scan -c 2\n" |
55 | 64 | | |
56 | | - | ## Get target from a stdin and start the scan with 2 concurrency |
57 | | - | cat list_of_targets.txt | osmedeus scan -c 2 |
| 65 | + | h += color.HiBlueString("\n ## Start a normal scan and backup entire workflow folder to the backup folder\n") |
| 66 | + | h += " osmedeus scan --backup -f domains -t list-of-subdomains.txt\n" |
58 | 67 | | |
59 | | - | ## Start the scan with your custom workflow folder |
60 | | - | osmedeus scan --wfFolder ~/custom-workflow/ -f your-custom-workflow -t sample.com |
| 68 | + | h += color.HiBlueString("\n ## Start the scan with chunk inputs to review the output way more much faster\n") |
| 69 | + | h += " osmedeus scan --chunk --chunk-parts 20 -f cidr -t list-of-100-cidr.txt\n" |
61 | 70 | | |
62 | | - | ## Start a normal scan and backup entire workflow folder to the backup folder |
63 | | - | osmedeus scan --backup -f domains -t list-of-subdomains.txt |
| 71 | + | h += color.HiBlueString("\n ## Continuously run the scan on a target right after it finished\n") |
| 72 | + | h += " osmedeus utils cron --for --cmd 'osmedeus scan -t example.com'\n" |
64 | 73 | | |
65 | | - | ## Start the scan with chunk inputs to review the output way more much faster |
66 | | - | osmedeus scan --chunk --chunk-parts 20 -f cidr -t list-of-100-cidr.txt |
| 74 | + | h += "\n" |
| 75 | + | return h |
| 76 | + | } |
67 | 77 | | |
68 | | - | ## Continuously run the scan on a target right after it finished |
69 | | - | osmedeus utils cron --for --cmd 'osmedeus scan -t example.com' |
70 | | - | ` |
| 78 | + | func ScanUsage() string { |
| 79 | + | h := ScanExmaples() |
71 | 80 | | h += color.HiCyanString("\nScan Usage:\n") |
72 | 81 | | h += " osmedeus scan -f [flowName] -t [target] \n" |
73 | 82 | | h += " osmedeus scan -m [modulePath] -T [targetsFile] \n" |
| skipped 165 lines |
239 | 248 | | if options.FullHelp { |
240 | 249 | | fmt.Println(cmd.UsageString()) |
241 | 250 | | } |
242 | | - | h := ServerUsage() |
| 251 | + | h := UtilsUsage() |
243 | 252 | | fmt.Println(h) |
244 | 253 | | printDocs(cmd) |
245 | 254 | | } |
| skipped 33 lines |