Skip to content

Instantly share code, notes, and snippets.

@elreydetoda
Created June 24, 2022 13:32
Show Gist options
  • Save elreydetoda/cf0537cdb7198c866076b2fa99871f9f to your computer and use it in GitHub Desktop.
Save elreydetoda/cf0537cdb7198c866076b2fa99871f9f to your computer and use it in GitHub Desktop.
python script to quickly get all the sample hashes from hashcat's website, and print them out
#!/usr/bin/env python3
# pip(env) install beautifulsoup4
from urllib.request import urlopen
from bs4 import BeautifulSoup
url = 'https://hashcat.net/wiki/doku.php?id=example_hashes'
soup = BeautifulSoup(urlopen(url).read(), features="html.parser")
filters = {
'hashcat', # plaintext password (what all the hashes equal)
'tbd', # shorthand for to be determined
'n/a' # not applicable
}
for i in soup.find_all('td', class_='col2'):
hash = i.get_text().strip()
if (hash.lower() not in filters) and not hash.startswith('https://'): # there are links for some hashes, excluding those
print(hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment