diff options
| author | Root THC | 2026-02-24 12:42:47 +0000 |
|---|---|---|
| committer | Root THC | 2026-02-24 12:42:47 +0000 |
| commit | c9cbeced5b3f2bdd7407e29c0811e65954132540 (patch) | |
| tree | aefc355416b561111819de159ccbd86c3004cf88 /other/Kermit/include/DevMemPatt.hpp | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/Kermit/include/DevMemPatt.hpp')
| -rw-r--r-- | other/Kermit/include/DevMemPatt.hpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/other/Kermit/include/DevMemPatt.hpp b/other/Kermit/include/DevMemPatt.hpp new file mode 100644 index 0000000..aa559e0 --- /dev/null +++ b/other/Kermit/include/DevMemPatt.hpp | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* | ||
| 2 | * DevMemPatt.hpp: | ||
| 3 | * search the kernel... | ||
| 4 | * written by palmers / teso | ||
| 5 | * | ||
| 6 | * ahh, btw. fuck. now you can grep for it :) | ||
| 7 | */ | ||
| 8 | #ifndef __DEVMEMPATT_C | ||
| 9 | #define __DEVMEMPATT_C | ||
| 10 | |||
| 11 | #define READ_BUFF_SIZE 4096 | ||
| 12 | |||
| 13 | #include <string> | ||
| 14 | #include <rwKernel.hpp> | ||
| 15 | #include <SymbolFingp.hpp> | ||
| 16 | |||
| 17 | |||
| 18 | /** | ||
| 19 | * Searching the kernel. This class helps you by seaching for | ||
| 20 | * patterns in kernel memory. Each function has a, more or less, unique structure. | ||
| 21 | * There is nothing to wonder about this: each function is for solving a different | ||
| 22 | * task. If the function, or parts of it, are know it can be found without any further | ||
| 23 | * knowledge about it. | ||
| 24 | */ | ||
| 25 | class DevMemPatt | ||
| 26 | { | ||
| 27 | private: | ||
| 28 | rwKernel *rw; | ||
| 29 | int compare_data_snippet (unsigned char *, struct sfp *); | ||
| 30 | |||
| 31 | public: | ||
| 32 | /** | ||
| 33 | * This constructor will initialize the object with a reference to a rwKernel object. | ||
| 34 | * @see rwKernel | ||
| 35 | */ | ||
| 36 | DevMemPatt (rwKernel *); | ||
| 37 | |||
| 38 | /** | ||
| 39 | * Another constructor. This one will generate a new rwKernel object. | ||
| 40 | */ | ||
| 41 | DevMemPatt (); | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Destruct DevMemPatt object. Local rwKernel object will not be deleted. | ||
| 45 | */ | ||
| 46 | ~DevMemPatt (); | ||
| 47 | |||
| 48 | /** | ||
| 49 | * Find a data string in kernel memory. | ||
| 50 | * @param start start address of the search. | ||
| 51 | * @param end the search will go upto this address in kernel memory. | ||
| 52 | * @param length the length of the data. | ||
| 53 | * @param data the data searched for. | ||
| 54 | * @return the address of the first byte of the searched data or | ||
| 55 | * zero if it was not found. | ||
| 56 | */ | ||
| 57 | unsigned int find_patt (unsigned int start, unsigned int end, \ | ||
| 58 | unsigned short len, unsigned char *data); | ||
| 59 | |||
| 60 | /** | ||
| 61 | * Find a data pattern in kernel memory. | ||
| 62 | * @param a search a data pattern defined by a. | ||
| 63 | * @return the address of the first byte of the searched pattern or | ||
| 64 | * zero if it was not found. | ||
| 65 | * @see SymbolFingp | ||
| 66 | */ | ||
| 67 | unsigned int find_patt (struct sfp *a); | ||
| 68 | }; | ||
| 69 | #endif /* __DEVMEMPATT_C */ | ||
