Skip to content

Instantly share code, notes, and snippets.

@rastating
Created February 15, 2015 10:23
Show Gist options
  • Save rastating/23d6c2128b32a196485e to your computer and use it in GitHub Desktop.
Save rastating/23d6c2128b32a196485e to your computer and use it in GitHub Desktop.
##
# This module requires Metasploit: http://www.metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'csv'
class Metasploit3 < Msf::Auxiliary
include Msf::HTTP::Wordpress
def initialize(info = {})
super(update_info(
info,
'Name' => 'CSV Test',
'Description' => '',
'License' => MSF_LICENSE,
'Author' =>
[
'Rob Carr <rob[at]rastating.com>' # Metasploit module
]
))
end
def run
res = send_request_cgi(
'method' => 'GET',
'url' => 'http://static.rastating.com/msf/export.php'
)
fail_with(Failure::Unreachable, 'No response from the target') if res.nil?
fail_with(Failure::UnexpectedReply, "Server responses with status code #{res.code}") if res.code != 200
print_status("#{peer} - received #{res.body} from server")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment