Skip to content

Instantly share code, notes, and snippets.

@notmike101
Last active November 10, 2015 19:50
Show Gist options
  • Save notmike101/e111b99665f6297078ef to your computer and use it in GitHub Desktop.
Save notmike101/e111b99665f6297078ef to your computer and use it in GitHub Desktop.
#!/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