0

Basically, I want to crack hashes programatically using hashcat python without having to install hashcat binaries.

Python seem to have a module called hashcat (https://pypi.org/project/hashcat/) but I couldn't find any documentation on the web for how to use it.

Does anyone know how to crack hashes using python?

  • 2
    I'm pretty sure that there isn't a pure Python solution to this because it would be abysmally slow, so you're going to need some sort of C or other compiled code to do this, which probably means that the hashcat binares will be necessary. – bk2204 Dec 06 '20 at 02:11
  • You basically want to reinvent the wheel – yeah_well Dec 06 '20 at 11:18

2 Answers2

0

If you want to use hashcat (or the package you linked to that simply wraps hashcat), you will need to install or build the hashcat binaries.

Otherwise, you would likely need to look for another password-cracking library, or implement it yourself. However, you will not achieve the performance of hashcat by using Python.

multithr3at3d
  • 12,355
  • 3
  • 29
  • 42
0

I want to use hashcat, but I don't want to use the hashcat binaries.

This isn't how this works. First of all, let's have a look at the project documentation you linked to:

Little wrapper around hashcat so it can be installed via pip. Attempts to also correctly determine which binary you should run and adds hashcat to your path.

As you see, the point of this project is to allow you to install hashcat via pip. If you have a look at the files this project downloads, it's simply the hashcat binary, as well as a file called cli.py, which does a handful of things:

  1. Figure out which version of the hashcat executable to run.
  2. Turn all relative paths into absolute paths (due to this issue)
  3. Pass all command-line arguments to hashcat and run it.

As you can see, this doesn't implement hashcat's functionality in Python - why would it? Hashcat doesn't become better by being re-implemented in different languages.