File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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 \t python 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 ()
You can’t perform that action at this time.
0 commit comments