Skip to content

Instantly share code, notes, and snippets.

@wchen-r7
Created January 26, 2014 18:32
Show Gist options
  • Save wchen-r7/f297c96881f073336208 to your computer and use it in GitHub Desktop.
Save wchen-r7/f297c96881f073336208 to your computer and use it in GitHub Desktop.
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Auxiliary::Scanner
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
'Name' => 'Auxiliary Scanner module test',
'Description' => %q{Say something clever},
'References' =>
[
[ 'URL', 'http://metasploit.com' ],
],
'Author' =>
[
'sinn3r'
],
'License' => MSF_LICENSE,
'DisclosureDate' => "Apr 1 2011"
))
deregister_options('RHOST')
end
def check_host(ip)
vprint_status("Checking IP: #{ip}")
res = send_request_cgi({'uri'=>'/'})
if res
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end
def run_host(ip)
send_request_cgi({'uri'=>'/'})
print_status("You've triggered run_host, and your IP is: #{ip}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment