SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/usr/bin/python | |
| 2 | # note please download RAW | |
| 3 | ||
| 4 | # wordpress grabber | |
| 5 | ||
| 6 | ''' | |
| 7 | ||
| 8 | 888b d888 .d8888b. | |
| 9 | 8888b d8888 d88P Y88b | |
| 10 | 88888b.d88888 888 888 | |
| 11 | 888Y88888P888 888 | |
| 12 | 888 Y888P 888 888 | |
| 13 | 888 Y8P 888 888 888 | |
| 14 | 888 " 888 Y88b d88P | |
| 15 | 888 888 "Y8888P" | |
| 16 | ||
| 17 | Coded by MatriX Coder from tunisia | |
| 18 | Use my code as you want :D | |
| 19 | ||
| 20 | ''' | |
| 21 | ||
| 22 | import re , urllib2 , sys | |
| 23 | ||
| 24 | logo = ''' | |
| 25 | ||
| 26 | _ ______ | |
| 27 | | | / / __ \ | ----| Wordpress Grabber |---- | |
| 28 | | | /| / / /_/ / | Author : MatriX Coder | |
| 29 | | |/ |/ / ____/ | FB : www.fb.com/matrixcoder2 | |
| 30 | |__/|__/_/ | Blog : www.matrixcoder.co.vu | |
| 31 | ||
| 32 | [*] Usage : python '''+sys.argv[0]+''' 127.0.0.1 | |
| 33 | ''' | |
| 34 | ||
| 35 | # found this code on stackoverflow.com/questions/19278877 | |
| 36 | def unique(seq): | |
| 37 | seen = set() | |
| 38 | return [seen.add(x) or x for x in seq if x not in seen] | |
| 39 | ||
| 40 | print(logo) | |
| 41 | try: | |
| 42 | lista = [] | |
| 43 | s = sys.argv[1] | |
| 44 | page = 1 | |
| 45 | print('\n')
| |
| 46 | while page <= 21: | |
| 47 | bing = "http://www.bing.com/search?q=ip%3A"+s+"+?page_id=&count=50&first="+str(page) | |
| 48 | openbing = urllib2.urlopen(bing) | |
| 49 | readbing = openbing.read() | |
| 50 | findwebs = re.findall('<h2><a href="(.*?)"' , readbing)
| |
| 51 | for i in range(len(findwebs)): | |
| 52 | wpnoclean = findwebs[i] | |
| 53 | findwp = re.findall('(.*?)\?page_id=', wpnoclean)
| |
| 54 | lista.extend(findwp) | |
| 55 | ||
| 56 | page = page + 10 | |
| 57 | ||
| 58 | final = unique(lista) | |
| 59 | for wp in final: | |
| 60 | print(wp) | |
| 61 | ||
| 62 | try: | |
| 63 | for i , l in enumerate(final): | |
| 64 | pass | |
| 65 | print '\nSites Found : ' , i + 1 | |
| 66 | except: | |
| 67 | pass | |
| 68 | ||
| 69 | except IndexError: | |
| 70 | pass |