Skip to main content

package to solve POW(proof of work) with no pain

Project description

ez2bruteforce codecov

ez2bruteforce is a python package that allows you to bruteforce the POW(proof of the work) stage in CTF game. You can specify the char table, bruteforce length and the position and then use bruteforce to crack its hash digtest.

pypi home page:https://pypi.org/project/ez2bruteforce/

Example

If you have known the hash of the digtest, like this:

import hashlib
cipher = hashlib.sha1(b"Dear XXX:")
# cipher = b"\xf0\x1d\xb9\xe9|Xh\x84\xdb\r\xb0'\xa7\x80\xdc\x07\xbc\xca_`"

Then you can use ez2bruteforce to crack it. BfItem(3, string.ascii_letters) means the bruteforce length is 3, and the char table is " all ascii letter. sha1_solver(problem,cipher) will return the original string if the hash is correct.

from ez2bruteforce import BfItem,Problem,sha1_solver
import string
cipher = b"\xf0\x1d\xb9\xe9|Xh\x84\xdb\r\xb0'\xa7\x80\xdc\x07\xbc\xca_`"
problem = Problem(["Dear ",BfItem(3,string.ascii_letters),":"])
result = sha1_solver(problem,cipher)
# result = b'Dear abc:'

Also, you can pass your own hash function into the generic_solver.

from ez2bruteforce import BfItem,Problem,generic_solver
from base64 import b64decode,b64encode
cipher = b64encode(b'abc')
problem = Problem([BfItem(3,"abcdefg")])
result = generic_solver(problem,cipher,b64encode)
# result = b'abc'

TODO

  • tpye-stub support
  • Muti-threading support
  • Add import * support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ez2bruteforce-0.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

ez2bruteforce-0.0.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file ez2bruteforce-0.0.2.tar.gz.

File metadata

  • Download URL: ez2bruteforce-0.0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for ez2bruteforce-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e35a7f4d6073cbe9d8b0c60962bd69c36f8fbc1a792cea5e5baf6906657f217a
MD5 ff0d6f83a1fa0ae2299b6d41648a390b
BLAKE2b-256 5b0f1cf07a57ac0fda1c488b221ee8d41346d66fcc68b13bbf78b702d24a9603

See more details on using hashes here.

File details

Details for the file ez2bruteforce-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ez2bruteforce-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for ez2bruteforce-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e23bd02ceb6f40b29a569e8eb9f771164375f729e9f8c06069c3849eea324212
MD5 ef6d8fe9aca0e1d2aa5d20b0bc26f2a7
BLAKE2b-256 0404a926211b6b6902b2a842e34069105fff5a7c7b563587f1bb5c80ee5306d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page