Skip to content

Commit b8e0e6d

Browse files
authored
Add files via upload
1 parent 869a733 commit b8e0e6d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

waybackmachine.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env python
2+
3+
import requests, sys
4+
5+
class wayback():
6+
def __init__(self, url, limit):
7+
self.url = "https://web.archive.org/cdx/search?url="+url+"&matchType=prefix&collapse=urlkey&output=text&fl=original&\
8+
filter=&limit="+str(limit)
9+
10+
def get(self):
11+
headers = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/68.0"}
12+
r = requests.get(self.url, headers=headers)
13+
results = r.text
14+
return results
15+
16+
17+
def main():
18+
if len(sys.argv) < 3:
19+
print("[+] Usage:\n\tpython wayback.py <example.com> <limit number>")
20+
exit(0)
21+
22+
url = sys.argv[1]
23+
limit = sys.argv[2]
24+
25+
get = wayback(url, limit)
26+
res = get.get()
27+
28+
for i in res.split():
29+
print(i)
30+
31+
if __name__=='__main__':
32+
main()

0 commit comments

Comments
 (0)