pow¶
pow contains highly efficient solvers for every common ctf proof-of-work system:
- an incredibly fast solver likely implemended in rust or cuda
- a slow but pure-python solver to be used as a fallback
we currently support the following proof-of-works:
if this library is missing a common proof-of-work i'm unaware of, feel free to make an issue or pr!
API¶
detect_and_solve(data: bytes | str) -> bytes | None¶
given a dump of data bytes, scan for a known POW challenge, solve it, and return the correct response
do_pow(p: tube) -> tube¶
wrap this around a pwntools tube object to automatically solve the proof of work. it returns the tube object passed, so you can write something like this: