Class: Lacewing::Cli
- Inherits:
-
Object
- Object
- Lacewing::Cli
- Defined in:
- lib/lacewing/cli.rb
Class Method Summary collapse
Class Method Details
.exploit_menu ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lacewing/cli.rb', line 28 def self. opts = ['LFI', 'RCE', 'XSS', 'Code Injection', 'Reverse Shell', 'SQL Injection'] opt = $prompt.select(Lacewing::PROMPT + 'What vulnerability would you like to use?', opts) case opt when 'LFI' Lacewing::Exploits.lfi when 'RCE' Lacewing::Exploits.rce when 'XSS' Lacewing::Exploits.xss when 'Code Injection' Lacewing::Exploits.code_injection when 'Reverse Shell' Lacewing::Exploits.reverse_shell when 'SQL Injection' Lacewing::Exploits.sqli end end |
.narrow? ⇒ Boolean
23 24 25 26 |
# File 'lib/lacewing/cli.rb', line 23 def self.narrow? narrow = $prompt.yes?('Would you like to change your target to a subdomain?') $target = $prompt.ask("What's your new target? (*.#{$target})") if narrow end |
.show_hello(opts) ⇒ Object
17 18 19 20 21 |
# File 'lib/lacewing/cli.rb', line 17 def self.show_hello(opts) puts Lacewing::PROMPT + "Hi there #{opts[:name] || ENV['USERNAME']}!" $target = opts[:target] || $prompt.ask('What website would you like to research? ') puts "Using #{$target.green} as a target." end |
.start(opts = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lacewing/cli.rb', line 5 def self.start(opts = {}) puts opts $prompt = TTY::Prompt.new Lacewing::Cli.show_hello(opts) Lacewing::Scans.subdomains unless opts[:no_subdomains] Lacewing::Cli.narrow? Lacewing::Scans.nmap unless opts[:no_nmap] loop do Lacewing::Cli. end end |