HashPals / Name-That-Hash

🔗 Don't know what type of hash it is? Name That Hash will name that hash type! 🤖 Identify MD5, SHA256 and 300+ other hashes ☄ Comes with a neat web app 🔥
https://nth.skerritt.blog
GNU General Public License v3.0
1.47k stars 103 forks source link

Add new hash types #61

Open bee-san opened 3 years ago

bee-san commented 3 years ago

Hello! 👋 This issue is perfect for beginners. What you need:

We provide support in Discord http://discord.skerritt.blog

What we want

Each of these is a hash, and for each hash I want you to:

Example

Our database is located here: https://github.com/HashPals/Name-That-Hash/blob/main/name_that_hash/hashes.py

Some regex's match multiple hashes, in that case insert them into the list. Otherwise look here:

https://github.com/HashPals/Name-That-Hash/blob/main/name_that_hash/hashes.py#L112-L121

We have our Regex, and a list of hashes:

    Prototype(
        regex=re.compile(r"^[a-f0-9]{32}(:.+)?$", re.IGNORECASE),
        modes=[
            HashInfo(
                name="MD5",
                hashcat=0,
                john="raw-md5",
                extended=False,
                description="Used for Linux Shadow files.",
            ),
),

You do not need to write a description.

Create a prototype with the Regex you created earlier, or find one which already works for the hash.

Take the name of the hash, the hashcat mode, the john the ripper mode you found earlier and insert it into the DB.

The List

Take some hashes from here and do em! <3

amadejpapez commented 3 years ago

Hi! I was looking at the list, trying to decide which hash types I will add next and I tested one example with NameThatHash and it showed the correct hash type so some more hashes need to be checked on this list.

To get the list of which ones also need to be checked I wrote this. It checks if the name from the list is already in the database and if it is already checked in the list. :D

import re
import requests

page = requests.get("https://github.com/HashPals/Name-That-Hash/issues/61").text
database = requests.get("https://raw.githubusercontent.com/HashPals/Name-That-Hash/main/name_that_hash/hashes.py").text
hashes = re.findall(r"li(.*)<\/li>", page)
needToBeChecked = []

for Hash in hashes:
    hashname = re.findall(r"hash-name:<\/strong>\s([^<]+)", Hash)
    if hashname != []:
        hashname = hashname[0].strip()
        if f'name="{hashname}"' in database and 'checked=""' not in Hash:
            needToBeChecked.append(hashname)

print(f"How many more need to be checked: {len(needToBeChecked)}")
print(f"Which ones: {needToBeChecked}")