Last active
November 10, 2015 19:50
-
-
Save notmike101/e111b99665f6297078ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import re | |
import sys | |
fdurl = urllib2.urlopen('http://hashkiller.co.uk') | |
soup = BeautifulSoup(fdurl.read()) | |
for row in soup.find_all("div", class_="table"): | |
md5Hash = "" | |
value = "" | |
i = 0 | |
j = 1 | |
skip = False | |
for div in row.find_all(): | |
if skip != True: | |
if i == 3: | |
if div.string != "MD5": | |
skip = True | |
if i == 1: | |
if div.string == "Hash": | |
skip = True | |
if i == 2: | |
md5Hash = div.string.encode() | |
if i == 4: | |
value = div.string.encode() | |
if i == 6: | |
i = 0 | |
if skip == False: | |
print md5Hash + " - " + value | |
else: | |
skip = False | |
else: | |
i += 1 | |
fdurl.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment