Skip to main content

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

Release files for ez2bruteforce 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ez2bruteforce 0.0.2
File Size Uploaded
ez2bruteforce-0.0.2.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ez2bruteforce 0.0.2
File Interpreter ABI Platform
ez2bruteforce-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size:18.6 kB

Release files / ez2bruteforce-0.0.2.tar.gz

Download URL ez2bruteforce-0.0.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e35a7f4d6073cbe9d8b0c60962bd69c36f8fbc1a792cea5e5baf6906657f217a
BLAKE2b-256 checksum
How to use checksums
5b0f1cf07a57ac0fda1c488b221ee8d41346d66fcc68b13bbf78b702d24a9603
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ez2bruteforce-0.0.2-py3-none-any.whl

Download URL ez2bruteforce-0.0.2-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e23bd02ceb6f40b29a569e8eb9f771164375f729e9f8c06069c3849eea324212
BLAKE2b-256 checksum
How to use checksums
0404a926211b6b6902b2a842e34069105fff5a7c7b563587f1bb5c80ee5306d0
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page