-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix scr hash, give better names to hashutils functions, pad using 0 v…
…m names, enable anim in cer
- Loading branch information
Showing
11 changed files
with
78 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include <includes.hpp> | ||
|
||
|
||
namespace { | ||
|
||
int hashsearcher(Process& proc, int argc, const char* argv[]) { | ||
if (argc < 4) { | ||
return tool::BAD_USAGE; | ||
} | ||
|
||
std::unordered_set<uint64_t> hashes{}; | ||
|
||
{ | ||
std::ifstream input{ argv[2] }; | ||
if (!input) { | ||
LOG_ERROR("Can't open {}", argv[2]); | ||
return tool::BASIC_ERROR; | ||
} | ||
utils::CloseEnd ci{ [&input] { input.close(); } }; | ||
|
||
std::string line{}; | ||
|
||
while (input && std::getline(input, line, '\n')) { | ||
if (line.empty()) continue; | ||
try { | ||
hashes.insert(std::strtoull(line.c_str(), nullptr, 16)); | ||
} | ||
catch (std::exception&) {} | ||
} | ||
} | ||
LOG_INFO("Loaded {} hash(es)", hashes.size()); | ||
|
||
|
||
|
||
return tool::OK; | ||
} | ||
|
||
ADD_TOOL("hashsearcher", "hash", " [file] [output]", "search in hash file", nullptr, hashsearcher); | ||
|
||
} |