This commit is contained in:
Lily Tsuru 2023-08-21 21:47:39 -04:00
parent 3176c53629
commit cce929ec66
1 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ namespace {
unsigned ln = 1; unsigned ln = 1;
auto Color(int n, const std::string& s) { auto Color(int n, const std::string& s) {
return "\33[38;5;" + std::to_string(n) + 'm' + s + "\33[m"; return std::format("\33[38;5;{}m{}\33[m", n, s);
} }
auto Line(int l) { auto Line(int l) {
@ -90,8 +90,8 @@ struct BruteThreadState {
} }
void BruteForce(char prefix) { void BruteForce(char prefix) {
for(std::uint32_t i = 2; i < code_length; ++i) { //for(std::uint32_t i = 8; i <= code_length; ++i) {
std::string test_buffer(i, 'a'); std::string test_buffer(code_length, 'a');
test_buffer[0] = prefix; test_buffer[0] = prefix;
// test all possible combinations // test all possible combinations
@ -106,7 +106,7 @@ struct BruteThreadState {
if(!NextCode(test_buffer, 1)) if(!NextCode(test_buffer, 1))
break; break;
} }
} //}
} }
private: private: