Skip to content

Commit c12056d

Browse files
committed
Fix enum_wayback using CDX API
1 parent bd286c4 commit c12056d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/auxiliary/scanner/http/enum_wayback.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ def pull_urls(targetdom)
3737
response = ""
3838
pages = []
3939
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"}
40-
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("wayback.archive.org")
41-
resp = clnt.get2("/web/*/http://"+targetdom+"/*",header)
40+
clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("web.archive.org")
41+
resp = clnt.get2("/cdx/search/cdx?url="+Rex::Text.uri_encode("#{targetdom}/*")+"&fl=original",header)
4242
response << resp.body
4343
response.each_line do |line|
44-
pages << line.gsub!(/(.+>)(.+)(<\/a>)\n/, '\2')
44+
pages << line.strip
4545
end
4646

4747
pages.delete_if{|x| x==nil}
4848
pages.uniq!
4949
pages.sort!
5050

5151
for i in (0..(pages.count-1))
52-
fix = "http://" + pages[i].to_s
52+
fix = pages[i].to_s.sub(':80', '')
5353
pages[i] = fix
5454
end
5555
return pages

0 commit comments

Comments
 (0)