Bonnie39 / tominecon.7z-cracker

an attempt at cracking the code to tominecon.7z
GNU General Public License v3.0
12 stars 2 forks source link

Completely broken, at a certain point. #8

Open TediusTimmy opened 4 months ago

TediusTimmy commented 4 months ago

Let's start here: https://github.com/Bonnie39/tominecon.7z-cracker/blob/48eabd849c31f4c12f0fd83baa87ba21db4417f8/tominecon_cracker.cpp#L65 I don't have an M$ compiler, but this ought to be giving you a warning that this comparison is always false. The variable startIndex is an int: ints are 4 bytes in LLP64 and default to signed, which means that the range of this variable is -2147483648 to 2147483647. Observe that this number has ten digits, and that you are trying to fill out a sixteen digit number with it. The startIndex variable will overflow and wrap around to negative before you test the full range you are looking at. The startIndex variable should be an int64_t type. You'll need to #include <cstdint>. Also, give that constant an ll suffix: modern C++ may pick the right type, but I would be wary of the compiler trying to mash that constant into a long.

Though, right now I'm getting .8 passwords per second (WSL), so this doesn't have long-term viability.