Fix enum_wayback using CDX API
parent
bd286c415c
commit
c12056d242
|
@ -37,11 +37,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
response = ""
|
||||
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 = clnt.get2("/web/*/http://"+targetdom+"/*",header)
|
||||
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("web.archive.org")
|
||||
resp = clnt.get2("/cdx/search/cdx?url="+Rex::Text.uri_encode("#{targetdom}/*")+"&fl=original",header)
|
||||
response << resp.body
|
||||
response.each_line do |line|
|
||||
pages << line.gsub!(/(.+>)(.+)(<\/a>)\n/, '\2')
|
||||
pages << line.strip
|
||||
end
|
||||
|
||||
pages.delete_if{|x| x==nil}
|
||||
|
@ -49,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
pages.sort!
|
||||
|
||||
for i in (0..(pages.count-1))
|
||||
fix = "http://" + pages[i].to_s
|
||||
fix = pages[i].to_s.sub(':80', '')
|
||||
pages[i] = fix
|
||||
end
|
||||
return pages
|
||||
|
|
Loading…
Reference in New Issue