Update the use of get2() in order to support ruby 1.9.3
parent
6d0e4fba5e
commit
b955569b10
|
@ -54,8 +54,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("www.google.com")
|
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("www.google.com")
|
||||||
searches = ["100", "200","300", "400", "500"]
|
searches = ["100", "200","300", "400", "500"]
|
||||||
searches.each { |num|
|
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)
|
resp = clnt.get2("/search?hl=en&lr=&ie=UTF-8&q=%40"+targetdom+"&start=#{num}&sa=N&filter=0&num=100",header)
|
||||||
response << data
|
response << resp.body
|
||||||
}
|
}
|
||||||
print_status("Extracting emails from Google search results...")
|
print_status("Extracting emails from Google search results...")
|
||||||
response.gsub!(/<.?em?[>]*>/, "")
|
response.gsub!(/<.?em?[>]*>/, "")
|
||||||
|
@ -74,8 +74,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("search.yahoo.com")
|
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("search.yahoo.com")
|
||||||
searches = ["1", "101","201", "301", "401", "501"]
|
searches = ["1", "101","201", "301", "401", "501"]
|
||||||
searches.each { |num|
|
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)
|
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 << data.downcase
|
response << resp.body
|
||||||
|
|
||||||
}
|
}
|
||||||
print_status("Extracting emails from Yahoo search results...")
|
print_status("Extracting emails from Yahoo search results...")
|
||||||
|
@ -96,8 +96,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
searches = 1
|
searches = 1
|
||||||
while searches < 201
|
while searches < 201
|
||||||
begin
|
begin
|
||||||
resp, data = clnt.get2("/search?q=%40#{targetdom}&first=#{searches.to_s}",header)
|
resp = clnt.get2("/search?q=%40#{targetdom}&first=#{searches.to_s}",header)
|
||||||
response << data
|
response << resp.body
|
||||||
rescue
|
rescue
|
||||||
end
|
end
|
||||||
searches = searches + 10
|
searches = searches + 10
|
||||||
|
|
|
@ -49,8 +49,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
print_status("Page number: " + pagenum.to_s)
|
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"}
|
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")
|
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)
|
resp = clnt.get2("/search?p=site%3A"+targetdom+"&page="+pagenum.to_s,header)
|
||||||
response << data
|
response << resp.body
|
||||||
response.each_line do |line|
|
response.each_line do |line|
|
||||||
list << line.gsub!(/(.+<a rel=\"nofollow)(.+=+\")(.+)(\".+)/, '\3')
|
list << line.gsub!(/(.+<a rel=\"nofollow)(.+=+\")(.+)(\".+)/, '\3')
|
||||||
end
|
end
|
||||||
|
|
|
@ -46,8 +46,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
pages = []
|
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"}
|
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")
|
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("wayback.archive.org")
|
||||||
resp, data = clnt.get2("/web/*/http://"+targetdom+"/*",header)
|
resp = clnt.get2("/web/*/http://"+targetdom+"/*",header)
|
||||||
response << data
|
response << resp.body
|
||||||
response.each_line do |line|
|
response.each_line do |line|
|
||||||
pages << line.gsub!(/(.+>)(.+)(<\/a>)\n/, '\2')
|
pages << line.gsub!(/(.+>)(.+)(<\/a>)\n/, '\2')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue