![]() |
[C++] PatternFind
Hello everyone,
For x64_dbg I created a pattern finder that supports nibble wildcards (FF D? for example). Here is a standalone version of this pattern finder, feel free to use it wherever you like, credit (link to http://x64dbg.com) is appreciated, but not required. Example of usage: Code:
#include "patternfind.h"Greetings, Mr. eXoDia |
mudlord asked me to update this to include a pattern search & replace engine.
Example of full usage: Code:
#include "patternfind.h"Code:
found: main+00000026Greetings, Mr. eXoDia |
Hi eXoDia,
Your find pattern have a wrong situation. Example, we have pattern to find "C1 F8 02 33 C9 BA", and in file we have these byte "C1 C1 F8 02 33 C9 BA", then your code will not return the offset. Quote:
|
My fix code:
if(patternmatchbyte(data[i], &searchpattern.at(pos))) //check if our pattern matches the current byte { pos++; if(pos==searchpatternsize) //everything matched return i-searchpatternsize+1; } else if (pos>0) { i-=pos; // return to prev pos=0; //reset current pattern position } |
Alright, this will also be fixed in x64_dbg, thanks a lot!
Greetings |
Latest version will always be here: https://bitbucket.org/mrexodia/patternfind
|
| All times are GMT +8. The time now is 12:08. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX