Update the use of get2() in order to support ruby 1.9.3

unstable
sinn3r 2012-04-20 01:37:24 -05:00
parent 6d0e4fba5e
commit b955569b10
3 changed files with 10 additions and 10 deletions

View File

@ -54,8 +54,8 @@ class Metasploit3 < Msf::Auxiliary
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("www.google.com")
searches = ["100", "200","300", "400", "500"]
searches.each { |num|
resp, data = clnt.get2("/search?hl=en&lr=&ie=UTF-8&q=%40"+targetdom+"&start=#{num}&sa=N&filter=0&num=100",header)
response << data
resp = clnt.get2("/search?hl=en&lr=&ie=UTF-8&q=%40"+targetdom+"&start=#{num}&sa=N&filter=0&num=100",header)
response << resp.body
}
print_status("Extracting emails from Google search results...")
response.gsub!(/<.?em?[>]*>/, "")
@ -74,8 +74,8 @@ class Metasploit3 < Msf::Auxiliary
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("search.yahoo.com")
searches = ["1", "101","201", "301", "401", "501"]
searches.each { |num|
resp, data = clnt.get2("/search?p=%40#{targetdom}&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vd=all&vst=0&vf=all&vm=p&fl=0&fr=yfp-t-152&xargs=0&pstart=1&b=#{num}",header)
response << data.downcase
resp = clnt.get2("/search?p=%40#{targetdom}&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vd=all&vst=0&vf=all&vm=p&fl=0&fr=yfp-t-152&xargs=0&pstart=1&b=#{num}",header)
response << resp.body
}
print_status("Extracting emails from Yahoo search results...")
@ -96,8 +96,8 @@ class Metasploit3 < Msf::Auxiliary
searches = 1
while searches < 201
begin
resp, data = clnt.get2("/search?q=%40#{targetdom}&first=#{searches.to_s}",header)
response << data
resp = clnt.get2("/search?q=%40#{targetdom}&first=#{searches.to_s}",header)
response << resp.body
rescue
end
searches = searches + 10

View File

@ -49,8 +49,8 @@ class Metasploit3 < Msf::Auxiliary
print_status("Page number: " + pagenum.to_s)
header = { 'User-Agent' => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/4.0.221.6 Safari/525.13"}
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("www.delicious.com")
resp, data = clnt.get2("/search?p=site%3A"+targetdom+"&page="+pagenum.to_s,header)
response << data
resp = clnt.get2("/search?p=site%3A"+targetdom+"&page="+pagenum.to_s,header)
response << resp.body
response.each_line do |line|
list << line.gsub!(/(.+<a rel=\"nofollow)(.+=+\")(.+)(\".+)/, '\3')
end

View File

@ -46,8 +46,8 @@ class Metasploit3 < Msf::Auxiliary
pages = []
header = { 'User-Agent' => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/4.0.221.6 Safari/525.13"}
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("wayback.archive.org")
resp, data = clnt.get2("/web/*/http://"+targetdom+"/*",header)
response << data
resp = clnt.get2("/web/*/http://"+targetdom+"/*",header)
response << resp.body
response.each_line do |line|
pages << line.gsub!(/(.+>)(.+)(<\/a>)\n/, '\2')
end