class Lacewing::Cli

Public Class Methods

exploit_menu() click to toggle source
# File lib/lacewing/cli.rb, line 28
def self.exploit_menu
  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?() click to toggle source
# 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) click to toggle source
# 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 = {}) click to toggle source
# 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.exploit_menu
  end
end