Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Win32 krzyż proces szybkie skanowanie AOB dla 64 proces
#1
Kod:   #pragma region FindSig #include <Windows.h> #include <wektor> #include <Psapi.h> #include <iostream> #include "wow64ext.h" przy użyciu przestrzeni nazw std; typedef unsigned long DWORD; typedef unsigned short WORD; typedef unsigned char BYTE; bool FHexCharValid (char c) {if (c> = '0' && c <= '9' || c> = 'A' && c <= 'F' || c> = 'a' && c <= ' f '|| c =='? ') zwraca true; else zwraca false; } bool FHexDecoder (char * Dec, char * Src) {char HighC, LowC; DWORD dwSrcLen = strlen (Src) / 2; int i; dla (i = 0; i <dwSrcLen; i ++) {HighC = Src [i * 2], LowC = Src [i * 2 + 1]; if (! FHexCharValid (LowC) ||! FHexCharValid (HighC)) zwraca false; HighC - = '0'; jeżeli (HighC> 9) HighC - = 7; if (HighC> 0xf) HighC - = 0x20; LowC - = '0'; jeżeli (LowC> 9) LowC - = 7; if (LowC> 0xf) LowC - = 0x20; Dec [i] = (HighC << 4) | LowC; } return true; } bool __SundayHexInit__ (char * Sub, DWORD * p, char * HexSub, unsigned long dwSubLen) {if (! FHexDecoder (HexSub, Sub)) {return false; } DWORD i; dla (i = 0; i <0x100; i ++) {p [i] = - 1; } int WildAddr = 0; dla (i = 0; i <dwSubLen; i ++) {if (Sub [i * 2] == '?') WildAddr = i; } for (i = WildAddr + 1; i <dwSubLen; i ++) {p [(BYTE) HexSub [i]] = dwSubLen - i; } dla (i = 0; i <0x100; i ++) {if (p [i] == - 1) p [i] = dwSubLen - WildAddr; } return true; } int __SundayHex__ (char * Src, unsigned long dwSrcLen, char * Sub, DWORD * p, char * HexSub, DWORD dwSubLen) {DWORD j, k; j = dwSubLen - 1; bool bContinue = true; bool bSuccess; while (bContinue) {bSuccess = true; dla (k = 0; k <dwSubLen; k ++) {if (Sub [(dwSubLen - k - 1) * 2]! = '?' && Src [j - k]! = HexSub [dwSubLen - k - 1 ]) {bSuccess = false; złamać ; }} if (bSuccess) bContinue = false; else {if (j <dwSrcLen - 1) j + = p [(BYTE) Src [j + 1]]; w przeciwnym razie j ++; } if (j> = dwSrcLen) break; } if (j <dwSrcLen) zwraca j - dwSubLen + 1; else return - 1; } int __SundayHexV__ (char * Src, unsigned long dwSrcLen, char * Sub, DWORD * p, char * HexSub, DWORD dwSubLen, int v) {DWORD j, k; j = dwSubLen - 1 + v; bool bContinue = true; bool bSuccess; while (bContinue) {bSuccess = true; dla (k = 0; k <dwSubLen; k ++) {if (Sub [(dwSubLen - k - 1) * 2]! = '?' && Src [j - k]! = HexSub [dwSubLen - k - 1 ]) {bSuccess = false; złamać ; }} if (bSuccess) bContinue = false; else {if (j <dwSrcLen - 1) j + = p [(BYTE) Src [j + 1]]; w przeciwnym razie j ++; } if (j> = dwSrcLen) break; } if (j <dwSrcLen) zwraca j - dwSubLen + 1; else return - 1; } int SundayHex (char * Src, unsigned long dwSrcLen, char * Sub) {DWORD dwSubLen = strlen (Sub); if (dwSubLen% 2) return - 1; dwSubLen / = 2; char * HexSub = new char [dwSubLen + 1]; DWORD * p = nowy DWORD [0x100]; int i = - 1; if (__SundayHexInit__ (Sub, p, HexSub, dwSubLen)) {i = __SundayHex__ (Src, dwSrcLen, Sub, p, HexSub, dwSubLen); } usuń [] p; usuń [] HexSub; return i; } vector <int> SundayHexV (char * Src, unsigned long dwSrcLen, char
Reply




Users browsing this thread: 1 Guest(s)