Skip to content

Commit

Permalink
Recognize arbitrary long hashes (fixes #179)
Browse files Browse the repository at this point in the history
  • Loading branch information
namazso committed Jul 16, 2023
1 parent e8c2944 commit 65fce09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenHashTab/utl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static NTSTATUS load_string(
}

std::vector<uint8_t> utl::FindHashInString(std::wstring_view wv) {
static auto regex = ctre::search<LR"(\b(?:[0-9a-f]{2})(?: ?+[0-9a-f]{2}){3,31}+\b|\b(?:[0-9A-F]{2})(?: ?+[0-9A-F]{2}){3,31}+\b)">;
static auto regex = ctre::search<LR"(\b(?:[0-9a-f]{2})(?: ?+[0-9a-f]{2}){3,}+\b|\b(?:[0-9A-F]{2})(?: ?+[0-9A-F]{2}){3,}+\b)">;

if (auto whole = regex(wv); whole)
return HashStringToBytes(std::wstring_view{std::wstring(whole)});
Expand Down

0 comments on commit 65fce09

Please sign in to comment.