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 | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/Kermit')
95 files changed, 6205 insertions, 0 deletions
diff --git a/other/Kermit/LICENSE b/other/Kermit/LICENSE new file mode 100644 index 0000000..066427f --- /dev/null +++ b/other/Kermit/LICENSE | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | TESO CONFIDENTIAL - SOURCE MATERIALS | ||
| 2 | |||
| 3 | This is unpublished proprietary source code of TESO Security. | ||
| 4 | |||
| 5 | The contents of this file and any file it was released with, may not | ||
| 6 | be, including, but not limited to, disclosed to third parties, copied | ||
| 7 | or duplicated in any form, in whole or in part, without the prior | ||
| 8 | written permission of TESO Security. | ||
| 9 | |||
| 10 | (C) COPYRIGHT TESO Security, 2001 | ||
| 11 | All Rights Reserved | ||
diff --git a/other/Kermit/MakeOpt b/other/Kermit/MakeOpt new file mode 100644 index 0000000..74eb3a6 --- /dev/null +++ b/other/Kermit/MakeOpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | CXX = g++ | ||
| 3 | CXXFLAGS = -O2 -Wall -I. -I../include #-g -DDEBUG | ||
| 4 | |||
| 5 | CC = gcc | ||
| 6 | CFLAGS = -O2 -Wall -I. -I../include #-g -DDEBUG | ||
| 7 | |||
| 8 | AR = ar | ||
| 9 | ARFLAGS = -cr | ||
| 10 | |||
| 11 | UTIL_DIR=../util | ||
| 12 | LIB_DIR = ../lib | ||
| 13 | BIN_DIR = ../bin | ||
| 14 | |||
| 15 | AR_OUT = $(LIB_DIR)/libKermit.a | ||
| 16 | SHARE_OUT = $(LIB_DIR)/libKermit.so | ||
| 17 | |||
diff --git a/other/Kermit/Makefile b/other/Kermit/Makefile new file mode 100644 index 0000000..71a5198 --- /dev/null +++ b/other/Kermit/Makefile | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | SUBDIRS = include lib src doc | ||
| 3 | |||
| 4 | all: | ||
| 5 | for x in $(SUBDIRS); do \ | ||
| 6 | make -C $$x; \ | ||
| 7 | done | ||
| 8 | |||
| 9 | clean: | ||
| 10 | for x in $(SUBDIRS); do \ | ||
| 11 | make -C $$x clean; \ | ||
| 12 | done | ||
| 13 | |||
| 14 | |||
diff --git a/other/Kermit/README b/other/Kermit/README new file mode 100644 index 0000000..e1ec381 --- /dev/null +++ b/other/Kermit/README | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | KERMIT - Kernel, Module, Permission, recognicion, whatever ... | ||
| 2 | ============================================================== | ||
| 3 | |||
| 4 | written by palmers / teso | ||
| 5 | read the LICENSE, NOW! | ||
| 6 | |||
| 7 | |||
| 8 | what is this? | ||
| 9 | ------------- | ||
| 10 | |||
| 11 | this source codes and text files cover my research on linux kernel | ||
| 12 | manipulation using direct memory access (/dev/mem). What you will | ||
| 13 | find are utils for basic kernel manipulation (reading / writing), | ||
| 14 | a utility for finding a given symbol in the kernel (providing its | ||
| 15 | virtual address in the kernel) and a api for building kernel patches. | ||
| 16 | Those patches are, effectivly, applieable to any linux kernel and | ||
| 17 | provied the same functionality as a kernel module. With the little | ||
| 18 | difference that you do not need to (re)compile it and you do not | ||
| 19 | need native module support. Of course, the patch would not register | ||
| 20 | itself to the module table ;) | ||
| 21 | |||
| 22 | |||
| 23 | how does it work? | ||
| 24 | ----------------- | ||
| 25 | |||
| 26 | See the doc/ directory for the long version. Short version: see | ||
| 27 | above :) | ||
| 28 | |||
| 29 | |||
| 30 | compiling | ||
| 31 | --------- | ||
| 32 | |||
| 33 | needed for compiling: c/c++ compiler and some generic unix tools. | ||
| 34 | just type ``make''. if you wonder about the strange things happening | ||
| 35 | take a look or two into the doc/'s. | ||
| 36 | Dont forget to take a look into MakeOpt. | ||
| 37 | |||
| 38 | |||
| 39 | using | ||
| 40 | ----- | ||
| 41 | |||
| 42 | well, if you havnt already got at this point where to look you better | ||
| 43 | turn to something else. | ||
| 44 | |||
| 45 | |||
| 46 | |||
| 47 | |||
diff --git a/other/Kermit/TODO b/other/Kermit/TODO new file mode 100644 index 0000000..9f28796 --- /dev/null +++ b/other/Kermit/TODO | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | todo list: | ||
| 2 | |||
| 3 | - collect SymbolFind.conf patterns. use the get_some.sh script and create | ||
| 4 | a file of the form <kernel-version>-<hostname or sth.> in the tmp dir with | ||
| 5 | the output. | ||
| 6 | |||
| 7 | - porting the whole thing (look at arch.hpp in include/). | ||
| 8 | |||
| 9 | |||
diff --git a/other/Kermit/bin/SymbolFind.conf b/other/Kermit/bin/SymbolFind.conf new file mode 100644 index 0000000..58f7da2 --- /dev/null +++ b/other/Kermit/bin/SymbolFind.conf | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | sys_execve c0100000 c0200000 00 0f 55 89 e5 56 53 8b 45 08 50 e8 52 24 02 00 89 | ||
| 2 | sys_unlink c0120000 c0200000 00 0f 55 57 56 53 8b 44 24 14 50 e8 be f1 ff ff 89 | ||
| 3 | sys_chmod c0120000 c0200000 00 0f 83 ec 20 57 56 53 8b 44 24 30 8b 74 24 34 6a | ||
| 4 | sys_kill c0110000 c0200000 00 0f 81 ec 80 00 00 00 57 b9 20 00 00 00 56 31 c0 | ||
| 5 | sys_exit c0110000 c0200000 00 0f 31 c0 8a 44 24 04 c1 e0 08 50 e8 89 fd ff ff | ||
| 6 | sys_fork c0100000 c0200000 00 0f 55 89 e5 8d 55 08 52 8b 45 3c 50 6a 11 e8 72 | ||
| 7 | sys_read c0120000 c0200000 00 0f 55 57 56 53 8b 54 24 14 8b 6c 24 1c be f7 ff | ||
| 8 | sys_write c0120000 c0200000 00 0f 83 ec 0c 55 57 56 53 8b 7c 24 20 8b 6c 24 28 | ||
| 9 | sys_open c0120000 c0200000 00 0f 56 53 8b 44 24 0c 50 e8 c0 6b 00 00 89 c3 89 | ||
| 10 | sys_close c0120000 c0200000 00 0f 57 56 53 8b 5c 24 10 bf f7 ff ff ff b9 00 e0 | ||
| 11 | init c0100000 c0200000 00 0f 56 53 e8 09 8c 0f 00 e8 bc 8e 00 00 b8 05 00 | ||
| 12 | sys_setuid c0110000 c0200000 00 0f 83 ec 08 55 57 31 c9 56 31 ed 53 bb 00 e0 ff | ||
| 13 | sys_setgid c0110000 c0200000 00 0f 56 ba 00 e0 ff ff 21 e2 89 d6 53 31 db 66 8b | ||
| 14 | sys_getdents c0120000 c0200000 00 0f 83 ec 10 55 57 56 53 8b 7c 24 24 8b 6c 24 2c | ||
| 15 | sys_socketcall c0150000 c0200000 00 0f 83 ec 18 53 8b 54 24 20 8d 42 ff 89 c3 83 fb | ||
| 16 | kmalloc c0120000 c0200000 00 0f 55 57 56 53 b8 c4 b2 1e c0 8b 4c 24 14 83 3d | ||
diff --git a/other/Kermit/bin/conf/back_SymbolFind.conf b/other/Kermit/bin/conf/back_SymbolFind.conf new file mode 100644 index 0000000..cae9c20 --- /dev/null +++ b/other/Kermit/bin/conf/back_SymbolFind.conf | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | sys_execve c0100000 c0110000 00 0f c3 55 89 e5 56 53 8b 45 08 50 e8 52 24 02 00 | ||
| 2 | sys_unlink c0120000 c0132000 00 0f 90 55 57 56 53 8b 44 24 14 50 e8 be f1 ff ff | ||
| 3 | sys_chmod c0110000 c0130000 00 0f f6 83 ec 20 57 56 53 8b 44 24 30 8b 74 24 34 | ||
| 4 | sys_kill c0100000 c0120000 00 0f f6 81 ec 80 00 00 00 57 b9 20 00 00 00 56 31 | ||
| 5 | sys_exit c0100000 c0120000 00 0f f6 31 c0 8a 44 24 04 c1 e0 08 50 e8 89 fd ff | ||
| 6 | sys_fork c0100000 c0120000 00 0f c3 55 89 e5 8d 55 08 52 8b 45 3c 50 6a 11 e8 | ||
| 7 | sys_read c0120000 c0130000 00 0f 00 55 57 56 53 8b 54 24 14 8b 6c 24 1c be f7 | ||
| 8 | sys_write c0120000 c0130000 00 0f 90 83 ec 0c 55 57 56 53 8b 7c 24 20 8b 6c 24 | ||
| 9 | sys_open c0120000 c0130000 00 0f c3 56 53 8b 44 24 0c 50 e8 c0 6b 00 00 89 c3 | ||
| 10 | sys_close c0120000 c0130000 00 0f 90 57 56 53 8b 5c 24 10 bf f7 ff ff ff b9 00 | ||
| 11 | init c0100000 c0110000 00 0f 00 56 53 e8 09 8c 0f 00 e8 bc 8e 00 00 b8 05 | ||
| 12 | sys_setuid c0110000 c0120000 00 0f c3 83 ec 08 55 57 31 c9 56 31 ed 53 bb 00 e0 | ||
| 13 | sys_setgid c0110000 c0120000 00 0f 90 56 ba 00 e0 ff ff 21 e2 89 d6 53 31 db 66 | ||
| 14 | sys_getdents c0120000 c0140000 -1 0e 83 ec 10 55 57 56 53 8b 7c 24 24 8b 6c 24 | ||
| 15 | sys_socketcall c0140000 c0170000 00 0f f6 83 ec 18 53 8b 54 24 20 8d 42 ff 89 c3 83 | ||
diff --git a/other/Kermit/doc/API_doc/html/DevMemPatt_8hpp-source.html b/other/Kermit/doc/API_doc/html/DevMemPatt_8hpp-source.html new file mode 100644 index 0000000..d11791f --- /dev/null +++ b/other/Kermit/doc/API_doc/html/DevMemPatt_8hpp-source.html | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>DevMemPatt.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>DevMemPatt.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * DevMemPatt.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * search the kernel...</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> *</font> | ||
| 14 | 00006 <font class="comment"> * ahh, btw. fuck. now you can grep for it :)</font> | ||
| 15 | 00007 <font class="comment"> */</font> | ||
| 16 | 00008 <font class="preprocessor">#ifndef __DEVMEMPATT_C</font> | ||
| 17 | 00009 <font class="preprocessor"></font><font class="preprocessor">#define __DEVMEMPATT_C</font> | ||
| 18 | 00010 <font class="preprocessor"></font> | ||
| 19 | 00011 <font class="preprocessor">#define READ_BUFF_SIZE 4096</font> | ||
| 20 | 00012 <font class="preprocessor"></font> | ||
| 21 | 00013 <font class="preprocessor">#include <string></font> | ||
| 22 | 00014 <font class="preprocessor">#include <rwKernel.hpp></font> | ||
| 23 | 00015 <font class="preprocessor">#include <SymbolFingp.hpp></font> | ||
| 24 | 00016 | ||
| 25 | 00017 | ||
| 26 | <a name="l00025"></a><a class="code" href="classDevMemPatt.html">00025</a> <font class="keyword">class </font><a class="code" href="classDevMemPatt.html">DevMemPatt</a> | ||
| 27 | 00026 { | ||
| 28 | 00027 <font class="keyword">private</font>: | ||
| 29 | 00028 <a class="code" href="classrwKernel.html">rwKernel</a> *rw; | ||
| 30 | 00029 <font class="keywordtype">int</font> compare_data_snippet (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *, <font class="keyword">struct</font> sfp *); | ||
| 31 | 00030 | ||
| 32 | 00031 <font class="keyword">public</font>: | ||
| 33 | 00036 <a class="code" href="classDevMemPatt.html#a1">DevMemPatt</a> (<a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 34 | 00037 | ||
| 35 | 00041 <a class="code" href="classDevMemPatt.html#a1">DevMemPatt</a> (); | ||
| 36 | 00042 | ||
| 37 | 00046 <a class="code" href="classDevMemPatt.html#a2">~DevMemPatt</a> (); | ||
| 38 | 00047 | ||
| 39 | 00057 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classDevMemPatt.html#a3">find_patt</a> (<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> start, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> end, \ | ||
| 40 | 00058 <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> len, <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *data); | ||
| 41 | 00059 | ||
| 42 | 00067 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classDevMemPatt.html#a3">find_patt</a> (<font class="keyword">struct</font> sfp *a); | ||
| 43 | 00068 }; | ||
| 44 | 00069 <font class="preprocessor">#endif </font><font class="comment">/* __DEVMEMPATT_C */</font> | ||
| 45 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 46 | <a href="http://www.doxygen.org/index.html"> | ||
| 47 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 48 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 49 | © 1997-2001</small></address> | ||
| 50 | </body> | ||
| 51 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/Patch_8hpp-source.html b/other/Kermit/doc/API_doc/html/Patch_8hpp-source.html new file mode 100644 index 0000000..66340bd --- /dev/null +++ b/other/Kermit/doc/API_doc/html/Patch_8hpp-source.html | |||
| @@ -0,0 +1,119 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Patch.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Patch.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * Patch.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * representation of a kernel patch.</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> */</font> | ||
| 14 | 00006 <font class="preprocessor">#ifndef __PATCH_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define __PATCH_C</font> | ||
| 16 | 00008 <font class="preprocessor"></font> | ||
| 17 | 00009 <font class="preprocessor">#include <rwKernel.hpp></font> | ||
| 18 | 00010 <font class="preprocessor">#include <SymbolTable.hpp></font> | ||
| 19 | 00011 <font class="preprocessor">#include <SystemMap.hpp></font> | ||
| 20 | 00012 <font class="preprocessor">#include <stoi16.hpp></font> | ||
| 21 | 00013 <font class="preprocessor">#include <itos16.hpp></font> | ||
| 22 | 00014 <font class="preprocessor">#include <utility></font> | ||
| 23 | 00015 <font class="preprocessor">#include <functional></font> | ||
| 24 | 00016 <font class="preprocessor">#include <algorithm></font> | ||
| 25 | 00017 <font class="preprocessor">#include <list></font> | ||
| 26 | 00018 <font class="preprocessor">#include <fstream></font> | ||
| 27 | 00019 <font class="preprocessor">#include <string></font> | ||
| 28 | 00020 <font class="preprocessor">#include <name2add.h></font> | ||
| 29 | 00021 | ||
| 30 | 00022 | ||
| 31 | 00023 <font class="keyword">typedef</font> pair<unsigned int, unsigned int> Addr2Addr; | ||
| 32 | 00024 <font class="keyword">typedef</font> list<Addr2Addr *> Addr2AddrList; | ||
| 33 | 00025 | ||
| 34 | 00026 Addr2AddrList *genReplaceValMap (<a class="code" href="classSymbolTable.html">SymbolTable</a> *st); | ||
| 35 | 00027 <font class="keywordtype">void</font> genDummyValMap (); | ||
| 36 | 00028 <font class="keyword">extern</font> <a class="code" href="classSystemMap.html">SystemMap</a> DummyValMap; | ||
| 37 | 00029 | ||
| 38 | 00030 | ||
| 39 | 00031 <font class="preprocessor">#define CLEAN 1</font> | ||
| 40 | 00032 <font class="preprocessor"></font><font class="preprocessor">#define LINKED 2</font> | ||
| 41 | 00033 <font class="preprocessor"></font><font class="preprocessor">#define APPLIED 4</font> | ||
| 42 | 00034 <font class="preprocessor"></font><font class="preprocessor">#define LFAILED 8</font> | ||
| 43 | 00035 <font class="preprocessor"></font><font class="preprocessor">#define AFAILED 16</font> | ||
| 44 | 00036 <font class="preprocessor"></font> | ||
| 45 | 00037 | ||
| 46 | <a name="l00050"></a><a class="code" href="classPatch.html">00050</a> <font class="keyword">class </font><a class="code" href="classPatch.html">Patch</a> | ||
| 47 | 00051 { | ||
| 48 | 00052 <font class="keyword">private</font>: | ||
| 49 | 00053 <font class="keywordtype">int</font> state; | ||
| 50 | 00054 <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> len; | ||
| 51 | 00055 <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *back_data, *data, *overwr; | ||
| 52 | 00056 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> address; | ||
| 53 | 00057 <a class="code" href="classrwKernel.html">rwKernel</a> *local_rw; | ||
| 54 | 00058 | ||
| 55 | 00059 <font class="keywordtype">bool</font> initObjects (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *, <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font>, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>, <a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 56 | 00060 string state2string (); | ||
| 57 | 00061 <font class="keywordtype">void</font> string2state (string); | ||
| 58 | 00062 string data2string (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *); | ||
| 59 | 00063 <font class="keywordtype">void</font> string2data (string, <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *); | ||
| 60 | 00064 <font class="keywordtype">void</font> parse (string); | ||
| 61 | 00065 | ||
| 62 | 00066 <font class="keyword">public</font>: | ||
| 63 | 00070 <a class="code" href="classPatch.html#a0">Patch</a> (); | ||
| 64 | 00071 | ||
| 65 | 00078 <a class="code" href="classPatch.html#a0">Patch</a> (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *data, <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> len, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> addr); | ||
| 66 | 00079 | ||
| 67 | 00085 <a class="code" href="classPatch.html#a0">Patch</a> (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *data, <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> len, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> addr, <a class="code" href="classrwKernel.html">rwKernel</a> *x); | ||
| 68 | 00086 | ||
| 69 | 00091 <a class="code" href="classPatch.html#a0">Patch</a> (string); | ||
| 70 | 00092 | ||
| 71 | 00097 <a class="code" href="classPatch.html#a0">Patch</a> (string, <a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 72 | 00098 | ||
| 73 | 00102 <a class="code" href="classPatch.html#a5">~Patch</a> (); | ||
| 74 | 00103 | ||
| 75 | 00104 | ||
| 76 | 00108 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a6">initFromString</a> (string); | ||
| 77 | 00109 | ||
| 78 | 00113 string <a class="code" href="classPatch.html#a7">getPatchAsString</a> (); | ||
| 79 | 00114 | ||
| 80 | 00119 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a8">wasChanged</a> (); | ||
| 81 | 00120 | ||
| 82 | 00124 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a9">isLinked</a> (); | ||
| 83 | 00125 | ||
| 84 | 00129 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a10">isApplied</a> (); | ||
| 85 | 00130 | ||
| 86 | 00134 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a11">isFailed</a> (); | ||
| 87 | 00135 | ||
| 88 | 00139 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a12">isClean</a> (); | ||
| 89 | 00140 | ||
| 90 | 00144 <font class="keywordtype">int</font> <a class="code" href="classPatch.html#a13">getState</a> (); | ||
| 91 | 00145 | ||
| 92 | 00149 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a14">restore</a> (); | ||
| 93 | 00150 | ||
| 94 | 00154 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a15">remove</a> (); | ||
| 95 | 00155 | ||
| 96 | 00159 <font class="keywordtype">bool</font> <a class="code" href="classPatch.html#a15">remove</a> (<a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 97 | 00160 | ||
| 98 | 00164 <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *<a class="code" href="classPatch.html#a17">getData</a> (); | ||
| 99 | 00165 | ||
| 100 | 00171 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a19">apply</a> (<a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 101 | 00172 | ||
| 102 | 00177 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a19">apply</a> (); | ||
| 103 | 00178 | ||
| 104 | 00182 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a20">link</a> (Addr2AddrList *); | ||
| 105 | 00183 | ||
| 106 | 00192 <font class="keywordtype">void</font> <a class="code" href="classPatch.html#a21">dump</a> (string file); | ||
| 107 | 00193 | ||
| 108 | 00197 <font class="keyword">friend</font> istream& <a class="code" href="classPatch.html#l0">operator>> </a>(istream&, <a class="code" href="classPatch.html">Patch</a>&); | ||
| 109 | 00198 | ||
| 110 | 00202 <font class="keyword">friend</font> ostream& <a class="code" href="classPatch.html#l1">operator<< </a>(ostream&, <a class="code" href="classPatch.html">Patch</a>&); | ||
| 111 | 00203 }; | ||
| 112 | 00204 <font class="preprocessor">#endif </font><font class="comment">/* __PATCH_C */</font> | ||
| 113 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 114 | <a href="http://www.doxygen.org/index.html"> | ||
| 115 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 116 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 117 | © 1997-2001</small></address> | ||
| 118 | </body> | ||
| 119 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/SymbolFingp_8hpp-source.html b/other/Kermit/doc/API_doc/html/SymbolFingp_8hpp-source.html new file mode 100644 index 0000000..05b43a0 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/SymbolFingp_8hpp-source.html | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SymbolFingp.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolFingp.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * SymbolFingp.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * some fingerprint</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> */</font> | ||
| 14 | 00006 <font class="preprocessor">#ifndef __SymbolFingp_H</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define __SymbolFingp_H</font> | ||
| 16 | 00008 <font class="preprocessor"></font><font class="preprocessor">#include <map></font> | ||
| 17 | 00009 <font class="preprocessor">#include <fstream></font> | ||
| 18 | 00010 <font class="preprocessor">#include <string></font> | ||
| 19 | 00011 <font class="preprocessor">#include <iostream></font> | ||
| 20 | 00012 | ||
| 21 | 00013 <font class="comment">/* default file to open */</font> | ||
| 22 | 00014 <font class="preprocessor">#define DEFAULT_FILE "SymbolFind.conf"</font> | ||
| 23 | 00015 <font class="preprocessor"></font> | ||
| 24 | 00016 <font class="comment">/* defines used for the type field in struct cell */</font> | ||
| 25 | 00017 <font class="preprocessor">#define WWCARD 1</font> | ||
| 26 | 00018 <font class="preprocessor"></font><font class="preprocessor">#define NOCARD 0</font> | ||
| 27 | 00019 <font class="preprocessor"></font> | ||
| 28 | 00020 | ||
| 29 | 00021 <font class="keyword">struct </font>cell | ||
| 30 | 00022 { | ||
| 31 | 00023 <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> type; | ||
| 32 | 00024 <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> val; | ||
| 33 | 00025 }; | ||
| 34 | 00026 | ||
| 35 | 00027 | ||
| 36 | 00028 <font class="keyword">struct </font>sfp | ||
| 37 | 00029 { | ||
| 38 | 00030 <font class="keywordtype">char</font> *name; | ||
| 39 | 00031 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> start_addr; | ||
| 40 | 00032 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> stop_addr; | ||
| 41 | 00033 <font class="keywordtype">long</font> offset; | ||
| 42 | 00034 <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> length; | ||
| 43 | 00035 <font class="keyword">struct </font>cell *fp; | ||
| 44 | 00036 }; | ||
| 45 | 00037 | ||
| 46 | 00038 | ||
| 47 | <a name="l00042"></a><a class="code" href="classSymbolFingp.html">00042</a> <font class="keyword">class </font><a class="code" href="classSymbolFingp.html">SymbolFingp</a> | ||
| 48 | 00043 { | ||
| 49 | 00044 <font class="keyword">private</font>: | ||
| 50 | 00045 | ||
| 51 | 00046 <font class="keyword">typedef</font> map<string, struct sfp> FingerThing; | ||
| 52 | 00047 FingerThing Fingers; | ||
| 53 | 00048 | ||
| 54 | 00049 <font class="keywordtype">void</font> readFingers (ifstream); | ||
| 55 | 00050 <font class="keywordtype">bool</font> addFinger (<font class="keyword">struct</font> sfp *); | ||
| 56 | 00051 | ||
| 57 | 00052 <font class="keyword">public</font>: | ||
| 58 | 00053 | ||
| 59 | 00057 <a class="code" href="classSymbolFingp.html#a0">SymbolFingp</a> (); | ||
| 60 | 00058 | ||
| 61 | 00062 <a class="code" href="classSymbolFingp.html#a0">SymbolFingp</a> (string); | ||
| 62 | 00063 | ||
| 63 | 00067 <a class="code" href="classSymbolFingp.html#a2">~SymbolFingp</a> (); | ||
| 64 | 00068 | ||
| 65 | 00072 <font class="keyword">struct </font>sfp *getFinger (string); | ||
| 66 | 00073 }; | ||
| 67 | 00074 | ||
| 68 | 00075 <font class="preprocessor">#endif </font><font class="comment">/* __SymbolFingp_H */</font> | ||
| 69 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 70 | <a href="http://www.doxygen.org/index.html"> | ||
| 71 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 72 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 73 | © 1997-2001</small></address> | ||
| 74 | </body> | ||
| 75 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/SymbolTable_8hpp-source.html b/other/Kermit/doc/API_doc/html/SymbolTable_8hpp-source.html new file mode 100644 index 0000000..04dadd8 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/SymbolTable_8hpp-source.html | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SymbolTable.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolTable.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * SymbolTable.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * a container for "on-demand" symbol address fetching</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> */</font> | ||
| 14 | 00006 <font class="preprocessor">#ifndef __SYMBOL_TABLE_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define __SYMBOL_TABLE_C</font> | ||
| 16 | 00008 <font class="preprocessor"></font> | ||
| 17 | 00009 <font class="preprocessor">#include <SymbolFingp.hpp></font> | ||
| 18 | 00010 <font class="preprocessor">#include <SystemMap.hpp></font> | ||
| 19 | 00011 <font class="preprocessor">#include <DevMemPatt.hpp></font> | ||
| 20 | 00012 <font class="preprocessor">#include <rwKernel.hpp></font> | ||
| 21 | 00013 <font class="preprocessor">#include <list></font> | ||
| 22 | 00014 <font class="preprocessor">#include <string></font> | ||
| 23 | 00015 <font class="preprocessor">#include <iostream></font> | ||
| 24 | 00016 <font class="preprocessor">#include <fstream></font> | ||
| 25 | 00017 <font class="preprocessor">#include <algorithm></font> | ||
| 26 | 00018 <font class="preprocessor">#include <iterator></font> | ||
| 27 | 00019 | ||
| 28 | 00020 <font class="preprocessor">#define DEFAULTDUMP "SymbolTableDump"</font> | ||
| 29 | 00021 <font class="preprocessor"></font><font class="preprocessor">#define DEFAULTSYSTEMMAP "System.map"</font> | ||
| 30 | 00022 <font class="preprocessor"></font> | ||
| 31 | 00023 <font class="keyword">typedef</font> <font class="keyword">struct</font> | ||
| 32 | 00024 <font class="keyword"> </font>{ | ||
| 33 | 00025 string Name; | ||
| 34 | 00026 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> Address; | ||
| 35 | 00027 } zzSym; | ||
| 36 | 00028 <font class="keyword">typedef</font> list<zzSym *> zzSymList; | ||
| 37 | 00029 | ||
| 38 | 00030 | ||
| 39 | <a name="l00034"></a><a class="code" href="classSymbolTable.html">00034</a> <font class="keyword">class </font><a class="code" href="classSymbolTable.html">SymbolTable</a> | ||
| 40 | 00035 { | ||
| 41 | 00036 <font class="keyword">private</font>: | ||
| 42 | 00037 <a class="code" href="classSymbolFingp.html">SymbolFingp</a> *fing; | ||
| 43 | 00038 <a class="code" href="classDevMemPatt.html">DevMemPatt</a> *patt; | ||
| 44 | 00039 <a class="code" href="classSystemMap.html">SystemMap</a> exported; | ||
| 45 | 00040 <a class="code" href="classSystemMap.html">SystemMap</a> mapp; | ||
| 46 | 00041 <a class="code" href="classSystemMap.html">SystemMap</a> rest; | ||
| 47 | 00042 string dump_file; | ||
| 48 | 00043 | ||
| 49 | 00044 <font class="keywordtype">bool</font> createObjects (<a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 50 | 00045 <font class="keywordtype">bool</font> loadFiles (string, string); | ||
| 51 | 00046 | ||
| 52 | 00047 <font class="keyword">public</font>: | ||
| 53 | <a name="l00051"></a><a class="code" href="classSymbolTable.html#m0">00051</a> zzSymList symList; | ||
| 54 | 00052 | ||
| 55 | 00056 <a class="code" href="classSymbolTable.html#a0">SymbolTable</a> (); | ||
| 56 | 00057 | ||
| 57 | 00063 <a class="code" href="classSymbolTable.html#a0">SymbolTable</a> (string res, string sys); | ||
| 58 | 00064 | ||
| 59 | 00069 <a class="code" href="classSymbolTable.html#a0">SymbolTable</a> (<a class="code" href="classrwKernel.html">rwKernel</a> *); | ||
| 60 | 00070 | ||
| 61 | 00074 <a class="code" href="classSymbolTable.html#a3">~SymbolTable</a> (); | ||
| 62 | 00075 | ||
| 63 | 00080 <font class="keywordtype">void</font> <a class="code" href="classSymbolTable.html#a4">setSaveFile</a> (string); | ||
| 64 | 00081 | ||
| 65 | 00088 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classSymbolTable.html#a5">getSymbol</a> (string); | ||
| 66 | 00089 | ||
| 67 | 00096 <font class="keywordtype">bool</font> <a class="code" href="classSymbolTable.html#a6">findSymbol</a> (string); | ||
| 68 | 00097 | ||
| 69 | 00101 <font class="keywordtype">void</font> <a class="code" href="classSymbolTable.html#a7">addSymbolToCache</a> (string, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>); | ||
| 70 | 00102 | ||
| 71 | 00106 <font class="keywordtype">void</font> <a class="code" href="classSymbolTable.html#a8">clearCache</a> (); | ||
| 72 | 00107 | ||
| 73 | 00111 <font class="keywordtype">bool</font> <a class="code" href="classSymbolTable.html#a9">saveCache</a> (); | ||
| 74 | 00112 }; | ||
| 75 | 00113 <font class="preprocessor">#endif </font><font class="comment">/* __SYMBOL_TABLE_C */</font> | ||
| 76 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 77 | <a href="http://www.doxygen.org/index.html"> | ||
| 78 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 79 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 80 | © 1997-2001</small></address> | ||
| 81 | </body> | ||
| 82 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/SystemMap_8hpp-source.html b/other/Kermit/doc/API_doc/html/SystemMap_8hpp-source.html new file mode 100644 index 0000000..4055733 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/SystemMap_8hpp-source.html | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SystemMap.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SystemMap.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * SystemMap.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * representation if a system map file (and alike).</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> */</font> | ||
| 14 | 00006 <font class="preprocessor">#ifndef SYSTEM_MAP_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define SYSTEM_MAP_C</font> | ||
| 16 | 00008 <font class="preprocessor"></font> | ||
| 17 | 00009 <font class="preprocessor">#include <map></font> | ||
| 18 | 00010 <font class="preprocessor">#include <string></font> | ||
| 19 | 00011 <font class="preprocessor">#include <fstream></font> | ||
| 20 | 00012 | ||
| 21 | <a name="l00016"></a><a class="code" href="classSystemMap.html">00016</a> <font class="keyword">class </font><a class="code" href="classSystemMap.html">SystemMap</a> | ||
| 22 | 00017 { | ||
| 23 | 00018 <font class="keyword">private</font>: | ||
| 24 | 00019 <font class="keyword">typedef</font> map<string, unsigned int> blamap; | ||
| 25 | 00020 <font class="keyword">typedef</font> blamap::value_type bla_val; | ||
| 26 | 00021 | ||
| 27 | 00022 blamap add_map; | ||
| 28 | 00023 | ||
| 29 | 00024 <font class="keyword">public</font>: | ||
| 30 | 00028 <a class="code" href="classSystemMap.html#a1">SystemMap</a> (string file); | ||
| 31 | 00029 | ||
| 32 | 00033 <a class="code" href="classSystemMap.html#a1">SystemMap</a> (); | ||
| 33 | 00034 | ||
| 34 | 00038 <a class="code" href="classSystemMap.html#a2">~SystemMap</a> (); | ||
| 35 | 00039 | ||
| 36 | 00044 <font class="keywordtype">bool</font> <a class="code" href="classSystemMap.html#a3">contains</a> (string); | ||
| 37 | 00045 | ||
| 38 | 00052 <font class="keywordtype">void</font> <a class="code" href="classSystemMap.html#a4">add</a> (string name, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> address); | ||
| 39 | 00053 | ||
| 40 | 00059 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classSystemMap.html#a5">operator[] </a>(string name); | ||
| 41 | 00060 }; | ||
| 42 | 00061 <font class="preprocessor">#endif </font><font class="comment">/* SYSTEM_MAP_C */</font> | ||
| 43 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 44 | <a href="http://www.doxygen.org/index.html"> | ||
| 45 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 46 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 47 | © 1997-2001</small></address> | ||
| 48 | </body> | ||
| 49 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/addresses_8h-source.html b/other/Kermit/doc/API_doc/html/addresses_8h-source.html new file mode 100644 index 0000000..f532b9b --- /dev/null +++ b/other/Kermit/doc/API_doc/html/addresses_8h-source.html | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>addresses.h Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>addresses.h</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * addresses.h:</font> | ||
| 11 | 00003 <font class="comment"> * this file was automaticly generated by gen_defines</font> | ||
| 12 | 00004 <font class="comment"> */</font> | ||
| 13 | 00005 <font class="preprocessor">#define SYS_FORK_ADD 0xf8f8f8f8</font> | ||
| 14 | 00006 <font class="preprocessor"></font><font class="preprocessor">#define SYS_READ_ADD 0xf8f8f7f7</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define SYS_WRITE_ADD 0xf8f8f6f6</font> | ||
| 16 | 00008 <font class="preprocessor"></font><font class="preprocessor">#define SYS_EXIT_ADD 0xf8f8f5f5</font> | ||
| 17 | 00009 <font class="preprocessor"></font><font class="preprocessor">#define SYS_SETUID_ADD 0xf8f8f4f4</font> | ||
| 18 | 00010 <font class="preprocessor"></font><font class="preprocessor">#define SYS_SETGID_ADD 0xf8f8f3f3</font> | ||
| 19 | 00011 <font class="preprocessor"></font><font class="preprocessor">#define SYS_GETUID_ADD 0xf8f8f2f2</font> | ||
| 20 | 00012 <font class="preprocessor"></font><font class="preprocessor">#define SYS_GETGID_ADD 0xf8f8f1f1</font> | ||
| 21 | 00013 <font class="preprocessor"></font><font class="preprocessor">#define SYS_OPEN_ADD 0xf8f8f0f0</font> | ||
| 22 | 00014 <font class="preprocessor"></font><font class="preprocessor">#define SYS_CLOSE_ADD 0xf8f8efef</font> | ||
| 23 | 00015 <font class="preprocessor"></font><font class="preprocessor">#define KMALLOC_ADD 0xf8f8eeee</font> | ||
| 24 | 00016 <font class="preprocessor"></font><font class="comment">/*</font> | ||
| 25 | 00017 <font class="comment"> * addresses.h:</font> | ||
| 26 | 00018 <font class="comment"> * this file was automaticly generated by gen_defines</font> | ||
| 27 | 00019 <font class="comment"> */</font> | ||
| 28 | 00020 <font class="preprocessor">#define SYS_FORK_ADD 0xf8f8f8f8</font> | ||
| 29 | 00021 <font class="preprocessor"></font><font class="preprocessor">#define SYS_READ_ADD 0xf8f8f7f7</font> | ||
| 30 | 00022 <font class="preprocessor"></font><font class="preprocessor">#define SYS_WRITE_ADD 0xf8f8f6f6</font> | ||
| 31 | 00023 <font class="preprocessor"></font><font class="preprocessor">#define SYS_EXIT_ADD 0xf8f8f5f5</font> | ||
| 32 | 00024 <font class="preprocessor"></font><font class="preprocessor">#define SYS_SETUID_ADD 0xf8f8f4f4</font> | ||
| 33 | 00025 <font class="preprocessor"></font><font class="preprocessor">#define SYS_SETGID_ADD 0xf8f8f3f3</font> | ||
| 34 | 00026 <font class="preprocessor"></font><font class="preprocessor">#define SYS_GETUID_ADD 0xf8f8f2f2</font> | ||
| 35 | 00027 <font class="preprocessor"></font><font class="preprocessor">#define SYS_GETGID_ADD 0xf8f8f1f1</font> | ||
| 36 | 00028 <font class="preprocessor"></font><font class="preprocessor">#define SYS_OPEN_ADD 0xf8f8f0f0</font> | ||
| 37 | 00029 <font class="preprocessor"></font><font class="preprocessor">#define SYS_CLOSE_ADD 0xf8f8efef</font> | ||
| 38 | 00030 <font class="preprocessor"></font><font class="preprocessor">#define KMALLOC_ADD 0xf8f8eeee</font> | ||
| 39 | </font></pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 40 | <a href="http://www.doxygen.org/index.html"> | ||
| 41 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 42 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 43 | © 1997-2001</small></address> | ||
| 44 | </body> | ||
| 45 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/annotated.html b/other/Kermit/doc/API_doc/html/annotated.html new file mode 100644 index 0000000..b624436 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/annotated.html | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Annotated Index</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Kermit Compound List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<ul> | ||
| 10 | <li><a class="el" href="classDevMemPatt.html">DevMemPatt</a> (Searching the kernel) | ||
| 11 | <li><a class="el" href="classPatch.html">Patch</a> (Representation of a kernel patch) | ||
| 12 | <li><a class="el" href="classrwKernel.html">rwKernel</a> (Wrapper around kernel memory access) | ||
| 13 | <li><a class="el" href="classSymbolFingp.html">SymbolFingp</a> (Class to hold fingerprints of a function (a [kernel-]symbol)) | ||
| 14 | <li><a class="el" href="classSymbolTable.html">SymbolTable</a> (A container class for "on-demand" symbol address fetching) | ||
| 15 | <li><a class="el" href="classSystemMap.html">SystemMap</a> (Representation of a System.map file) | ||
| 16 | </ul> | ||
| 17 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 18 | <a href="http://www.doxygen.org/index.html"> | ||
| 19 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 20 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 21 | © 1997-2001</small></address> | ||
| 22 | </body> | ||
| 23 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/arch_8hpp-source.html b/other/Kermit/doc/API_doc/html/arch_8hpp-source.html new file mode 100644 index 0000000..dc30330 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/arch_8hpp-source.html | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>arch.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>arch.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/* </font> | ||
| 10 | 00002 <font class="comment"> * maybe used for porting ...</font> | ||
| 11 | 00003 <font class="comment"> * (ignore this file.)</font> | ||
| 12 | 00004 <font class="comment"> */</font> | ||
| 13 | 00005 <font class="preprocessor">#ifdef __ALWAYS_UNDEFINED</font> | ||
| 14 | 00006 <font class="preprocessor"></font>template <class Ad_t, bool BE, unsigned short A> | ||
| 15 | 00007 <font class="keyword">class </font>Architecture | ||
| 16 | 00008 { | ||
| 17 | 00009 <font class="keyword">private</font>: | ||
| 18 | 00010 le_replace (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *, AddressType); | ||
| 19 | 00011 be_replace (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *, AddressType); | ||
| 20 | 00012 | ||
| 21 | 00013 <font class="keyword">public</font>: | ||
| 22 | 00014 <font class="keyword">typedef</font> Ad_t AddressType; <font class="comment">/* type capable for holding a memory address as integer */</font> | ||
| 23 | 00015 <font class="keywordtype">bool</font> BigEndian; <font class="comment">/* true if machine uses big endian */</font> | ||
| 24 | 00016 <font class="keywordtype">unsigned</font> <font class="keywordtype">short</font> Align; <font class="comment">/* data alignment - needed? (sanity checks) */</font> | ||
| 25 | 00017 | ||
| 26 | 00018 Architecture ()<font class="keyword"></font> | ||
| 27 | 00019 <font class="keyword"> </font>{ | ||
| 28 | 00020 BigEndian = BE; | ||
| 29 | 00021 Align = A; | ||
| 30 | 00022 } | ||
| 31 | 00023 | ||
| 32 | 00024 replaceAddress (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *, AddressType); | ||
| 33 | 00025 }; | ||
| 34 | 00026 | ||
| 35 | 00027 | ||
| 36 | 00028 Architecture<unsigned int, false, 4> x86; | ||
| 37 | 00029 <font class="comment">// ...</font> | ||
| 38 | 00030 | ||
| 39 | 00031 <font class="preprocessor">#define x86 this_arch;</font> | ||
| 40 | 00032 <font class="preprocessor"></font><font class="preprocessor">#endif</font> | ||
| 41 | </font></pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 42 | <a href="http://www.doxygen.org/index.html"> | ||
| 43 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 44 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 45 | © 1997-2001</small></address> | ||
| 46 | </body> | ||
| 47 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classDevMemPatt-members.html b/other/Kermit/doc/API_doc/html/classDevMemPatt-members.html new file mode 100644 index 0000000..7b377bd --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classDevMemPatt-members.html | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>DevMemPatt Member List</h1>This is the complete list of members for <a class="el" href="classDevMemPatt.html">DevMemPatt</a>, including all inherited members.<ul> | ||
| 10 | <li><b>compare_data_snippet</b>(unsigned char *, struct sfp *) (defined in <a class="el" href="classDevMemPatt.html">DevMemPatt</a>)<code> [private]</code><li><a class="el" href="classDevMemPatt.html#a0">DevMemPatt</a>(rwKernel *) | ||
| 11 | <li><a class="el" href="classDevMemPatt.html#a1">DevMemPatt</a>() | ||
| 12 | <li><a class="el" href="classDevMemPatt.html#a3">find_patt</a>(unsigned int start, unsigned int end,\unsigned short len, unsigned char *data) | ||
| 13 | <li><a class="el" href="classDevMemPatt.html#a4">find_patt</a>(struct sfp *a) | ||
| 14 | <li><b>rw</b> (defined in <a class="el" href="classDevMemPatt.html">DevMemPatt</a>)<code> [private]</code><li><a class="el" href="classDevMemPatt.html#a2">~DevMemPatt</a>() | ||
| 15 | </ul> | ||
| 16 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 17 | <a href="http://www.doxygen.org/index.html"> | ||
| 18 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 19 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 20 | © 1997-2001</small></address> | ||
| 21 | </body> | ||
| 22 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classDevMemPatt.html b/other/Kermit/doc/API_doc/html/classDevMemPatt.html new file mode 100644 index 0000000..5dfc733 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classDevMemPatt.html | |||
| @@ -0,0 +1,266 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>DevMemPatt class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>DevMemPatt Class Reference</h1>Searching the kernel. | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="DevMemPatt_8hpp-source.html">DevMemPatt.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classDevMemPatt-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classDevMemPatt.html#a0">DevMemPatt</a> (<a class="el" href="classrwKernel.html">rwKernel</a> *)</td></tr> | ||
| 17 | <tr><td> </td><td><font size=-1><em>This constructor will initialize the object with a reference to a <a class="el" href="classrwKernel.html">rwKernel</a> object.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> | ||
| 18 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classDevMemPatt.html#a1">DevMemPatt</a> ()</td></tr> | ||
| 19 | <tr><td> </td><td><font size=-1><em>Another constructor.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> | ||
| 20 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classDevMemPatt.html#a2">~DevMemPatt</a> ()</td></tr> | ||
| 21 | <tr><td> </td><td><font size=-1><em>Destruct DevMemPatt object.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> | ||
| 22 | <tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classDevMemPatt.html#a3">find_patt</a> (unsigned int start, unsigned int end,\unsigned short len, unsigned char *data)</td></tr> | ||
| 23 | <tr><td> </td><td><font size=-1><em>Find a data string in kernel memory.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> | ||
| 24 | <tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classDevMemPatt.html#a4">find_patt</a> (struct sfp *a)</td></tr> | ||
| 25 | <tr><td> </td><td><font size=-1><em>Find a data pattern in kernel memory.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> | ||
| 26 | </table> | ||
| 27 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 28 | Searching the kernel. | ||
| 29 | <p> | ||
| 30 | This class helps you by seaching for patterns in kernel memory. Each function has a, more or less, unique structure. There is nothing to wonder about this: each function is for solving a different task. If the function, or parts of it, are know it can be found without any further knowledge about it. | ||
| 31 | <p> | ||
| 32 | <hr><h2>Constructor & Destructor Documentation</h2> | ||
| 33 | <a name="a0" doxytag="DevMemPatt::DevMemPatt"></a><p> | ||
| 34 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 35 | <tr> | ||
| 36 | <td class="md"> | ||
| 37 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 38 | <tr> | ||
| 39 | <td class="md" nowrap valign="top"> | ||
| 40 | DevMemPatt::DevMemPatt | ||
| 41 | </td> | ||
| 42 | <td class="md">( </td> | ||
| 43 | <td class="md"><a class="el" href="classrwKernel.html">rwKernel</a> * </td> | ||
| 44 | <td class="mdname"> </td> | ||
| 45 | <td class="md">) </td> | ||
| 46 | <td class="md"> </td> | ||
| 47 | </tr> | ||
| 48 | |||
| 49 | </table> | ||
| 50 | </td> | ||
| 51 | </tr> | ||
| 52 | </table> | ||
| 53 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 54 | <tr> | ||
| 55 | <td> | ||
| 56 | | ||
| 57 | </td> | ||
| 58 | <td> | ||
| 59 | |||
| 60 | <p> | ||
| 61 | This constructor will initialize the object with a reference to a <a class="el" href="classrwKernel.html">rwKernel</a> object. | ||
| 62 | <p> | ||
| 63 | <dl compact><dt> | ||
| 64 | <b>See also: </b><dd> | ||
| 65 | <a class="el" href="classrwKernel.html">rwKernel</a> </dl> </td> | ||
| 66 | </tr> | ||
| 67 | </table> | ||
| 68 | <a name="a1" doxytag="DevMemPatt::DevMemPatt"></a><p> | ||
| 69 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 70 | <tr> | ||
| 71 | <td class="md"> | ||
| 72 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 73 | <tr> | ||
| 74 | <td class="md" nowrap valign="top"> | ||
| 75 | DevMemPatt::DevMemPatt | ||
| 76 | </td> | ||
| 77 | <td class="md">( </td> | ||
| 78 | <td class="mdname"> </td> | ||
| 79 | <td class="md">) </td> | ||
| 80 | <td class="md"> </td> | ||
| 81 | </tr> | ||
| 82 | |||
| 83 | </table> | ||
| 84 | </td> | ||
| 85 | </tr> | ||
| 86 | </table> | ||
| 87 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 88 | <tr> | ||
| 89 | <td> | ||
| 90 | | ||
| 91 | </td> | ||
| 92 | <td> | ||
| 93 | |||
| 94 | <p> | ||
| 95 | Another constructor. | ||
| 96 | <p> | ||
| 97 | This one will generate a new <a class="el" href="classrwKernel.html">rwKernel</a> object. </td> | ||
| 98 | </tr> | ||
| 99 | </table> | ||
| 100 | <a name="a2" doxytag="DevMemPatt::~DevMemPatt"></a><p> | ||
| 101 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 102 | <tr> | ||
| 103 | <td class="md"> | ||
| 104 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 105 | <tr> | ||
| 106 | <td class="md" nowrap valign="top"> | ||
| 107 | DevMemPatt::~DevMemPatt | ||
| 108 | </td> | ||
| 109 | <td class="md">( </td> | ||
| 110 | <td class="mdname"> </td> | ||
| 111 | <td class="md">) </td> | ||
| 112 | <td class="md"> </td> | ||
| 113 | </tr> | ||
| 114 | |||
| 115 | </table> | ||
| 116 | </td> | ||
| 117 | </tr> | ||
| 118 | </table> | ||
| 119 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 120 | <tr> | ||
| 121 | <td> | ||
| 122 | | ||
| 123 | </td> | ||
| 124 | <td> | ||
| 125 | |||
| 126 | <p> | ||
| 127 | Destruct DevMemPatt object. | ||
| 128 | <p> | ||
| 129 | Local <a class="el" href="classrwKernel.html">rwKernel</a> object will not be deleted. </td> | ||
| 130 | </tr> | ||
| 131 | </table> | ||
| 132 | <hr><h2>Member Function Documentation</h2> | ||
| 133 | <a name="a4" doxytag="DevMemPatt::find_patt"></a><p> | ||
| 134 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 135 | <tr> | ||
| 136 | <td class="md"> | ||
| 137 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 138 | <tr> | ||
| 139 | <td class="md" nowrap valign="top"> | ||
| 140 | unsigned int DevMemPatt::find_patt | ||
| 141 | </td> | ||
| 142 | <td class="md">( </td> | ||
| 143 | <td class="md">struct sfp * </td> | ||
| 144 | <td class="mdname"> <em>a</em> </td> | ||
| 145 | <td class="md">) </td> | ||
| 146 | <td class="md"> </td> | ||
| 147 | </tr> | ||
| 148 | |||
| 149 | </table> | ||
| 150 | </td> | ||
| 151 | </tr> | ||
| 152 | </table> | ||
| 153 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 154 | <tr> | ||
| 155 | <td> | ||
| 156 | | ||
| 157 | </td> | ||
| 158 | <td> | ||
| 159 | |||
| 160 | <p> | ||
| 161 | Find a data pattern in kernel memory. | ||
| 162 | <p> | ||
| 163 | <dl compact><dt> | ||
| 164 | Parameters: <dd> | ||
| 165 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 166 | <tr><td valign=top><em>a | ||
| 167 | </em> </td><td> | ||
| 168 | search a data pattern defined by a. </td></tr> | ||
| 169 | </table> | ||
| 170 | </dl><dl compact><dt> | ||
| 171 | <b>Returns: </b><dd> | ||
| 172 | the address of the first byte of the searched pattern or zero if it was not found. </dl><dl compact><dt> | ||
| 173 | <b>See also: </b><dd> | ||
| 174 | <a class="el" href="classSymbolFingp.html">SymbolFingp</a> </dl> </td> | ||
| 175 | </tr> | ||
| 176 | </table> | ||
| 177 | <a name="a3" doxytag="DevMemPatt::find_patt"></a><p> | ||
| 178 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 179 | <tr> | ||
| 180 | <td class="md"> | ||
| 181 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 182 | <tr> | ||
| 183 | <td class="md" nowrap valign="top"> | ||
| 184 | unsigned int DevMemPatt::find_patt | ||
| 185 | </td> | ||
| 186 | <td class="md">( </td> | ||
| 187 | <td class="md">unsigned int </td> | ||
| 188 | <td class="mdname"> <em>start</em>, </td> | ||
| 189 | </tr> | ||
| 190 | <tr> | ||
| 191 | <td></td> | ||
| 192 | <td></td> | ||
| 193 | <td class="md"> <tr> | ||
| 194 | <td></td> | ||
| 195 | <td></td> | ||
| 196 | <td class="md">unsigned int </td> | ||
| 197 | <td class="mdname"> <em>end</em>, </td> | ||
| 198 | </tr> | ||
| 199 | <tr> | ||
| 200 | <td></td> | ||
| 201 | <td></td> | ||
| 202 | <td class="md"> <tr> | ||
| 203 | <td></td> | ||
| 204 | <td></td> | ||
| 205 | <td class="md">\unsigned short </td> | ||
| 206 | <td class="mdname"> <em>len</em>, </td> | ||
| 207 | </tr> | ||
| 208 | <tr> | ||
| 209 | <td></td> | ||
| 210 | <td></td> | ||
| 211 | <td class="md"> <tr> | ||
| 212 | <td></td> | ||
| 213 | <td></td> | ||
| 214 | <td class="md">unsigned char * </td> | ||
| 215 | <td class="mdname"> <em>data</em> </td> | ||
| 216 | </tr> | ||
| 217 | <tr> | ||
| 218 | <td></td> | ||
| 219 | <td class="md">) </td> | ||
| 220 | <td class="md" colspan="2"> </td> | ||
| 221 | </tr> | ||
| 222 | |||
| 223 | </table> | ||
| 224 | </td> | ||
| 225 | </tr> | ||
| 226 | </table> | ||
| 227 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 228 | <tr> | ||
| 229 | <td> | ||
| 230 | | ||
| 231 | </td> | ||
| 232 | <td> | ||
| 233 | |||
| 234 | <p> | ||
| 235 | Find a data string in kernel memory. | ||
| 236 | <p> | ||
| 237 | <dl compact><dt> | ||
| 238 | Parameters: <dd> | ||
| 239 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 240 | <tr><td valign=top><em>start | ||
| 241 | </em> </td><td> | ||
| 242 | start address of the search. </td></tr> | ||
| 243 | <tr><td valign=top><em>end | ||
| 244 | </em> </td><td> | ||
| 245 | the search will go upto this address in kernel memory. </td></tr> | ||
| 246 | <tr><td valign=top><em>length | ||
| 247 | </em> </td><td> | ||
| 248 | the length of the data. </td></tr> | ||
| 249 | <tr><td valign=top><em>data | ||
| 250 | </em> </td><td> | ||
| 251 | the data searched for. </td></tr> | ||
| 252 | </table> | ||
| 253 | </dl><dl compact><dt> | ||
| 254 | <b>Returns: </b><dd> | ||
| 255 | the address of the first byte of the searched data or zero if it was not found. </dl> </td> | ||
| 256 | </tr> | ||
| 257 | </table> | ||
| 258 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 259 | <li><a class="el" href="DevMemPatt_8hpp-source.html">DevMemPatt.hpp</a></ul> | ||
| 260 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 261 | <a href="http://www.doxygen.org/index.html"> | ||
| 262 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 263 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 264 | © 1997-2001</small></address> | ||
| 265 | </body> | ||
| 266 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classPatch-members.html b/other/Kermit/doc/API_doc/html/classPatch-members.html new file mode 100644 index 0000000..90e8aed --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classPatch-members.html | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Patch Member List</h1>This is the complete list of members for <a class="el" href="classPatch.html">Patch</a>, including all inherited members.<ul> | ||
| 10 | <li><b>address</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a18">apply</a>(rwKernel *) | ||
| 11 | <li><a class="el" href="classPatch.html#a19">apply</a>() | ||
| 12 | <li><b>back_data</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>data</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>data2string</b>(unsigned char *) (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a21">dump</a>(string file) | ||
| 13 | <li><a class="el" href="classPatch.html#a17">getData</a>() | ||
| 14 | <li><a class="el" href="classPatch.html#a7">getPatchAsString</a>() | ||
| 15 | <li><a class="el" href="classPatch.html#a13">getState</a>() | ||
| 16 | <li><a class="el" href="classPatch.html#a6">initFromString</a>(string) | ||
| 17 | <li><b>initObjects</b>(unsigned char *, unsigned short, unsigned int, rwKernel *) (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a10">isApplied</a>() | ||
| 18 | <li><a class="el" href="classPatch.html#a12">isClean</a>() | ||
| 19 | <li><a class="el" href="classPatch.html#a11">isFailed</a>() | ||
| 20 | <li><a class="el" href="classPatch.html#a9">isLinked</a>() | ||
| 21 | <li><b>len</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a20">link</a>(Addr2AddrList *) | ||
| 22 | <li><b>local_rw</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#l1">operator<<</a>(ostream &, Patch &) | ||
| 23 | <code> [friend]</code><li><a class="el" href="classPatch.html#l0">operator>></a>(istream &, Patch &) | ||
| 24 | <code> [friend]</code><li><b>overwr</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>parse</b>(string) (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a0">Patch</a>() | ||
| 25 | <li><a class="el" href="classPatch.html#a1">Patch</a>(unsigned char *data, unsigned short len, unsigned int addr) | ||
| 26 | <li><a class="el" href="classPatch.html#a2">Patch</a>(unsigned char *data, unsigned short len, unsigned int addr, rwKernel *x) | ||
| 27 | <li><a class="el" href="classPatch.html#a3">Patch</a>(string) | ||
| 28 | <li><a class="el" href="classPatch.html#a4">Patch</a>(string, rwKernel *) | ||
| 29 | <li><a class="el" href="classPatch.html#a15">remove</a>() | ||
| 30 | <li><a class="el" href="classPatch.html#a16">remove</a>(rwKernel *) | ||
| 31 | <li><a class="el" href="classPatch.html#a14">restore</a>() | ||
| 32 | <li><b>state</b> (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>state2string</b>() (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>string2data</b>(string, unsigned char *) (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><b>string2state</b>(string) (defined in <a class="el" href="classPatch.html">Patch</a>)<code> [private]</code><li><a class="el" href="classPatch.html#a8">wasChanged</a>() | ||
| 33 | <li><a class="el" href="classPatch.html#a5">~Patch</a>() | ||
| 34 | </ul> | ||
| 35 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 36 | <a href="http://www.doxygen.org/index.html"> | ||
| 37 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 38 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 39 | © 1997-2001</small></address> | ||
| 40 | </body> | ||
| 41 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classPatch.html b/other/Kermit/doc/API_doc/html/classPatch.html new file mode 100644 index 0000000..2a00c9e --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classPatch.html | |||
| @@ -0,0 +1,670 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Patch class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Patch Class Reference</h1>Representation of a kernel patch. | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="Patch_8hpp-source.html">Patch.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classPatch-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top><a name="a0" doxytag="Patch::Patch"></a> | ||
| 17 | </td><td valign=bottom><a class="el" href="classPatch.html#a0">Patch</a> ()</td></tr> | ||
| 18 | <tr><td> </td><td><font size=-1><em>Create, but init nothing.</em></font><br><br></td></tr> | ||
| 19 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPatch.html#a1">Patch</a> (unsigned char *data, unsigned short len, unsigned int addr)</td></tr> | ||
| 20 | <tr><td> </td><td><font size=-1><em>Create a patch with supplied data.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> | ||
| 21 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPatch.html#a2">Patch</a> (unsigned char *data, unsigned short len, unsigned int addr, <a class="el" href="classrwKernel.html">rwKernel</a> *x)</td></tr> | ||
| 22 | <tr><td> </td><td><font size=-1><em>Create a patch with supplied data.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> | ||
| 23 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPatch.html#a3">Patch</a> (string)</td></tr> | ||
| 24 | <tr><td> </td><td><font size=-1><em>Initialize the object from a string as created by dump ().</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> | ||
| 25 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPatch.html#a4">Patch</a> (string, <a class="el" href="classrwKernel.html">rwKernel</a> *)</td></tr> | ||
| 26 | <tr><td> </td><td><font size=-1><em>Initialize the object from a string as created by dump ().</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> | ||
| 27 | <tr><td nowrap align=right valign=top><a name="a5" doxytag="Patch::~Patch"></a> | ||
| 28 | </td><td valign=bottom><a class="el" href="classPatch.html#a5">~Patch</a> ()</td></tr> | ||
| 29 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 30 | <tr><td nowrap align=right valign=top><a name="a6" doxytag="Patch::initFromString"></a> | ||
| 31 | void </td><td valign=bottom><a class="el" href="classPatch.html#a6">initFromString</a> (string)</td></tr> | ||
| 32 | <tr><td> </td><td><font size=-1><em>init object from a string.</em></font><br><br></td></tr> | ||
| 33 | <tr><td nowrap align=right valign=top><a name="a7" doxytag="Patch::getPatchAsString"></a> | ||
| 34 | string </td><td valign=bottom><a class="el" href="classPatch.html#a7">getPatchAsString</a> ()</td></tr> | ||
| 35 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 36 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPatch.html#a8">wasChanged</a> ()</td></tr> | ||
| 37 | <tr><td> </td><td><font size=-1><em>tells you if the patch data was modified.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr> | ||
| 38 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPatch.html#a9">isLinked</a> ()</td></tr> | ||
| 39 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPatch.html#a10">isApplied</a> ()</td></tr> | ||
| 40 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPatch.html#a11">isFailed</a> ()</td></tr> | ||
| 41 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPatch.html#a12">isClean</a> ()</td></tr> | ||
| 42 | <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classPatch.html#a13">getState</a> ()</td></tr> | ||
| 43 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPatch.html#a14">restore</a> ()</td></tr> | ||
| 44 | <tr><td> </td><td><font size=-1><em>Restore patch data.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr> | ||
| 45 | <tr><td nowrap align=right valign=top><a name="a15" doxytag="Patch::remove"></a> | ||
| 46 | bool </td><td valign=bottom><a class="el" href="classPatch.html#a15">remove</a> ()</td></tr> | ||
| 47 | <tr><td> </td><td><font size=-1><em>Remove applied Patch (Undo changes done to memory).</em></font><br><br></td></tr> | ||
| 48 | <tr><td nowrap align=right valign=top><a name="a16" doxytag="Patch::remove"></a> | ||
| 49 | bool </td><td valign=bottom><a class="el" href="classPatch.html#a16">remove</a> (<a class="el" href="classrwKernel.html">rwKernel</a> *)</td></tr> | ||
| 50 | <tr><td> </td><td><font size=-1><em>Remove applied Patch (Undo changes done to memory).</em></font><br><br></td></tr> | ||
| 51 | <tr><td nowrap align=right valign=top><a name="a17" doxytag="Patch::getData"></a> | ||
| 52 | unsigned char * </td><td valign=bottom><a class="el" href="classPatch.html#a17">getData</a> ()</td></tr> | ||
| 53 | <tr><td> </td><td><font size=-1><em>Get a pointer to patch data.</em></font><br><br></td></tr> | ||
| 54 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPatch.html#a18">apply</a> (<a class="el" href="classrwKernel.html">rwKernel</a> *)</td></tr> | ||
| 55 | <tr><td> </td><td><font size=-1><em>Apply the patch to the kernel.</em> <a href="#a18">More...</a><em></em></font><br><br></td></tr> | ||
| 56 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPatch.html#a19">apply</a> ()</td></tr> | ||
| 57 | <tr><td> </td><td><font size=-1><em>Apply the patch to the kernel.</em> <a href="#a19">More...</a><em></em></font><br><br></td></tr> | ||
| 58 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPatch.html#a20">link</a> (Addr2AddrList *)</td></tr> | ||
| 59 | <tr><td> </td><td><font size=-1><em>link the patch with the kernel.</em> <a href="#a20">More...</a><em></em></font><br><br></td></tr> | ||
| 60 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPatch.html#a21">dump</a> (string file)</td></tr> | ||
| 61 | <tr><td> </td><td><font size=-1><em>Dump patch information into a file.</em> <a href="#a21">More...</a><em></em></font><br><br></td></tr> | ||
| 62 | <tr><td colspan=2><br><h2>Friends</h2></td></tr> | ||
| 63 | <tr><td nowrap align=right valign=top><a name="l0" doxytag="Patch::operator>>"></a> | ||
| 64 | istream & </td><td valign=bottom><a class="el" href="classPatch.html#l0">operator>></a> (istream &, Patch &)</td></tr> | ||
| 65 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 66 | <tr><td nowrap align=right valign=top><a name="l1" doxytag="Patch::operator<<"></a> | ||
| 67 | ostream & </td><td valign=bottom><a class="el" href="classPatch.html#l1">operator<<</a> (ostream &, Patch &)</td></tr> | ||
| 68 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 69 | </table> | ||
| 70 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 71 | Representation of a kernel patch. | ||
| 72 | <p> | ||
| 73 | A Patch is a amount of data, which is to be written to a given address. Patching means modification of kernel memory. Therefore, the data, which will be overwritten, is saved (before writting). Additionally the status of the Patch is tracked. Thus, you are able to undo, reapply and debug patches. The states a Patch must be in are: CLEAN (the patch was never touched) LINKED (it was linked without an error) APPLIED (it was applied without an error) LFAILED (linking failed) AFAILED (applying failed) | ||
| 74 | <p> | ||
| 75 | <hr><h2>Constructor & Destructor Documentation</h2> | ||
| 76 | <a name="a1" doxytag="Patch::Patch"></a><p> | ||
| 77 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 78 | <tr> | ||
| 79 | <td class="md"> | ||
| 80 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 81 | <tr> | ||
| 82 | <td class="md" nowrap valign="top"> | ||
| 83 | Patch::Patch | ||
| 84 | </td> | ||
| 85 | <td class="md">( </td> | ||
| 86 | <td class="md">unsigned char * </td> | ||
| 87 | <td class="mdname"> <em>data</em>, </td> | ||
| 88 | </tr> | ||
| 89 | <tr> | ||
| 90 | <td></td> | ||
| 91 | <td></td> | ||
| 92 | <td class="md"> <tr> | ||
| 93 | <td></td> | ||
| 94 | <td></td> | ||
| 95 | <td class="md">unsigned short </td> | ||
| 96 | <td class="mdname"> <em>len</em>, </td> | ||
| 97 | </tr> | ||
| 98 | <tr> | ||
| 99 | <td></td> | ||
| 100 | <td></td> | ||
| 101 | <td class="md"> <tr> | ||
| 102 | <td></td> | ||
| 103 | <td></td> | ||
| 104 | <td class="md">unsigned int </td> | ||
| 105 | <td class="mdname"> <em>addr</em> </td> | ||
| 106 | </tr> | ||
| 107 | <tr> | ||
| 108 | <td></td> | ||
| 109 | <td class="md">) </td> | ||
| 110 | <td class="md" colspan="2"> </td> | ||
| 111 | </tr> | ||
| 112 | |||
| 113 | </table> | ||
| 114 | </td> | ||
| 115 | </tr> | ||
| 116 | </table> | ||
| 117 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 118 | <tr> | ||
| 119 | <td> | ||
| 120 | | ||
| 121 | </td> | ||
| 122 | <td> | ||
| 123 | |||
| 124 | <p> | ||
| 125 | Create a patch with supplied data. | ||
| 126 | <p> | ||
| 127 | <dl compact><dt> | ||
| 128 | Parameters: <dd> | ||
| 129 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 130 | <tr><td valign=top><em>data | ||
| 131 | </em> </td><td> | ||
| 132 | patch data. </td></tr> | ||
| 133 | <tr><td valign=top><em>len | ||
| 134 | </em> </td><td> | ||
| 135 | length of patch data. </td></tr> | ||
| 136 | <tr><td valign=top><em>addr | ||
| 137 | </em> </td><td> | ||
| 138 | memory address to where the data shall be written. </td></tr> | ||
| 139 | </table> | ||
| 140 | </dl> </td> | ||
| 141 | </tr> | ||
| 142 | </table> | ||
| 143 | <a name="a2" doxytag="Patch::Patch"></a><p> | ||
| 144 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 145 | <tr> | ||
| 146 | <td class="md"> | ||
| 147 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 148 | <tr> | ||
| 149 | <td class="md" nowrap valign="top"> | ||
| 150 | Patch::Patch | ||
| 151 | </td> | ||
| 152 | <td class="md">( </td> | ||
| 153 | <td class="md">unsigned char * </td> | ||
| 154 | <td class="mdname"> <em>data</em>, </td> | ||
| 155 | </tr> | ||
| 156 | <tr> | ||
| 157 | <td></td> | ||
| 158 | <td></td> | ||
| 159 | <td class="md"> <tr> | ||
| 160 | <td></td> | ||
| 161 | <td></td> | ||
| 162 | <td class="md">unsigned short </td> | ||
| 163 | <td class="mdname"> <em>len</em>, </td> | ||
| 164 | </tr> | ||
| 165 | <tr> | ||
| 166 | <td></td> | ||
| 167 | <td></td> | ||
| 168 | <td class="md"> <tr> | ||
| 169 | <td></td> | ||
| 170 | <td></td> | ||
| 171 | <td class="md">unsigned int </td> | ||
| 172 | <td class="mdname"> <em>addr</em>, </td> | ||
| 173 | </tr> | ||
| 174 | <tr> | ||
| 175 | <td></td> | ||
| 176 | <td></td> | ||
| 177 | <td class="md"> <tr> | ||
| 178 | <td></td> | ||
| 179 | <td></td> | ||
| 180 | <td class="md"><a class="el" href="classrwKernel.html">rwKernel</a> * </td> | ||
| 181 | <td class="mdname"> <em>x</em> </td> | ||
| 182 | </tr> | ||
| 183 | <tr> | ||
| 184 | <td></td> | ||
| 185 | <td class="md">) </td> | ||
| 186 | <td class="md" colspan="2"> </td> | ||
| 187 | </tr> | ||
| 188 | |||
| 189 | </table> | ||
| 190 | </td> | ||
| 191 | </tr> | ||
| 192 | </table> | ||
| 193 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 194 | <tr> | ||
| 195 | <td> | ||
| 196 | | ||
| 197 | </td> | ||
| 198 | <td> | ||
| 199 | |||
| 200 | <p> | ||
| 201 | Create a patch with supplied data. | ||
| 202 | <p> | ||
| 203 | This constructor, compared with the above, will set a local reference to a <a class="el" href="classrwKernel.html">rwKernel</a> object. <dl compact><dt> | ||
| 204 | Parameters: <dd> | ||
| 205 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 206 | <tr><td valign=top><em>x | ||
| 207 | </em> </td><td> | ||
| 208 | pointer to a <a class="el" href="classrwKernel.html">rwKernel</a> object. </td></tr> | ||
| 209 | </table> | ||
| 210 | </dl> </td> | ||
| 211 | </tr> | ||
| 212 | </table> | ||
| 213 | <a name="a3" doxytag="Patch::Patch"></a><p> | ||
| 214 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 215 | <tr> | ||
| 216 | <td class="md"> | ||
| 217 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 218 | <tr> | ||
| 219 | <td class="md" nowrap valign="top"> | ||
| 220 | Patch::Patch | ||
| 221 | </td> | ||
| 222 | <td class="md">( </td> | ||
| 223 | <td class="md">string </td> | ||
| 224 | <td class="mdname"> </td> | ||
| 225 | <td class="md">) </td> | ||
| 226 | <td class="md"> </td> | ||
| 227 | </tr> | ||
| 228 | |||
| 229 | </table> | ||
| 230 | </td> | ||
| 231 | </tr> | ||
| 232 | </table> | ||
| 233 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 234 | <tr> | ||
| 235 | <td> | ||
| 236 | | ||
| 237 | </td> | ||
| 238 | <td> | ||
| 239 | |||
| 240 | <p> | ||
| 241 | Initialize the object from a string as created by dump (). | ||
| 242 | <p> | ||
| 243 | <dl compact><dt> | ||
| 244 | <b>See also: </b><dd> | ||
| 245 | <a class="el" href="classPatch.html#a21">dump</a>() </dl> </td> | ||
| 246 | </tr> | ||
| 247 | </table> | ||
| 248 | <a name="a4" doxytag="Patch::Patch"></a><p> | ||
| 249 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 250 | <tr> | ||
| 251 | <td class="md"> | ||
| 252 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 253 | <tr> | ||
| 254 | <td class="md" nowrap valign="top"> | ||
| 255 | Patch::Patch | ||
| 256 | </td> | ||
| 257 | <td class="md">( </td> | ||
| 258 | <td class="md">string </td> | ||
| 259 | <td class="mdname">, </td> | ||
| 260 | </tr> | ||
| 261 | <tr> | ||
| 262 | <td></td> | ||
| 263 | <td></td> | ||
| 264 | <td class="md"> <tr> | ||
| 265 | <td></td> | ||
| 266 | <td></td> | ||
| 267 | <td class="md"><a class="el" href="classrwKernel.html">rwKernel</a> * </td> | ||
| 268 | <td class="mdname"> </td> | ||
| 269 | </tr> | ||
| 270 | <tr> | ||
| 271 | <td></td> | ||
| 272 | <td class="md">) </td> | ||
| 273 | <td class="md" colspan="2"> </td> | ||
| 274 | </tr> | ||
| 275 | |||
| 276 | </table> | ||
| 277 | </td> | ||
| 278 | </tr> | ||
| 279 | </table> | ||
| 280 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 281 | <tr> | ||
| 282 | <td> | ||
| 283 | | ||
| 284 | </td> | ||
| 285 | <td> | ||
| 286 | |||
| 287 | <p> | ||
| 288 | Initialize the object from a string as created by dump (). | ||
| 289 | <p> | ||
| 290 | <dl compact><dt> | ||
| 291 | <b>See also: </b><dd> | ||
| 292 | <a class="el" href="classPatch.html#a21">dump</a>() </dl> </td> | ||
| 293 | </tr> | ||
| 294 | </table> | ||
| 295 | <hr><h2>Member Function Documentation</h2> | ||
| 296 | <a name="a19" doxytag="Patch::apply"></a><p> | ||
| 297 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 298 | <tr> | ||
| 299 | <td class="md"> | ||
| 300 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 301 | <tr> | ||
| 302 | <td class="md" nowrap valign="top"> | ||
| 303 | void Patch::apply | ||
| 304 | </td> | ||
| 305 | <td class="md">( </td> | ||
| 306 | <td class="mdname"> </td> | ||
| 307 | <td class="md">) </td> | ||
| 308 | <td class="md"> </td> | ||
| 309 | </tr> | ||
| 310 | |||
| 311 | </table> | ||
| 312 | </td> | ||
| 313 | </tr> | ||
| 314 | </table> | ||
| 315 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 316 | <tr> | ||
| 317 | <td> | ||
| 318 | | ||
| 319 | </td> | ||
| 320 | <td> | ||
| 321 | |||
| 322 | <p> | ||
| 323 | Apply the patch to the kernel. | ||
| 324 | <p> | ||
| 325 | Use this apply method if you supplied a reference to a <a class="el" href="classrwKernel.html">rwKernel</a> object at creation time. </td> | ||
| 326 | </tr> | ||
| 327 | </table> | ||
| 328 | <a name="a18" doxytag="Patch::apply"></a><p> | ||
| 329 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 330 | <tr> | ||
| 331 | <td class="md"> | ||
| 332 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 333 | <tr> | ||
| 334 | <td class="md" nowrap valign="top"> | ||
| 335 | void Patch::apply | ||
| 336 | </td> | ||
| 337 | <td class="md">( </td> | ||
| 338 | <td class="md"><a class="el" href="classrwKernel.html">rwKernel</a> * </td> | ||
| 339 | <td class="mdname"> </td> | ||
| 340 | <td class="md">) </td> | ||
| 341 | <td class="md"> </td> | ||
| 342 | </tr> | ||
| 343 | |||
| 344 | </table> | ||
| 345 | </td> | ||
| 346 | </tr> | ||
| 347 | </table> | ||
| 348 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 349 | <tr> | ||
| 350 | <td> | ||
| 351 | | ||
| 352 | </td> | ||
| 353 | <td> | ||
| 354 | |||
| 355 | <p> | ||
| 356 | Apply the patch to the kernel. | ||
| 357 | <p> | ||
| 358 | Effectivly write the patch data to the supplied address. The method allows you to supply a a reference to a <a class="el" href="classrwKernel.html">rwKernel</a> object. you can supply on construction of the patch. However, there might be none at that time. </td> | ||
| 359 | </tr> | ||
| 360 | </table> | ||
| 361 | <a name="a21" doxytag="Patch::dump"></a><p> | ||
| 362 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 363 | <tr> | ||
| 364 | <td class="md"> | ||
| 365 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 366 | <tr> | ||
| 367 | <td class="md" nowrap valign="top"> | ||
| 368 | void Patch::dump | ||
| 369 | </td> | ||
| 370 | <td class="md">( </td> | ||
| 371 | <td class="md">string </td> | ||
| 372 | <td class="mdname"> <em>file</em> </td> | ||
| 373 | <td class="md">) </td> | ||
| 374 | <td class="md"> </td> | ||
| 375 | </tr> | ||
| 376 | |||
| 377 | </table> | ||
| 378 | </td> | ||
| 379 | </tr> | ||
| 380 | </table> | ||
| 381 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 382 | <tr> | ||
| 383 | <td> | ||
| 384 | | ||
| 385 | </td> | ||
| 386 | <td> | ||
| 387 | |||
| 388 | <p> | ||
| 389 | Dump patch information into a file. | ||
| 390 | <p> | ||
| 391 | This will produce human readable output. It can be used e.g. for restoring and debugging. Because the output is line based and can be used to initialize a Patch object you are effecitvely able to reproduce patching sessions. <dl compact><dt> | ||
| 392 | <b>See also: </b><dd> | ||
| 393 | <a class="el" href="classPatch.html#a3">Patch</a>(string) </dl><dl compact><dt> | ||
| 394 | Parameters: <dd> | ||
| 395 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 396 | <tr><td valign=top><em>file | ||
| 397 | </em> </td><td> | ||
| 398 | filename. </td></tr> | ||
| 399 | </table> | ||
| 400 | </dl> </td> | ||
| 401 | </tr> | ||
| 402 | </table> | ||
| 403 | <a name="a13" doxytag="Patch::getState"></a><p> | ||
| 404 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 405 | <tr> | ||
| 406 | <td class="md"> | ||
| 407 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 408 | <tr> | ||
| 409 | <td class="md" nowrap valign="top"> | ||
| 410 | int Patch::getState | ||
| 411 | </td> | ||
| 412 | <td class="md">( </td> | ||
| 413 | <td class="mdname"> </td> | ||
| 414 | <td class="md">) </td> | ||
| 415 | <td class="md"> </td> | ||
| 416 | </tr> | ||
| 417 | |||
| 418 | </table> | ||
| 419 | </td> | ||
| 420 | </tr> | ||
| 421 | </table> | ||
| 422 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 423 | <tr> | ||
| 424 | <td> | ||
| 425 | | ||
| 426 | </td> | ||
| 427 | <td> | ||
| 428 | |||
| 429 | <p> | ||
| 430 | <dl compact><dt> | ||
| 431 | <b>Returns: </b><dd> | ||
| 432 | the status. </dl> </td> | ||
| 433 | </tr> | ||
| 434 | </table> | ||
| 435 | <a name="a10" doxytag="Patch::isApplied"></a><p> | ||
| 436 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 437 | <tr> | ||
| 438 | <td class="md"> | ||
| 439 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 440 | <tr> | ||
| 441 | <td class="md" nowrap valign="top"> | ||
| 442 | bool Patch::isApplied | ||
| 443 | </td> | ||
| 444 | <td class="md">( </td> | ||
| 445 | <td class="mdname"> </td> | ||
| 446 | <td class="md">) </td> | ||
| 447 | <td class="md"> </td> | ||
| 448 | </tr> | ||
| 449 | |||
| 450 | </table> | ||
| 451 | </td> | ||
| 452 | </tr> | ||
| 453 | </table> | ||
| 454 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 455 | <tr> | ||
| 456 | <td> | ||
| 457 | | ||
| 458 | </td> | ||
| 459 | <td> | ||
| 460 | |||
| 461 | <p> | ||
| 462 | <dl compact><dt> | ||
| 463 | <b>Returns: </b><dd> | ||
| 464 | true if the applying was successful. </dl> </td> | ||
| 465 | </tr> | ||
| 466 | </table> | ||
| 467 | <a name="a12" doxytag="Patch::isClean"></a><p> | ||
| 468 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 469 | <tr> | ||
| 470 | <td class="md"> | ||
| 471 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 472 | <tr> | ||
| 473 | <td class="md" nowrap valign="top"> | ||
| 474 | bool Patch::isClean | ||
| 475 | </td> | ||
| 476 | <td class="md">( </td> | ||
| 477 | <td class="mdname"> </td> | ||
| 478 | <td class="md">) </td> | ||
| 479 | <td class="md"> </td> | ||
| 480 | </tr> | ||
| 481 | |||
| 482 | </table> | ||
| 483 | </td> | ||
| 484 | </tr> | ||
| 485 | </table> | ||
| 486 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 487 | <tr> | ||
| 488 | <td> | ||
| 489 | | ||
| 490 | </td> | ||
| 491 | <td> | ||
| 492 | |||
| 493 | <p> | ||
| 494 | <dl compact><dt> | ||
| 495 | <b>Returns: </b><dd> | ||
| 496 | true if the patch was not touched. </dl> </td> | ||
| 497 | </tr> | ||
| 498 | </table> | ||
| 499 | <a name="a11" doxytag="Patch::isFailed"></a><p> | ||
| 500 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 501 | <tr> | ||
| 502 | <td class="md"> | ||
| 503 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 504 | <tr> | ||
| 505 | <td class="md" nowrap valign="top"> | ||
| 506 | bool Patch::isFailed | ||
| 507 | </td> | ||
| 508 | <td class="md">( </td> | ||
| 509 | <td class="mdname"> </td> | ||
| 510 | <td class="md">) </td> | ||
| 511 | <td class="md"> </td> | ||
| 512 | </tr> | ||
| 513 | |||
| 514 | </table> | ||
| 515 | </td> | ||
| 516 | </tr> | ||
| 517 | </table> | ||
| 518 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 519 | <tr> | ||
| 520 | <td> | ||
| 521 | | ||
| 522 | </td> | ||
| 523 | <td> | ||
| 524 | |||
| 525 | <p> | ||
| 526 | <dl compact><dt> | ||
| 527 | <b>Returns: </b><dd> | ||
| 528 | true if linking or applying failed. </dl> </td> | ||
| 529 | </tr> | ||
| 530 | </table> | ||
| 531 | <a name="a9" doxytag="Patch::isLinked"></a><p> | ||
| 532 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 533 | <tr> | ||
| 534 | <td class="md"> | ||
| 535 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 536 | <tr> | ||
| 537 | <td class="md" nowrap valign="top"> | ||
| 538 | bool Patch::isLinked | ||
| 539 | </td> | ||
| 540 | <td class="md">( </td> | ||
| 541 | <td class="mdname"> </td> | ||
| 542 | <td class="md">) </td> | ||
| 543 | <td class="md"> </td> | ||
| 544 | </tr> | ||
| 545 | |||
| 546 | </table> | ||
| 547 | </td> | ||
| 548 | </tr> | ||
| 549 | </table> | ||
| 550 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 551 | <tr> | ||
| 552 | <td> | ||
| 553 | | ||
| 554 | </td> | ||
| 555 | <td> | ||
| 556 | |||
| 557 | <p> | ||
| 558 | <dl compact><dt> | ||
| 559 | <b>Returns: </b><dd> | ||
| 560 | true if the linking returned no error messages. </dl> </td> | ||
| 561 | </tr> | ||
| 562 | </table> | ||
| 563 | <a name="a20" doxytag="Patch::link"></a><p> | ||
| 564 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 565 | <tr> | ||
| 566 | <td class="md"> | ||
| 567 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 568 | <tr> | ||
| 569 | <td class="md" nowrap valign="top"> | ||
| 570 | void Patch::link | ||
| 571 | </td> | ||
| 572 | <td class="md">( </td> | ||
| 573 | <td class="md">Addr2AddrList * </td> | ||
| 574 | <td class="mdname"> </td> | ||
| 575 | <td class="md">) </td> | ||
| 576 | <td class="md"> </td> | ||
| 577 | </tr> | ||
| 578 | |||
| 579 | </table> | ||
| 580 | </td> | ||
| 581 | </tr> | ||
| 582 | </table> | ||
| 583 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 584 | <tr> | ||
| 585 | <td> | ||
| 586 | | ||
| 587 | </td> | ||
| 588 | <td> | ||
| 589 | |||
| 590 | <p> | ||
| 591 | link the patch with the kernel. | ||
| 592 | <p> | ||
| 593 | Replace all placeholders with real addresses. </td> | ||
| 594 | </tr> | ||
| 595 | </table> | ||
| 596 | <a name="a14" doxytag="Patch::restore"></a><p> | ||
| 597 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 598 | <tr> | ||
| 599 | <td class="md"> | ||
| 600 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 601 | <tr> | ||
| 602 | <td class="md" nowrap valign="top"> | ||
| 603 | void Patch::restore | ||
| 604 | </td> | ||
| 605 | <td class="md">( </td> | ||
| 606 | <td class="mdname"> </td> | ||
| 607 | <td class="md">) </td> | ||
| 608 | <td class="md"> </td> | ||
| 609 | </tr> | ||
| 610 | |||
| 611 | </table> | ||
| 612 | </td> | ||
| 613 | </tr> | ||
| 614 | </table> | ||
| 615 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 616 | <tr> | ||
| 617 | <td> | ||
| 618 | | ||
| 619 | </td> | ||
| 620 | <td> | ||
| 621 | |||
| 622 | <p> | ||
| 623 | Restore patch data. | ||
| 624 | <p> | ||
| 625 | Might be helpful if linking failed. </td> | ||
| 626 | </tr> | ||
| 627 | </table> | ||
| 628 | <a name="a8" doxytag="Patch::wasChanged"></a><p> | ||
| 629 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 630 | <tr> | ||
| 631 | <td class="md"> | ||
| 632 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 633 | <tr> | ||
| 634 | <td class="md" nowrap valign="top"> | ||
| 635 | bool Patch::wasChanged | ||
| 636 | </td> | ||
| 637 | <td class="md">( </td> | ||
| 638 | <td class="mdname"> </td> | ||
| 639 | <td class="md">) </td> | ||
| 640 | <td class="md"> </td> | ||
| 641 | </tr> | ||
| 642 | |||
| 643 | </table> | ||
| 644 | </td> | ||
| 645 | </tr> | ||
| 646 | </table> | ||
| 647 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 648 | <tr> | ||
| 649 | <td> | ||
| 650 | | ||
| 651 | </td> | ||
| 652 | <td> | ||
| 653 | |||
| 654 | <p> | ||
| 655 | tells you if the patch data was modified. | ||
| 656 | <p> | ||
| 657 | (e.g. by linking). <dl compact><dt> | ||
| 658 | <b>Returns: </b><dd> | ||
| 659 | true if backup data and data differ. </dl> </td> | ||
| 660 | </tr> | ||
| 661 | </table> | ||
| 662 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 663 | <li><a class="el" href="Patch_8hpp-source.html">Patch.hpp</a></ul> | ||
| 664 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 665 | <a href="http://www.doxygen.org/index.html"> | ||
| 666 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 667 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 668 | © 1997-2001</small></address> | ||
| 669 | </body> | ||
| 670 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSymbolFingp-members.html b/other/Kermit/doc/API_doc/html/classSymbolFingp-members.html new file mode 100644 index 0000000..c4c6fea --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSymbolFingp-members.html | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolFingp Member List</h1>This is the complete list of members for <a class="el" href="classSymbolFingp.html">SymbolFingp</a>, including all inherited members.<ul> | ||
| 10 | <li><b>addFinger</b>(struct sfp *) (defined in <a class="el" href="classSymbolFingp.html">SymbolFingp</a>)<code> [private]</code><li><b>Fingers</b> (defined in <a class="el" href="classSymbolFingp.html">SymbolFingp</a>)<code> [private]</code><li><b>FingerThing</b> typedef (defined in <a class="el" href="classSymbolFingp.html">SymbolFingp</a>)<code> [private]</code><li><a class="el" href="classSymbolFingp.html#a3">getFinger</a>(string) | ||
| 11 | <li><b>readFingers</b>(ifstream) (defined in <a class="el" href="classSymbolFingp.html">SymbolFingp</a>)<code> [private]</code><li><a class="el" href="classSymbolFingp.html#a0">SymbolFingp</a>() | ||
| 12 | <li><a class="el" href="classSymbolFingp.html#a1">SymbolFingp</a>(string) | ||
| 13 | <li><a class="el" href="classSymbolFingp.html#a2">~SymbolFingp</a>() | ||
| 14 | </ul> | ||
| 15 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 16 | <a href="http://www.doxygen.org/index.html"> | ||
| 17 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 18 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 19 | © 1997-2001</small></address> | ||
| 20 | </body> | ||
| 21 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSymbolFingp.html b/other/Kermit/doc/API_doc/html/classSymbolFingp.html new file mode 100644 index 0000000..7b2a4de --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSymbolFingp.html | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SymbolFingp class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolFingp Class Reference</h1>class to hold fingerprints of a function (a [kernel-]symbol). | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="SymbolFingp_8hpp-source.html">SymbolFingp.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classSymbolFingp-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top><a name="a0" doxytag="SymbolFingp::SymbolFingp"></a> | ||
| 17 | </td><td valign=bottom><a class="el" href="classSymbolFingp.html#a0">SymbolFingp</a> ()</td></tr> | ||
| 18 | <tr><td> </td><td><font size=-1><em>Reads configuration from default file.</em></font><br><br></td></tr> | ||
| 19 | <tr><td nowrap align=right valign=top><a name="a1" doxytag="SymbolFingp::SymbolFingp"></a> | ||
| 20 | </td><td valign=bottom><a class="el" href="classSymbolFingp.html#a1">SymbolFingp</a> (string)</td></tr> | ||
| 21 | <tr><td> </td><td><font size=-1><em>Reads configuration from specified file.</em></font><br><br></td></tr> | ||
| 22 | <tr><td nowrap align=right valign=top><a name="a2" doxytag="SymbolFingp::~SymbolFingp"></a> | ||
| 23 | </td><td valign=bottom><a class="el" href="classSymbolFingp.html#a2">~SymbolFingp</a> ()</td></tr> | ||
| 24 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 25 | <tr><td nowrap align=right valign=top><a name="a3" doxytag="SymbolFingp::getFinger"></a> | ||
| 26 | sfp * </td><td valign=bottom><a class="el" href="classSymbolFingp.html#a3">getFinger</a> (string)</td></tr> | ||
| 27 | <tr><td> </td><td><font size=-1><em>Return the Fingerprint matching the supplied name.</em></font><br><br></td></tr> | ||
| 28 | </table> | ||
| 29 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 30 | class to hold fingerprints of a function (a [kernel-]symbol). | ||
| 31 | <p> | ||
| 32 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 33 | <li><a class="el" href="SymbolFingp_8hpp-source.html">SymbolFingp.hpp</a></ul> | ||
| 34 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 35 | <a href="http://www.doxygen.org/index.html"> | ||
| 36 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 37 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 38 | © 1997-2001</small></address> | ||
| 39 | </body> | ||
| 40 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSymbolTable-members.html b/other/Kermit/doc/API_doc/html/classSymbolTable-members.html new file mode 100644 index 0000000..0f9438e --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSymbolTable-members.html | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolTable Member List</h1>This is the complete list of members for <a class="el" href="classSymbolTable.html">SymbolTable</a>, including all inherited members.<ul> | ||
| 10 | <li><a class="el" href="classSymbolTable.html#a7">addSymbolToCache</a>(string, unsigned int) | ||
| 11 | <li><a class="el" href="classSymbolTable.html#a8">clearCache</a>() | ||
| 12 | <li><b>createObjects</b>(rwKernel *) (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><b>dump_file</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><b>exported</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><a class="el" href="classSymbolTable.html#a6">findSymbol</a>(string) | ||
| 13 | <li><b>fing</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><a class="el" href="classSymbolTable.html#a5">getSymbol</a>(string) | ||
| 14 | <li><b>loadFiles</b>(string, string) (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><b>mapp</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><b>patt</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><b>rest</b> (defined in <a class="el" href="classSymbolTable.html">SymbolTable</a>)<code> [private]</code><li><a class="el" href="classSymbolTable.html#a9">saveCache</a>() | ||
| 15 | <li><a class="el" href="classSymbolTable.html#a4">setSaveFile</a>(string) | ||
| 16 | <li><a class="el" href="classSymbolTable.html#a0">SymbolTable</a>() | ||
| 17 | <li><a class="el" href="classSymbolTable.html#a1">SymbolTable</a>(string res, string sys) | ||
| 18 | <li><a class="el" href="classSymbolTable.html#a2">SymbolTable</a>(rwKernel *) | ||
| 19 | <li><a class="el" href="classSymbolTable.html#m0">symList</a> | ||
| 20 | <li><a class="el" href="classSymbolTable.html#a3">~SymbolTable</a>() | ||
| 21 | </ul> | ||
| 22 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 23 | <a href="http://www.doxygen.org/index.html"> | ||
| 24 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 25 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 26 | © 1997-2001</small></address> | ||
| 27 | </body> | ||
| 28 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSymbolTable.html b/other/Kermit/doc/API_doc/html/classSymbolTable.html new file mode 100644 index 0000000..3acabae --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSymbolTable.html | |||
| @@ -0,0 +1,220 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SymbolTable class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SymbolTable Class Reference</h1>A container class for "on-demand" symbol address fetching. | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="SymbolTable_8hpp-source.html">SymbolTable.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classSymbolTable-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top><a name="a0" doxytag="SymbolTable::SymbolTable"></a> | ||
| 17 | </td><td valign=bottom><a class="el" href="classSymbolTable.html#a0">SymbolTable</a> ()</td></tr> | ||
| 18 | <tr><td> </td><td><font size=-1><em>Construct a SymbolTable object and load configuration from default files.</em></font><br><br></td></tr> | ||
| 19 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classSymbolTable.html#a1">SymbolTable</a> (string res, string sys)</td></tr> | ||
| 20 | <tr><td> </td><td><font size=-1><em>Construct a SymbolTable object and load configuration from defined files.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> | ||
| 21 | <tr><td nowrap align=right valign=top><a name="a2" doxytag="SymbolTable::SymbolTable"></a> | ||
| 22 | </td><td valign=bottom><a class="el" href="classSymbolTable.html#a2">SymbolTable</a> (<a class="el" href="classrwKernel.html">rwKernel</a> *)</td></tr> | ||
| 23 | <tr><td> </td><td><font size=-1><em>Construct a SymbolTable object and use the referenced <a class="el" href="classrwKernel.html">rwKernel</a> object in all member attributes and methods.</em></font><br><br></td></tr> | ||
| 24 | <tr><td nowrap align=right valign=top><a name="a3" doxytag="SymbolTable::~SymbolTable"></a> | ||
| 25 | </td><td valign=bottom><a class="el" href="classSymbolTable.html#a3">~SymbolTable</a> ()</td></tr> | ||
| 26 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 27 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classSymbolTable.html#a4">setSaveFile</a> (string)</td></tr> | ||
| 28 | <tr><td> </td><td><font size=-1><em>Define the file written to on saveCache ().</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> | ||
| 29 | <tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classSymbolTable.html#a5">getSymbol</a> (string)</td></tr> | ||
| 30 | <tr><td> </td><td><font size=-1><em>get the address of a known symbol.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> | ||
| 31 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classSymbolTable.html#a6">findSymbol</a> (string)</td></tr> | ||
| 32 | <tr><td> </td><td><font size=-1><em>Find a symbol.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr> | ||
| 33 | <tr><td nowrap align=right valign=top><a name="a7" doxytag="SymbolTable::addSymbolToCache"></a> | ||
| 34 | void </td><td valign=bottom><a class="el" href="classSymbolTable.html#a7">addSymbolToCache</a> (string, unsigned int)</td></tr> | ||
| 35 | <tr><td> </td><td><font size=-1><em>add a symbol, address pair to the cache.</em></font><br><br></td></tr> | ||
| 36 | <tr><td nowrap align=right valign=top><a name="a8" doxytag="SymbolTable::clearCache"></a> | ||
| 37 | void </td><td valign=bottom><a class="el" href="classSymbolTable.html#a8">clearCache</a> ()</td></tr> | ||
| 38 | <tr><td> </td><td><font size=-1><em>flush the address cache.</em></font><br><br></td></tr> | ||
| 39 | <tr><td nowrap align=right valign=top><a name="a9" doxytag="SymbolTable::saveCache"></a> | ||
| 40 | bool </td><td valign=bottom><a class="el" href="classSymbolTable.html#a9">saveCache</a> ()</td></tr> | ||
| 41 | <tr><td> </td><td><font size=-1><em>save the cache to a file (human readable, System.map style).</em></font><br><br></td></tr> | ||
| 42 | <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr> | ||
| 43 | <tr><td nowrap align=right valign=top><a name="m0" doxytag="SymbolTable::symList"></a> | ||
| 44 | zzSymList </td><td valign=bottom><a class="el" href="classSymbolTable.html#m0">symList</a></td></tr> | ||
| 45 | <tr><td> </td><td><font size=-1><em>List of name, address pairs.</em></font><br><br></td></tr> | ||
| 46 | </table> | ||
| 47 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 48 | A container class for "on-demand" symbol address fetching. | ||
| 49 | <p> | ||
| 50 | <hr><h2>Constructor & Destructor Documentation</h2> | ||
| 51 | <a name="a1" doxytag="SymbolTable::SymbolTable"></a><p> | ||
| 52 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 53 | <tr> | ||
| 54 | <td class="md"> | ||
| 55 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 56 | <tr> | ||
| 57 | <td class="md" nowrap valign="top"> | ||
| 58 | SymbolTable::SymbolTable | ||
| 59 | </td> | ||
| 60 | <td class="md">( </td> | ||
| 61 | <td class="md">string </td> | ||
| 62 | <td class="mdname"> <em>res</em>, </td> | ||
| 63 | </tr> | ||
| 64 | <tr> | ||
| 65 | <td></td> | ||
| 66 | <td></td> | ||
| 67 | <td class="md"> <tr> | ||
| 68 | <td></td> | ||
| 69 | <td></td> | ||
| 70 | <td class="md">string </td> | ||
| 71 | <td class="mdname"> <em>sys</em> </td> | ||
| 72 | </tr> | ||
| 73 | <tr> | ||
| 74 | <td></td> | ||
| 75 | <td class="md">) </td> | ||
| 76 | <td class="md" colspan="2"> </td> | ||
| 77 | </tr> | ||
| 78 | |||
| 79 | </table> | ||
| 80 | </td> | ||
| 81 | </tr> | ||
| 82 | </table> | ||
| 83 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 84 | <tr> | ||
| 85 | <td> | ||
| 86 | | ||
| 87 | </td> | ||
| 88 | <td> | ||
| 89 | |||
| 90 | <p> | ||
| 91 | Construct a SymbolTable object and load configuration from defined files. | ||
| 92 | <p> | ||
| 93 | <dl compact><dt> | ||
| 94 | Parameters: <dd> | ||
| 95 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 96 | <tr><td valign=top><em>res | ||
| 97 | </em> </td><td> | ||
| 98 | file name of restore file. </td></tr> | ||
| 99 | <tr><td valign=top><em>sys | ||
| 100 | </em> </td><td> | ||
| 101 | System.map file to load. </td></tr> | ||
| 102 | </table> | ||
| 103 | </dl> </td> | ||
| 104 | </tr> | ||
| 105 | </table> | ||
| 106 | <hr><h2>Member Function Documentation</h2> | ||
| 107 | <a name="a6" doxytag="SymbolTable::findSymbol"></a><p> | ||
| 108 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 109 | <tr> | ||
| 110 | <td class="md"> | ||
| 111 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 112 | <tr> | ||
| 113 | <td class="md" nowrap valign="top"> | ||
| 114 | bool SymbolTable::findSymbol | ||
| 115 | </td> | ||
| 116 | <td class="md">( </td> | ||
| 117 | <td class="md">string </td> | ||
| 118 | <td class="mdname"> </td> | ||
| 119 | <td class="md">) </td> | ||
| 120 | <td class="md"> </td> | ||
| 121 | </tr> | ||
| 122 | |||
| 123 | </table> | ||
| 124 | </td> | ||
| 125 | </tr> | ||
| 126 | </table> | ||
| 127 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 128 | <tr> | ||
| 129 | <td> | ||
| 130 | | ||
| 131 | </td> | ||
| 132 | <td> | ||
| 133 | |||
| 134 | <p> | ||
| 135 | Find a symbol. | ||
| 136 | <p> | ||
| 137 | This will try all available methods to find a symbol and cache the address, name pair (zero if search was not successfull). <dl compact><dt> | ||
| 138 | <b>Returns: </b><dd> | ||
| 139 | true on success. </dl> </td> | ||
| 140 | </tr> | ||
| 141 | </table> | ||
| 142 | <a name="a5" doxytag="SymbolTable::getSymbol"></a><p> | ||
| 143 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 144 | <tr> | ||
| 145 | <td class="md"> | ||
| 146 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 147 | <tr> | ||
| 148 | <td class="md" nowrap valign="top"> | ||
| 149 | unsigned int SymbolTable::getSymbol | ||
| 150 | </td> | ||
| 151 | <td class="md">( </td> | ||
| 152 | <td class="md">string </td> | ||
| 153 | <td class="mdname"> </td> | ||
| 154 | <td class="md">) </td> | ||
| 155 | <td class="md"> </td> | ||
| 156 | </tr> | ||
| 157 | |||
| 158 | </table> | ||
| 159 | </td> | ||
| 160 | </tr> | ||
| 161 | </table> | ||
| 162 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 163 | <tr> | ||
| 164 | <td> | ||
| 165 | | ||
| 166 | </td> | ||
| 167 | <td> | ||
| 168 | |||
| 169 | <p> | ||
| 170 | get the address of a known symbol. | ||
| 171 | <p> | ||
| 172 | <dl compact><dt> | ||
| 173 | <b>Returns: </b><dd> | ||
| 174 | If the symbol is unknow zero is returned. (hey, would you call 0x00000000?). Else, the address of the symbol. </dl> </td> | ||
| 175 | </tr> | ||
| 176 | </table> | ||
| 177 | <a name="a4" doxytag="SymbolTable::setSaveFile"></a><p> | ||
| 178 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 179 | <tr> | ||
| 180 | <td class="md"> | ||
| 181 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 182 | <tr> | ||
| 183 | <td class="md" nowrap valign="top"> | ||
| 184 | void SymbolTable::setSaveFile | ||
| 185 | </td> | ||
| 186 | <td class="md">( </td> | ||
| 187 | <td class="md">string </td> | ||
| 188 | <td class="mdname"> </td> | ||
| 189 | <td class="md">) </td> | ||
| 190 | <td class="md"> </td> | ||
| 191 | </tr> | ||
| 192 | |||
| 193 | </table> | ||
| 194 | </td> | ||
| 195 | </tr> | ||
| 196 | </table> | ||
| 197 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 198 | <tr> | ||
| 199 | <td> | ||
| 200 | | ||
| 201 | </td> | ||
| 202 | <td> | ||
| 203 | |||
| 204 | <p> | ||
| 205 | Define the file written to on saveCache (). | ||
| 206 | <p> | ||
| 207 | <dl compact><dt> | ||
| 208 | <b>See also: </b><dd> | ||
| 209 | <a class="el" href="classSymbolTable.html#a9">saveCache</a>() </dl> </td> | ||
| 210 | </tr> | ||
| 211 | </table> | ||
| 212 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 213 | <li><a class="el" href="SymbolTable_8hpp-source.html">SymbolTable.hpp</a></ul> | ||
| 214 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 215 | <a href="http://www.doxygen.org/index.html"> | ||
| 216 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 217 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 218 | © 1997-2001</small></address> | ||
| 219 | </body> | ||
| 220 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSystemMap-members.html b/other/Kermit/doc/API_doc/html/classSystemMap-members.html new file mode 100644 index 0000000..088a4de --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSystemMap-members.html | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SystemMap Member List</h1>This is the complete list of members for <a class="el" href="classSystemMap.html">SystemMap</a>, including all inherited members.<ul> | ||
| 10 | <li><a class="el" href="classSystemMap.html#a4">add</a>(string name, unsigned int address) | ||
| 11 | <li><b>add_map</b> (defined in <a class="el" href="classSystemMap.html">SystemMap</a>)<code> [private]</code><li><b>bla_val</b> typedef (defined in <a class="el" href="classSystemMap.html">SystemMap</a>)<code> [private]</code><li><b>blamap</b> typedef (defined in <a class="el" href="classSystemMap.html">SystemMap</a>)<code> [private]</code><li><a class="el" href="classSystemMap.html#a3">contains</a>(string) | ||
| 12 | <li><a class="el" href="classSystemMap.html#a5">operator[]</a>(string name) | ||
| 13 | <li><a class="el" href="classSystemMap.html#a0">SystemMap</a>(string file) | ||
| 14 | <li><a class="el" href="classSystemMap.html#a1">SystemMap</a>() | ||
| 15 | <li><a class="el" href="classSystemMap.html#a2">~SystemMap</a>() | ||
| 16 | </ul> | ||
| 17 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 18 | <a href="http://www.doxygen.org/index.html"> | ||
| 19 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 20 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 21 | © 1997-2001</small></address> | ||
| 22 | </body> | ||
| 23 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classSystemMap.html b/other/Kermit/doc/API_doc/html/classSystemMap.html new file mode 100644 index 0000000..1442b5d --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classSystemMap.html | |||
| @@ -0,0 +1,178 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>SystemMap class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>SystemMap Class Reference</h1>Representation of a System.map file. | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="SystemMap_8hpp-source.html">SystemMap.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classSystemMap-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top><a name="a0" doxytag="SystemMap::SystemMap"></a> | ||
| 17 | </td><td valign=bottom><a class="el" href="classSystemMap.html#a0">SystemMap</a> (string file)</td></tr> | ||
| 18 | <tr><td> </td><td><font size=-1><em>Create a SystemMap object and read symbol names and addresses from a file.</em></font><br><br></td></tr> | ||
| 19 | <tr><td nowrap align=right valign=top><a name="a1" doxytag="SystemMap::SystemMap"></a> | ||
| 20 | </td><td valign=bottom><a class="el" href="classSystemMap.html#a1">SystemMap</a> ()</td></tr> | ||
| 21 | <tr><td> </td><td><font size=-1><em>Create a SystemMap object and leave it empty.</em></font><br><br></td></tr> | ||
| 22 | <tr><td nowrap align=right valign=top><a name="a2" doxytag="SystemMap::~SystemMap"></a> | ||
| 23 | </td><td valign=bottom><a class="el" href="classSystemMap.html#a2">~SystemMap</a> ()</td></tr> | ||
| 24 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 25 | <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classSystemMap.html#a3">contains</a> (string)</td></tr> | ||
| 26 | <tr><td> </td><td><font size=-1><em>Check if a symbol (by name) is part of the object.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> | ||
| 27 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classSystemMap.html#a4">add</a> (string name, unsigned int address)</td></tr> | ||
| 28 | <tr><td> </td><td><font size=-1><em>Add a name, address pair to the object.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> | ||
| 29 | <tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classSystemMap.html#a5">operator[]</a> (string name)</td></tr> | ||
| 30 | <tr><td> </td><td><font size=-1><em>Random access operator for accessing elements in the form x = <name>[<symbol>].</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> | ||
| 31 | </table> | ||
| 32 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 33 | Representation of a System.map file. | ||
| 34 | <p> | ||
| 35 | It maps names to addresses. | ||
| 36 | <p> | ||
| 37 | <hr><h2>Member Function Documentation</h2> | ||
| 38 | <a name="a4" doxytag="SystemMap::add"></a><p> | ||
| 39 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 40 | <tr> | ||
| 41 | <td class="md"> | ||
| 42 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 43 | <tr> | ||
| 44 | <td class="md" nowrap valign="top"> | ||
| 45 | void SystemMap::add | ||
| 46 | </td> | ||
| 47 | <td class="md">( </td> | ||
| 48 | <td class="md">string </td> | ||
| 49 | <td class="mdname"> <em>name</em>, </td> | ||
| 50 | </tr> | ||
| 51 | <tr> | ||
| 52 | <td></td> | ||
| 53 | <td></td> | ||
| 54 | <td class="md"> <tr> | ||
| 55 | <td></td> | ||
| 56 | <td></td> | ||
| 57 | <td class="md">unsigned int </td> | ||
| 58 | <td class="mdname"> <em>address</em> </td> | ||
| 59 | </tr> | ||
| 60 | <tr> | ||
| 61 | <td></td> | ||
| 62 | <td class="md">) </td> | ||
| 63 | <td class="md" colspan="2"> </td> | ||
| 64 | </tr> | ||
| 65 | |||
| 66 | </table> | ||
| 67 | </td> | ||
| 68 | </tr> | ||
| 69 | </table> | ||
| 70 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 71 | <tr> | ||
| 72 | <td> | ||
| 73 | | ||
| 74 | </td> | ||
| 75 | <td> | ||
| 76 | |||
| 77 | <p> | ||
| 78 | Add a name, address pair to the object. | ||
| 79 | <p> | ||
| 80 | <dl compact><dt> | ||
| 81 | Parameters: <dd> | ||
| 82 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 83 | <tr><td valign=top><em>name | ||
| 84 | </em> </td><td> | ||
| 85 | Symbolname. If a symbol with this name already exists it will not be added. </td></tr> | ||
| 86 | <tr><td valign=top><em>address | ||
| 87 | </em> </td><td> | ||
| 88 | the address of the symbol. </td></tr> | ||
| 89 | </table> | ||
| 90 | </dl> </td> | ||
| 91 | </tr> | ||
| 92 | </table> | ||
| 93 | <a name="a3" doxytag="SystemMap::contains"></a><p> | ||
| 94 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 95 | <tr> | ||
| 96 | <td class="md"> | ||
| 97 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 98 | <tr> | ||
| 99 | <td class="md" nowrap valign="top"> | ||
| 100 | bool SystemMap::contains | ||
| 101 | </td> | ||
| 102 | <td class="md">( </td> | ||
| 103 | <td class="md">string </td> | ||
| 104 | <td class="mdname"> </td> | ||
| 105 | <td class="md">) </td> | ||
| 106 | <td class="md"> </td> | ||
| 107 | </tr> | ||
| 108 | |||
| 109 | </table> | ||
| 110 | </td> | ||
| 111 | </tr> | ||
| 112 | </table> | ||
| 113 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 114 | <tr> | ||
| 115 | <td> | ||
| 116 | | ||
| 117 | </td> | ||
| 118 | <td> | ||
| 119 | |||
| 120 | <p> | ||
| 121 | Check if a symbol (by name) is part of the object. | ||
| 122 | <p> | ||
| 123 | <dl compact><dt> | ||
| 124 | <b>Returns: </b><dd> | ||
| 125 | true if the questioned symbol is part of the object (else false). </dl> </td> | ||
| 126 | </tr> | ||
| 127 | </table> | ||
| 128 | <a name="a5" doxytag="SystemMap::operator[]"></a><p> | ||
| 129 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 130 | <tr> | ||
| 131 | <td class="md"> | ||
| 132 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 133 | <tr> | ||
| 134 | <td class="md" nowrap valign="top"> | ||
| 135 | unsigned int SystemMap::operator[] | ||
| 136 | </td> | ||
| 137 | <td class="md">( </td> | ||
| 138 | <td class="md">string </td> | ||
| 139 | <td class="mdname"> <em>name</em> </td> | ||
| 140 | <td class="md">) </td> | ||
| 141 | <td class="md"> </td> | ||
| 142 | </tr> | ||
| 143 | |||
| 144 | </table> | ||
| 145 | </td> | ||
| 146 | </tr> | ||
| 147 | </table> | ||
| 148 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 149 | <tr> | ||
| 150 | <td> | ||
| 151 | | ||
| 152 | </td> | ||
| 153 | <td> | ||
| 154 | |||
| 155 | <p> | ||
| 156 | Random access operator for accessing elements in the form x = <name>[<symbol>]. | ||
| 157 | <p> | ||
| 158 | <dl compact><dt> | ||
| 159 | Parameters: <dd> | ||
| 160 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 161 | <tr><td valign=top><em>name | ||
| 162 | </em> </td><td> | ||
| 163 | of a symbol. </td></tr> | ||
| 164 | </table> | ||
| 165 | </dl><dl compact><dt> | ||
| 166 | <b>Returns: </b><dd> | ||
| 167 | the address of symbol name. </dl> </td> | ||
| 168 | </tr> | ||
| 169 | </table> | ||
| 170 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 171 | <li><a class="el" href="SystemMap_8hpp-source.html">SystemMap.hpp</a></ul> | ||
| 172 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 173 | <a href="http://www.doxygen.org/index.html"> | ||
| 174 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 175 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 176 | © 1997-2001</small></address> | ||
| 177 | </body> | ||
| 178 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classrwKernel-members.html b/other/Kermit/doc/API_doc/html/classrwKernel-members.html new file mode 100644 index 0000000..f6abd81 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classrwKernel-members.html | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Member List</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>rwKernel Member List</h1>This is the complete list of members for <a class="el" href="classrwKernel.html">rwKernel</a>, including all inherited members.<ul> | ||
| 10 | <li><b>closeFile</b>() (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><b>fd</b> (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><b>mem_conf</b> (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><b>openFile</b>(int) (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><a class="el" href="classrwKernel.html#a3">read</a>(unsigned char *dest, unsigned int len, unsigned int addr) | ||
| 11 | <li><a class="el" href="classrwKernel.html#a5">read</a>(char *a, unsigned int b, unsigned int c) | ||
| 12 | <code> [inline]</code><li><a class="el" href="classrwKernel.html#a0">rwKernel</a>() | ||
| 13 | <li><a class="el" href="classrwKernel.html#a1">rwKernel</a>(int file, int offset) | ||
| 14 | <li><b>setOffset</b>(int) (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><b>which</b> (defined in <a class="el" href="classrwKernel.html">rwKernel</a>)<code> [private]</code><li><a class="el" href="classrwKernel.html#a4">write</a>(unsigned char *src, unsigned int len, unsigned int addr) | ||
| 15 | <li><a class="el" href="classrwKernel.html#a6">write</a>(char *a, unsigned int b, unsigned int c) | ||
| 16 | <code> [inline]</code><li><a class="el" href="classrwKernel.html#a2">~rwKernel</a>() | ||
| 17 | </ul> | ||
| 18 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 19 | <a href="http://www.doxygen.org/index.html"> | ||
| 20 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 21 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 22 | © 1997-2001</small></address> | ||
| 23 | </body> | ||
| 24 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/classrwKernel.html b/other/Kermit/doc/API_doc/html/classrwKernel.html new file mode 100644 index 0000000..193536a --- /dev/null +++ b/other/Kermit/doc/API_doc/html/classrwKernel.html | |||
| @@ -0,0 +1,301 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>rwKernel class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>rwKernel Class Reference</h1>Wrapper around kernel memory access. | ||
| 10 | <a href="#_details">More...</a> | ||
| 11 | <p> | ||
| 12 | <code>#include <<a class="el" href="rwKernel_8hpp-source.html">rwKernel.hpp</a>></code> | ||
| 13 | <p> | ||
| 14 | <a href="classrwKernel-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> | ||
| 15 | <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> | ||
| 16 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classrwKernel.html#a0">rwKernel</a> ()</td></tr> | ||
| 17 | <tr><td> </td><td><font size=-1><em>Create the object with a fairly standard configuration.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> | ||
| 18 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classrwKernel.html#a1">rwKernel</a> (int file, int offset)</td></tr> | ||
| 19 | <tr><td> </td><td><font size=-1><em>Create a rwKernel object with the defined parameters.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> | ||
| 20 | <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classrwKernel.html#a2">~rwKernel</a> ()</td></tr> | ||
| 21 | <tr><td> </td><td><font size=-1><em>Destructor.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> | ||
| 22 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classrwKernel.html#a3">read</a> (unsigned char *dest, unsigned int len, unsigned int addr)</td></tr> | ||
| 23 | <tr><td> </td><td><font size=-1><em>read from kernel.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> | ||
| 24 | <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classrwKernel.html#a4">write</a> (unsigned char *src, unsigned int len, unsigned int addr)</td></tr> | ||
| 25 | <tr><td> </td><td><font size=-1><em>write to kernel.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> | ||
| 26 | <tr><td nowrap align=right valign=top><a name="a5" doxytag="rwKernel::read"></a> | ||
| 27 | void </td><td valign=bottom><a class="el" href="classrwKernel.html#a5">read</a> (char *a, unsigned int b, unsigned int c)</td></tr> | ||
| 28 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 29 | <tr><td nowrap align=right valign=top><a name="a6" doxytag="rwKernel::write"></a> | ||
| 30 | void </td><td valign=bottom><a class="el" href="classrwKernel.html#a6">write</a> (char *a, unsigned int b, unsigned int c)</td></tr> | ||
| 31 | <tr><td> </td><td><font size=-1><em>Foo.</em></font><br><br></td></tr> | ||
| 32 | </table> | ||
| 33 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 34 | Wrapper around kernel memory access. | ||
| 35 | <p> | ||
| 36 | It lets you read from and write to the kernel without taking care of offsets or file access. | ||
| 37 | <p> | ||
| 38 | <hr><h2>Constructor & Destructor Documentation</h2> | ||
| 39 | <a name="a0" doxytag="rwKernel::rwKernel"></a><p> | ||
| 40 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 41 | <tr> | ||
| 42 | <td class="md"> | ||
| 43 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 44 | <tr> | ||
| 45 | <td class="md" nowrap valign="top"> | ||
| 46 | rwKernel::rwKernel | ||
| 47 | </td> | ||
| 48 | <td class="md">( </td> | ||
| 49 | <td class="mdname"> </td> | ||
| 50 | <td class="md">) </td> | ||
| 51 | <td class="md"> </td> | ||
| 52 | </tr> | ||
| 53 | |||
| 54 | </table> | ||
| 55 | </td> | ||
| 56 | </tr> | ||
| 57 | </table> | ||
| 58 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 59 | <tr> | ||
| 60 | <td> | ||
| 61 | | ||
| 62 | </td> | ||
| 63 | <td> | ||
| 64 | |||
| 65 | <p> | ||
| 66 | Create the object with a fairly standard configuration. | ||
| 67 | <p> | ||
| 68 | This constructor will assume that you want to use /dev/mem and a standard offset (as used by any 2.4.x and any 2.2.x kernel not defined to use more than 1GB of ram). </td> | ||
| 69 | </tr> | ||
| 70 | </table> | ||
| 71 | <a name="a1" doxytag="rwKernel::rwKernel"></a><p> | ||
| 72 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 73 | <tr> | ||
| 74 | <td class="md"> | ||
| 75 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 76 | <tr> | ||
| 77 | <td class="md" nowrap valign="top"> | ||
| 78 | rwKernel::rwKernel | ||
| 79 | </td> | ||
| 80 | <td class="md">( </td> | ||
| 81 | <td class="md">int </td> | ||
| 82 | <td class="mdname"> <em>file</em>, </td> | ||
| 83 | </tr> | ||
| 84 | <tr> | ||
| 85 | <td></td> | ||
| 86 | <td></td> | ||
| 87 | <td class="md"> <tr> | ||
| 88 | <td></td> | ||
| 89 | <td></td> | ||
| 90 | <td class="md">int </td> | ||
| 91 | <td class="mdname"> <em>offset</em> </td> | ||
| 92 | </tr> | ||
| 93 | <tr> | ||
| 94 | <td></td> | ||
| 95 | <td class="md">) </td> | ||
| 96 | <td class="md" colspan="2"> </td> | ||
| 97 | </tr> | ||
| 98 | |||
| 99 | </table> | ||
| 100 | </td> | ||
| 101 | </tr> | ||
| 102 | </table> | ||
| 103 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 104 | <tr> | ||
| 105 | <td> | ||
| 106 | | ||
| 107 | </td> | ||
| 108 | <td> | ||
| 109 | |||
| 110 | <p> | ||
| 111 | Create a rwKernel object with the defined parameters. | ||
| 112 | <p> | ||
| 113 | <dl compact><dt> | ||
| 114 | Parameters: <dd> | ||
| 115 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 116 | <tr><td valign=top><em>file | ||
| 117 | </em> </td><td> | ||
| 118 | sets the file to use. This must be either PROCKCORE (to use /proc/kcore as the memory device) or DEVMEM (to use /dev/mem as the memory device). </td></tr> | ||
| 119 | <tr><td valign=top><em>offset | ||
| 120 | </em> </td><td> | ||
| 121 | sets the offset from real memory addresses to virtual (kernel-) addresses. This is only needed if (file == DEVMEM), otherways supply IGNORE. </td></tr> | ||
| 122 | </table> | ||
| 123 | </dl> </td> | ||
| 124 | </tr> | ||
| 125 | </table> | ||
| 126 | <a name="a2" doxytag="rwKernel::~rwKernel"></a><p> | ||
| 127 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 128 | <tr> | ||
| 129 | <td class="md"> | ||
| 130 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 131 | <tr> | ||
| 132 | <td class="md" nowrap valign="top"> | ||
| 133 | rwKernel::~rwKernel | ||
| 134 | </td> | ||
| 135 | <td class="md">( </td> | ||
| 136 | <td class="mdname"> </td> | ||
| 137 | <td class="md">) </td> | ||
| 138 | <td class="md"> </td> | ||
| 139 | </tr> | ||
| 140 | |||
| 141 | </table> | ||
| 142 | </td> | ||
| 143 | </tr> | ||
| 144 | </table> | ||
| 145 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 146 | <tr> | ||
| 147 | <td> | ||
| 148 | | ||
| 149 | </td> | ||
| 150 | <td> | ||
| 151 | |||
| 152 | <p> | ||
| 153 | Destructor. | ||
| 154 | <p> | ||
| 155 | Will unmap the used device. </td> | ||
| 156 | </tr> | ||
| 157 | </table> | ||
| 158 | <hr><h2>Member Function Documentation</h2> | ||
| 159 | <a name="a3" doxytag="rwKernel::read"></a><p> | ||
| 160 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 161 | <tr> | ||
| 162 | <td class="md"> | ||
| 163 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 164 | <tr> | ||
| 165 | <td class="md" nowrap valign="top"> | ||
| 166 | void rwKernel::read | ||
| 167 | </td> | ||
| 168 | <td class="md">( </td> | ||
| 169 | <td class="md">unsigned char * </td> | ||
| 170 | <td class="mdname"> <em>dest</em>, </td> | ||
| 171 | </tr> | ||
| 172 | <tr> | ||
| 173 | <td></td> | ||
| 174 | <td></td> | ||
| 175 | <td class="md"> <tr> | ||
| 176 | <td></td> | ||
| 177 | <td></td> | ||
| 178 | <td class="md">unsigned int </td> | ||
| 179 | <td class="mdname"> <em>len</em>, </td> | ||
| 180 | </tr> | ||
| 181 | <tr> | ||
| 182 | <td></td> | ||
| 183 | <td></td> | ||
| 184 | <td class="md"> <tr> | ||
| 185 | <td></td> | ||
| 186 | <td></td> | ||
| 187 | <td class="md">unsigned int </td> | ||
| 188 | <td class="mdname"> <em>addr</em> </td> | ||
| 189 | </tr> | ||
| 190 | <tr> | ||
| 191 | <td></td> | ||
| 192 | <td class="md">) </td> | ||
| 193 | <td class="md" colspan="2"> </td> | ||
| 194 | </tr> | ||
| 195 | |||
| 196 | </table> | ||
| 197 | </td> | ||
| 198 | </tr> | ||
| 199 | </table> | ||
| 200 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 201 | <tr> | ||
| 202 | <td> | ||
| 203 | | ||
| 204 | </td> | ||
| 205 | <td> | ||
| 206 | |||
| 207 | <p> | ||
| 208 | read from kernel. | ||
| 209 | <p> | ||
| 210 | <dl compact><dt> | ||
| 211 | Parameters: <dd> | ||
| 212 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 213 | <tr><td valign=top><em>dest | ||
| 214 | </em> </td><td> | ||
| 215 | read data to this address. </td></tr> | ||
| 216 | <tr><td valign=top><em>len | ||
| 217 | </em> </td><td> | ||
| 218 | amount of bytes to read. </td></tr> | ||
| 219 | <tr><td valign=top><em>addr | ||
| 220 | </em> </td><td> | ||
| 221 | read data from this address. </td></tr> | ||
| 222 | </table> | ||
| 223 | </dl> </td> | ||
| 224 | </tr> | ||
| 225 | </table> | ||
| 226 | <a name="a4" doxytag="rwKernel::write"></a><p> | ||
| 227 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||
| 228 | <tr> | ||
| 229 | <td class="md"> | ||
| 230 | <table cellpadding="0" cellspacing="0" border="0"> | ||
| 231 | <tr> | ||
| 232 | <td class="md" nowrap valign="top"> | ||
| 233 | void rwKernel::write | ||
| 234 | </td> | ||
| 235 | <td class="md">( </td> | ||
| 236 | <td class="md">unsigned char * </td> | ||
| 237 | <td class="mdname"> <em>src</em>, </td> | ||
| 238 | </tr> | ||
| 239 | <tr> | ||
| 240 | <td></td> | ||
| 241 | <td></td> | ||
| 242 | <td class="md"> <tr> | ||
| 243 | <td></td> | ||
| 244 | <td></td> | ||
| 245 | <td class="md">unsigned int </td> | ||
| 246 | <td class="mdname"> <em>len</em>, </td> | ||
| 247 | </tr> | ||
| 248 | <tr> | ||
| 249 | <td></td> | ||
| 250 | <td></td> | ||
| 251 | <td class="md"> <tr> | ||
| 252 | <td></td> | ||
| 253 | <td></td> | ||
| 254 | <td class="md">unsigned int </td> | ||
| 255 | <td class="mdname"> <em>addr</em> </td> | ||
| 256 | </tr> | ||
| 257 | <tr> | ||
| 258 | <td></td> | ||
| 259 | <td class="md">) </td> | ||
| 260 | <td class="md" colspan="2"> </td> | ||
| 261 | </tr> | ||
| 262 | |||
| 263 | </table> | ||
| 264 | </td> | ||
| 265 | </tr> | ||
| 266 | </table> | ||
| 267 | <table cellspacing=5 cellpadding=0 border=0> | ||
| 268 | <tr> | ||
| 269 | <td> | ||
| 270 | | ||
| 271 | </td> | ||
| 272 | <td> | ||
| 273 | |||
| 274 | <p> | ||
| 275 | write to kernel. | ||
| 276 | <p> | ||
| 277 | <dl compact><dt> | ||
| 278 | Parameters: <dd> | ||
| 279 | <table border=0 cellspacing=2 cellpadding=0> | ||
| 280 | <tr><td valign=top><em>src | ||
| 281 | </em> </td><td> | ||
| 282 | read data from this address. </td></tr> | ||
| 283 | <tr><td valign=top><em>len | ||
| 284 | </em> </td><td> | ||
| 285 | amount of bytes to write. </td></tr> | ||
| 286 | <tr><td valign=top><em>addr | ||
| 287 | </em> </td><td> | ||
| 288 | write data to this address. </td></tr> | ||
| 289 | </table> | ||
| 290 | </dl> </td> | ||
| 291 | </tr> | ||
| 292 | </table> | ||
| 293 | <hr>The documentation for this class was generated from the following file:<ul> | ||
| 294 | <li><a class="el" href="rwKernel_8hpp-source.html">rwKernel.hpp</a></ul> | ||
| 295 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 296 | <a href="http://www.doxygen.org/index.html"> | ||
| 297 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 298 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 299 | © 1997-2001</small></address> | ||
| 300 | </body> | ||
| 301 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/doxygen.css b/other/Kermit/doc/API_doc/html/doxygen.css new file mode 100644 index 0000000..aee2f34 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/doxygen.css | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | H1 { text-align: center; } | ||
| 2 | A.qindex {} | ||
| 3 | A.qindexRef {} | ||
| 4 | A.el { text-decoration: none; font-weight: bold } | ||
| 5 | A.elRef { font-weight: bold } | ||
| 6 | A.code { text-decoration: none; font-weight: normal; color: #4444ee } | ||
| 7 | A.codeRef { font-weight: normal; color: #4444ee } | ||
| 8 | A:hover { text-decoration: none; background-color: #f2f2ff } | ||
| 9 | DL.el { margin-left: -1cm } | ||
| 10 | DIV.fragment { width: 100%; border: none; background-color: #eeeeee } | ||
| 11 | DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } | ||
| 12 | TD.md { background-color: #f2f2ff; font-weight: bold; } | ||
| 13 | TD.mdname { background-color: #f2f2ff; font-weight: bold; font-style: italic } | ||
| 14 | DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } | ||
| 15 | DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } | ||
| 16 | FONT.keyword { color: #008000 } | ||
| 17 | FONT.keywordtype { color: #604020 } | ||
| 18 | FONT.keywordflow { color: #e08000 } | ||
| 19 | FONT.comment { color: #800000 } | ||
| 20 | FONT.preprocessor { color: #806020 } | ||
| 21 | FONT.stringliteral { color: #002080 } | ||
| 22 | FONT.charliteral { color: #008080 } | ||
diff --git a/other/Kermit/doc/API_doc/html/doxygen.gif b/other/Kermit/doc/API_doc/html/doxygen.gif new file mode 100644 index 0000000..192c83c --- /dev/null +++ b/other/Kermit/doc/API_doc/html/doxygen.gif | |||
| Binary files differ | |||
diff --git a/other/Kermit/doc/API_doc/html/files.html b/other/Kermit/doc/API_doc/html/files.html new file mode 100644 index 0000000..6077f8e --- /dev/null +++ b/other/Kermit/doc/API_doc/html/files.html | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>File Index</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Kermit File List</h1>Here is a list of all documented files with brief descriptions:<ul> | ||
| 10 | <li><b>addresses.h</b> <a href="addresses_8h-source.html">[code]</a><li><b>arch.hpp</b> <a href="arch_8hpp-source.html">[code]</a><li><b>DevMemPatt.hpp</b> <a href="DevMemPatt_8hpp-source.html">[code]</a><li><b>itos16.hpp</b> <a href="itos16_8hpp-source.html">[code]</a><li><b>name2add.h</b> <a href="name2add_8h-source.html">[code]</a><li><b>Patch.hpp</b> <a href="Patch_8hpp-source.html">[code]</a><li><b>pseudo_link.h</b> <a href="pseudo__link_8h-source.html">[code]</a><li><b>rwKernel.hpp</b> <a href="rwKernel_8hpp-source.html">[code]</a><li><b>stoi16.hpp</b> <a href="stoi16_8hpp-source.html">[code]</a><li><b>SymbolFingp.hpp</b> <a href="SymbolFingp_8hpp-source.html">[code]</a><li><b>SymbolTable.hpp</b> <a href="SymbolTable_8hpp-source.html">[code]</a><li><b>SystemMap.hpp</b> <a href="SystemMap_8hpp-source.html">[code]</a></ul> | ||
| 11 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 12 | <a href="http://www.doxygen.org/index.html"> | ||
| 13 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 14 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 15 | © 1997-2001</small></address> | ||
| 16 | </body> | ||
| 17 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/functions.html b/other/Kermit/doc/API_doc/html/functions.html new file mode 100644 index 0000000..f24832a --- /dev/null +++ b/other/Kermit/doc/API_doc/html/functions.html | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Compound Member Index</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Kermit Compound Members</h1>Here is a list of all documented class members with links to the classes they belong to:<ul> | ||
| 10 | <li>add() | ||
| 11 | : <a class="el" href="classSystemMap.html#a4">SystemMap</a><li>addSymbolToCache() | ||
| 12 | : <a class="el" href="classSymbolTable.html#a7">SymbolTable</a><li>apply() | ||
| 13 | : <a class="el" href="classPatch.html#a19">Patch</a><li>clearCache() | ||
| 14 | : <a class="el" href="classSymbolTable.html#a8">SymbolTable</a><li>contains() | ||
| 15 | : <a class="el" href="classSystemMap.html#a3">SystemMap</a><li>DevMemPatt() | ||
| 16 | : <a class="el" href="classDevMemPatt.html#a1">DevMemPatt</a><li>dump() | ||
| 17 | : <a class="el" href="classPatch.html#a21">Patch</a><li>find_patt() | ||
| 18 | : <a class="el" href="classDevMemPatt.html#a4">DevMemPatt</a><li>findSymbol() | ||
| 19 | : <a class="el" href="classSymbolTable.html#a6">SymbolTable</a><li>getData() | ||
| 20 | : <a class="el" href="classPatch.html#a17">Patch</a><li>getFinger() | ||
| 21 | : <a class="el" href="classSymbolFingp.html#a3">SymbolFingp</a><li>getPatchAsString() | ||
| 22 | : <a class="el" href="classPatch.html#a7">Patch</a><li>getState() | ||
| 23 | : <a class="el" href="classPatch.html#a13">Patch</a><li>getSymbol() | ||
| 24 | : <a class="el" href="classSymbolTable.html#a5">SymbolTable</a><li>initFromString() | ||
| 25 | : <a class="el" href="classPatch.html#a6">Patch</a><li>isApplied() | ||
| 26 | : <a class="el" href="classPatch.html#a10">Patch</a><li>isClean() | ||
| 27 | : <a class="el" href="classPatch.html#a12">Patch</a><li>isFailed() | ||
| 28 | : <a class="el" href="classPatch.html#a11">Patch</a><li>isLinked() | ||
| 29 | : <a class="el" href="classPatch.html#a9">Patch</a><li>link() | ||
| 30 | : <a class="el" href="classPatch.html#a20">Patch</a><li>operator<< | ||
| 31 | : <a class="el" href="classPatch.html#l1">Patch</a><li>operator>> | ||
| 32 | : <a class="el" href="classPatch.html#l0">Patch</a><li>operator[]() | ||
| 33 | : <a class="el" href="classSystemMap.html#a5">SystemMap</a><li>Patch() | ||
| 34 | : <a class="el" href="classPatch.html#a4">Patch</a><li>read() | ||
| 35 | : <a class="el" href="classrwKernel.html#a5">rwKernel</a><li>remove() | ||
| 36 | : <a class="el" href="classPatch.html#a16">Patch</a><li>restore() | ||
| 37 | : <a class="el" href="classPatch.html#a14">Patch</a><li>rwKernel() | ||
| 38 | : <a class="el" href="classrwKernel.html#a1">rwKernel</a><li>saveCache() | ||
| 39 | : <a class="el" href="classSymbolTable.html#a9">SymbolTable</a><li>setSaveFile() | ||
| 40 | : <a class="el" href="classSymbolTable.html#a4">SymbolTable</a><li>SymbolFingp() | ||
| 41 | : <a class="el" href="classSymbolFingp.html#a1">SymbolFingp</a><li>SymbolTable() | ||
| 42 | : <a class="el" href="classSymbolTable.html#a2">SymbolTable</a><li>symList | ||
| 43 | : <a class="el" href="classSymbolTable.html#m0">SymbolTable</a><li>SystemMap() | ||
| 44 | : <a class="el" href="classSystemMap.html#a1">SystemMap</a><li>wasChanged() | ||
| 45 | : <a class="el" href="classPatch.html#a8">Patch</a><li>write() | ||
| 46 | : <a class="el" href="classrwKernel.html#a6">rwKernel</a><li>~DevMemPatt() | ||
| 47 | : <a class="el" href="classDevMemPatt.html#a2">DevMemPatt</a><li>~Patch() | ||
| 48 | : <a class="el" href="classPatch.html#a5">Patch</a><li>~rwKernel() | ||
| 49 | : <a class="el" href="classrwKernel.html#a2">rwKernel</a><li>~SymbolFingp() | ||
| 50 | : <a class="el" href="classSymbolFingp.html#a2">SymbolFingp</a><li>~SymbolTable() | ||
| 51 | : <a class="el" href="classSymbolTable.html#a3">SymbolTable</a><li>~SystemMap() | ||
| 52 | : <a class="el" href="classSystemMap.html#a2">SystemMap</a></ul> | ||
| 53 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 54 | <a href="http://www.doxygen.org/index.html"> | ||
| 55 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 56 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 57 | © 1997-2001</small></address> | ||
| 58 | </body> | ||
| 59 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/index.html b/other/Kermit/doc/API_doc/html/index.html new file mode 100644 index 0000000..cb43fe6 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/index.html | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>Main Page</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>Kermit Documentation</h1> | ||
| 10 | <p> | ||
| 11 | <hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 12 | <a href="http://www.doxygen.org/index.html"> | ||
| 13 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 14 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 15 | © 1997-2001</small></address> | ||
| 16 | </body> | ||
| 17 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/itos16_8hpp-source.html b/other/Kermit/doc/API_doc/html/itos16_8hpp-source.html new file mode 100644 index 0000000..117f765 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/itos16_8hpp-source.html | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>itos16.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>itos16.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * itos16.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * written by palmers / teso</font> | ||
| 12 | 00004 <font class="comment"> */</font> | ||
| 13 | 00005 <font class="preprocessor">#ifndef __ITOS16_C</font> | ||
| 14 | 00006 <font class="preprocessor"></font><font class="preprocessor">#define __ITOS16_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#include <string></font> | ||
| 16 | 00008 string itos16 (<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>); | ||
| 17 | 00009 <font class="preprocessor">#endif </font><font class="comment">/* __ITOS16_C */</font> | ||
| 18 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 19 | <a href="http://www.doxygen.org/index.html"> | ||
| 20 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 21 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 22 | © 1997-2001</small></address> | ||
| 23 | </body> | ||
| 24 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/name2add_8h-source.html b/other/Kermit/doc/API_doc/html/name2add_8h-source.html new file mode 100644 index 0000000..5491a44 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/name2add_8h-source.html | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>name2add.h Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>name2add.h</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * name2add.h:</font> | ||
| 11 | 00003 <font class="comment"> * written by palmers / teso</font> | ||
| 12 | 00004 <font class="comment"> */</font> | ||
| 13 | 00005 <font class="preprocessor">#ifndef __NAME2ADD</font> | ||
| 14 | 00006 <font class="preprocessor"></font><font class="preprocessor">#define __NAME2ADD</font> | ||
| 15 | 00007 <font class="preprocessor"></font> | ||
| 16 | 00008 <font class="keyword">typedef</font> <font class="keyword">struct</font> | ||
| 17 | 00009 <font class="keyword"></font>{ | ||
| 18 | 00010 <font class="keywordtype">char</font> *name; | ||
| 19 | 00011 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> add; | ||
| 20 | 00012 } __name2add; | ||
| 21 | 00013 | ||
| 22 | 00014 <font class="keyword">extern</font> __name2add __n2a[]; | ||
| 23 | 00015 | ||
| 24 | 00016 <font class="preprocessor">#endif </font><font class="comment">/* __NAME2ADD*/</font> | ||
| 25 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 26 | <a href="http://www.doxygen.org/index.html"> | ||
| 27 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 28 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 29 | © 1997-2001</small></address> | ||
| 30 | </body> | ||
| 31 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/pseudo__link_8h-source.html b/other/Kermit/doc/API_doc/html/pseudo__link_8h-source.html new file mode 100644 index 0000000..97cab4d --- /dev/null +++ b/other/Kermit/doc/API_doc/html/pseudo__link_8h-source.html | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>pseudo_link.h Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>pseudo_link.h</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * pseudo_link.h:</font> | ||
| 11 | 00003 <font class="comment"> * file for pseudolinking.</font> | ||
| 12 | 00004 <font class="comment"> * put all your pointer to function prototypes here.</font> | ||
| 13 | 00005 <font class="comment"> * written by palmers / teso</font> | ||
| 14 | 00006 <font class="comment"> */</font> | ||
| 15 | 00007 <font class="preprocessor">#include <glob.h></font> | ||
| 16 | 00008 <font class="preprocessor">#include <linux/types.h></font> | ||
| 17 | 00009 <font class="preprocessor">#include <sys/stat.h></font> | ||
| 18 | 00010 <font class="preprocessor">#include <sys/types.h></font> | ||
| 19 | 00011 <font class="preprocessor">#include <asm/ptrace.h></font> | ||
| 20 | 00012 <font class="preprocessor">#include <addresses.h></font> | ||
| 21 | 00013 | ||
| 22 | 00014 <font class="preprocessor">#define USE_SYS_FORK \</font> | ||
| 23 | 00015 <font class="preprocessor">int (*sys_fork)(struct pt_regs) = \</font> | ||
| 24 | 00016 <font class="preprocessor"> (int (*)(struct pt_regs))SYS_FORK_ADD; </font><font class="comment">/* arch dependant! */</font> | ||
| 25 | 00017 | ||
| 26 | 00018 <font class="preprocessor">#define USE_SYS_READ \</font> | ||
| 27 | 00019 <font class="preprocessor">size_t (*sys_read)(unsigned int, char *, size_t) = \</font> | ||
| 28 | 00020 <font class="preprocessor"> (size_t (*)(unsigned int, char *, size_t))SYS_READ_ADD;</font> | ||
| 29 | 00021 <font class="preprocessor"></font> | ||
| 30 | 00022 <font class="preprocessor">#define USE_SYS_WRITE \</font> | ||
| 31 | 00023 <font class="preprocessor">size_t (*sys_write)(unsigned int, char *, size_t) = \</font> | ||
| 32 | 00024 <font class="preprocessor"> (size_t (*)(unsigned int, char *, size_t))SYS_WRITE_ADD;</font> | ||
| 33 | 00025 <font class="preprocessor"></font> | ||
| 34 | 00026 <font class="preprocessor">#define USE_SYS_EXIT \</font> | ||
| 35 | 00027 <font class="preprocessor">int (*sys_exit)(int) = \</font> | ||
| 36 | 00028 <font class="preprocessor"> (int (*)(int))SYS_EXIT_ADD;</font> | ||
| 37 | 00029 <font class="preprocessor"></font> | ||
| 38 | 00030 <font class="preprocessor">#define USE_SYS_SETUID \</font> | ||
| 39 | 00031 <font class="preprocessor">int (*sys_setuid)(uid_t) = \</font> | ||
| 40 | 00032 <font class="preprocessor"> (int (*)(uid_t))SYS_SETUID_ADD;</font> | ||
| 41 | 00033 <font class="preprocessor"></font> | ||
| 42 | 00034 <font class="preprocessor">#define USE_SYS_SETGID \</font> | ||
| 43 | 00035 <font class="preprocessor">int (*sys_setgid)(gid_t) = \</font> | ||
| 44 | 00036 <font class="preprocessor"> (int (*)(gid_t))SYS_SETGID_ADD;</font> | ||
| 45 | 00037 <font class="preprocessor"></font> | ||
| 46 | 00038 <font class="preprocessor">#define USE_SYS_GETUID \</font> | ||
| 47 | 00039 <font class="preprocessor">int (*sys_getuid)(void) = \</font> | ||
| 48 | 00040 <font class="preprocessor"> (int (*)(void))SYS_GETUID_ADD;</font> | ||
| 49 | 00041 <font class="preprocessor"></font> | ||
| 50 | 00042 <font class="preprocessor">#define USE_SYS_GETGID \</font> | ||
| 51 | 00043 <font class="preprocessor">int (*sys_getgid)(void) = \</font> | ||
| 52 | 00044 <font class="preprocessor"> (int (*)(void))SYS_GETGID_ADD;</font> | ||
| 53 | 00045 <font class="preprocessor"></font> | ||
| 54 | 00046 <font class="preprocessor">#define USE_SYS_OPEN \</font> | ||
| 55 | 00047 <font class="preprocessor">int (*sys_open)(const char *, int, int) = \</font> | ||
| 56 | 00048 <font class="preprocessor"> (int (*)(const char *, int, int))SYS_OPEN_ADD;</font> | ||
| 57 | 00049 <font class="preprocessor"></font> | ||
| 58 | 00050 <font class="preprocessor">#define USE_SYS_CLOSE \</font> | ||
| 59 | 00051 <font class="preprocessor">int (*sys_close)(int) = \</font> | ||
| 60 | 00052 <font class="preprocessor"> (int (*)(int))SYS_CLOSE_ADD;</font> | ||
| 61 | 00053 <font class="preprocessor"></font> | ||
| 62 | 00054 <font class="preprocessor">#define USE_KMALLOC \</font> | ||
| 63 | 00055 <font class="preprocessor">void *(*kmalloc)(size_t, int) = \</font> | ||
| 64 | 00056 <font class="preprocessor"> (void *(*)(size_t, int)) KMALLOC_ADD;</font> | ||
| 65 | 00057 <font class="preprocessor"></font> | ||
| 66 | 00058 | ||
| 67 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 68 | <a href="http://www.doxygen.org/index.html"> | ||
| 69 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 70 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 71 | © 1997-2001</small></address> | ||
| 72 | </body> | ||
| 73 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/rwKernel_8hpp-source.html b/other/Kermit/doc/API_doc/html/rwKernel_8hpp-source.html new file mode 100644 index 0000000..4c70fd4 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/rwKernel_8hpp-source.html | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>rwKernel.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>rwKernel.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * rwKernel.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * access to kernel memory.</font> | ||
| 12 | 00004 <font class="comment"> * written by palmers / teso</font> | ||
| 13 | 00005 <font class="comment"> */</font> | ||
| 14 | 00006 <font class="preprocessor">#ifndef __RW_KERNEL_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#define __RW_KERNEL_C</font> | ||
| 16 | 00008 <font class="preprocessor"></font> | ||
| 17 | 00009 <font class="preprocessor">#include <algorithm></font> | ||
| 18 | 00010 | ||
| 19 | 00011 <font class="preprocessor">#define PROCKCORE 213</font> | ||
| 20 | 00012 <font class="preprocessor"></font><font class="preprocessor">#define DEVMEM 23846</font> | ||
| 21 | 00013 <font class="preprocessor"></font> | ||
| 22 | 00014 <font class="preprocessor">#define CONF_1GB 34</font> | ||
| 23 | 00015 <font class="preprocessor"></font><font class="preprocessor">#define CONF_2GB 33</font> | ||
| 24 | 00016 <font class="preprocessor"></font><font class="preprocessor">#define CONF_3GB 32</font> | ||
| 25 | 00017 <font class="preprocessor"></font><font class="preprocessor">#define IGNORE 31</font> | ||
| 26 | 00018 <font class="preprocessor"></font> | ||
| 27 | <a name="l00023"></a><a class="code" href="classrwKernel.html">00023</a> <font class="keyword">class </font><a class="code" href="classrwKernel.html">rwKernel</a> | ||
| 28 | 00024 { | ||
| 29 | 00025 <font class="keyword">private</font>: | ||
| 30 | 00026 | ||
| 31 | 00027 <font class="keywordtype">char</font> *fd; | ||
| 32 | 00028 <font class="keywordtype">int</font> which; | ||
| 33 | 00029 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> mem_conf; | ||
| 34 | 00030 | ||
| 35 | 00031 <font class="keywordtype">bool</font> openFile (<font class="keywordtype">int</font>); | ||
| 36 | 00032 <font class="keywordtype">void</font> closeFile (); | ||
| 37 | 00033 <font class="keywordtype">void</font> setOffset (<font class="keywordtype">int</font>); | ||
| 38 | 00034 | ||
| 39 | 00035 | ||
| 40 | 00036 <font class="keyword">public</font>: | ||
| 41 | 00037 | ||
| 42 | 00043 <a class="code" href="classrwKernel.html#a0">rwKernel</a> (); | ||
| 43 | 00044 | ||
| 44 | 00054 <a class="code" href="classrwKernel.html#a0">rwKernel</a> (<font class="keywordtype">int</font> file, <font class="keywordtype">int</font> offset); | ||
| 45 | 00055 | ||
| 46 | 00059 <a class="code" href="classrwKernel.html#a2">~rwKernel</a> (); | ||
| 47 | 00060 | ||
| 48 | 00067 <font class="keywordtype">void</font> <a class="code" href="classrwKernel.html#a3">read</a> (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *dest, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> len, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> addr); | ||
| 49 | 00068 | ||
| 50 | 00075 <font class="keywordtype">void</font> <a class="code" href="classrwKernel.html#a4">write</a> (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *src, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> len, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> addr); | ||
| 51 | 00076 | ||
| 52 | <a name="l00080"></a><a class="code" href="classrwKernel.html#a5">00080</a> <font class="keywordtype">void</font> <a class="code" href="classrwKernel.html#a3">read</a> (<font class="keywordtype">char</font> *a, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> b, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> c)<font class="keyword"></font> | ||
| 53 | 00081 <font class="keyword"> </font>{ | ||
| 54 | 00082 <a class="code" href="classrwKernel.html#a3">read</a> ((<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *) a, b, c); | ||
| 55 | 00083 } | ||
| 56 | 00084 | ||
| 57 | <a name="l00088"></a><a class="code" href="classrwKernel.html#a6">00088</a> <font class="keywordtype">void</font> <a class="code" href="classrwKernel.html#a4">write</a> (<font class="keywordtype">char</font> *a, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> b, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> c)<font class="keyword"></font> | ||
| 58 | 00089 <font class="keyword"> </font>{ | ||
| 59 | 00090 <a class="code" href="classrwKernel.html#a4">write</a> ((<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *) a, b, c); | ||
| 60 | 00091 } | ||
| 61 | 00092 }; | ||
| 62 | 00093 | ||
| 63 | 00094 <font class="preprocessor">#endif </font><font class="comment">/* __RW_KERNEL_C */</font> | ||
| 64 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 65 | <a href="http://www.doxygen.org/index.html"> | ||
| 66 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 67 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 68 | © 1997-2001</small></address> | ||
| 69 | </body> | ||
| 70 | </html> | ||
diff --git a/other/Kermit/doc/API_doc/html/stoi16_8hpp-source.html b/other/Kermit/doc/API_doc/html/stoi16_8hpp-source.html new file mode 100644 index 0000000..6c7e153 --- /dev/null +++ b/other/Kermit/doc/API_doc/html/stoi16_8hpp-source.html | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
| 3 | <title>stoi16.hpp Source File</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | </head><body bgcolor="#ffffff"> | ||
| 6 | <!-- Generated by Doxygen 1.2.9.1 --> | ||
| 7 | <center> | ||
| 8 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> | ||
| 9 | <hr><h1>stoi16.hpp</h1><div class="fragment"><pre>00001 <font class="comment">/*</font> | ||
| 10 | 00002 <font class="comment"> * stoi16.hpp:</font> | ||
| 11 | 00003 <font class="comment"> * written by palmers / teso</font> | ||
| 12 | 00004 <font class="comment"> */</font> | ||
| 13 | 00005 <font class="preprocessor">#ifndef __STOI16_C</font> | ||
| 14 | 00006 <font class="preprocessor"></font><font class="preprocessor">#define __STOI16_C</font> | ||
| 15 | 00007 <font class="preprocessor"></font><font class="preprocessor">#include <string></font> | ||
| 16 | 00008 | ||
| 17 | 00012 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> stoi16 (string); | ||
| 18 | 00013 <font class="preprocessor">#endif </font><font class="comment">/* __STOI16_C */</font> | ||
| 19 | </pre></div><hr><address><small>Generated at Tue Aug 14 18:04:51 2001 for Kermit by | ||
| 20 | <a href="http://www.doxygen.org/index.html"> | ||
| 21 | <img src="doxygen.gif" alt="doxygen" align="middle" border=0 | ||
| 22 | width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, | ||
| 23 | © 1997-2001</small></address> | ||
| 24 | </body> | ||
| 25 | </html> | ||
diff --git a/other/Kermit/doc/BINARY b/other/Kermit/doc/BINARY new file mode 100644 index 0000000..8c33d55 --- /dev/null +++ b/other/Kermit/doc/BINARY | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | Binary Manual | ||
| 2 | ============= | ||
| 3 | |||
| 4 | written by palmers / teso | ||
| 5 | you will find here a short and long discription of the binaries. | ||
| 6 | |||
| 7 | |||
| 8 | OVERVIEW | ||
| 9 | -------- | ||
| 10 | |||
| 11 | findsym - find a symbol in kernel memory | ||
| 12 | readsym - read from memory | ||
| 13 | writesym - write to memory | ||
| 14 | sys_malloc - a kmalloc hook | ||
| 15 | call_syscall - call the malloc hook | ||
| 16 | unload - remove patches from memory (from dump file) | ||
| 17 | load - insert patches (from dump file) | ||
| 18 | |||
| 19 | findsym | ||
| 20 | ------- | ||
| 21 | |||
| 22 | SymbolFind.conf file format: | ||
| 23 | the fields in this file are seperated by a arbitrary amount of white space. | ||
| 24 | The meaning of each field is as follows: | ||
| 25 | <name> <search-start> <search-end> <offset> <fp-length> <1'st> \ | ||
| 26 | <2'nd> ... <fp-length'th> | ||
| 27 | |||
| 28 | where "name" is the symbol you search. search start and end delimeter the | ||
| 29 | serach space. offset is the offset to the beginning of the symbol from where | ||
| 30 | the pattern was matched. the lasting fields are hex numbers between 0 and 0xff, | ||
| 31 | self explaining, i hope :) | ||
| 32 | |||
| 33 | |||
| 34 | readsym & writesym | ||
| 35 | ------------------ | ||
| 36 | |||
| 37 | these utils are very alike. the only difference is that one is for reading, the | ||
| 38 | other for writing. | ||
| 39 | They are really self explaining. all numericals must be supplieed in hex, | ||
| 40 | you dont have to take care of offsets inside the memory device. In some | ||
| 41 | special cases you have to tell the utils one or two things about the machine | ||
| 42 | (e.g. if its a 2.2 kernel configured to handle 2 or 3 GBs of ram. 2.4 uses | ||
| 43 | a fixed offset). | ||
| 44 | readsym writes the read data hexadecimal, byte per byte, to stdout. readsym | ||
| 45 | reads the data in the same format. | ||
| 46 | |||
| 47 | |||
| 48 | sys_malloc & call_syscall | ||
| 49 | ------------------------- | ||
| 50 | |||
| 51 | a simple function calling kmalloc and returning the address of the | ||
| 52 | first malloced byte. insert its code in the kernel, register it | ||
| 53 | to sys_scall_table and use call_syscall to see how you system resources | ||
| 54 | vanish. | ||
| 55 | |||
| 56 | |||
| 57 | unload | ||
| 58 | ------ | ||
| 59 | |||
| 60 | unfinished. | ||
| 61 | Unload a Patch or a set of Patches. Take a look at the api dokumentation | ||
| 62 | to see how this works. (it uses session files). | ||
| 63 | |||
| 64 | |||
| 65 | load | ||
| 66 | ---- | ||
| 67 | |||
| 68 | load a Patch or a set of Patches. Use for recovering a aborted session. | ||
| 69 | unfinished. | ||
| 70 | |||
| 71 | |||
diff --git a/other/Kermit/doc/HOWTO_LINK b/other/Kermit/doc/HOWTO_LINK new file mode 100644 index 0000000..0432572 --- /dev/null +++ b/other/Kermit/doc/HOWTO_LINK | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | HOWTO: LINK | ||
| 2 | =========== | ||
| 3 | |||
| 4 | written by palmers / teso | ||
| 5 | short: | ||
| 6 | 1. add your pointer to function prototypes to "pseudo_link.h" | ||
| 7 | 2. cd include; make; cd ../lib; make; (do needed updates) | ||
| 8 | 3. insert "USE_<name>" at the beginning of your function | ||
| 9 | where each <name> is a kernel land function. | ||
| 10 | 4. compile and dump your code, put it in a Patch object | ||
| 11 | and apply it. | ||
| 12 | |||
| 13 | long: | ||
| 14 | HUAHAUHAUAHAUHAUHAU! | ||
| 15 | |||
diff --git a/other/Kermit/doc/Kermit-doxygen.cfg b/other/Kermit/doc/Kermit-doxygen.cfg new file mode 100644 index 0000000..47e2272 --- /dev/null +++ b/other/Kermit/doc/Kermit-doxygen.cfg | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | PROJECT_NAME = "Kermit" | ||
| 2 | OUTPUT_DIRECTORY = ./API_doc | ||
| 3 | INPUT = ../include/ | ||
| 4 | GENERATE_LATEX = NO | ||
| 5 | GENERATE_MAN = NO | ||
| 6 | GENERATE_RTF = NO | ||
| 7 | CASE_SENSE_NAMES = YES | ||
| 8 | QUIET = YES | ||
| 9 | JAVADOC_AUTOBRIEF = YES | ||
| 10 | |||
diff --git a/other/Kermit/doc/Makefile b/other/Kermit/doc/Makefile new file mode 100644 index 0000000..c4ada86 --- /dev/null +++ b/other/Kermit/doc/Makefile | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | all: | ||
| 3 | doxygen Kermit-doxygen.cfg | ||
| 4 | |||
| 5 | clean: | ||
| 6 | rm -rf API_doc/* | ||
| 7 | |||
diff --git a/other/Kermit/doc/README b/other/Kermit/doc/README new file mode 100644 index 0000000..29303a5 --- /dev/null +++ b/other/Kermit/doc/README | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | README (the other one) | ||
| 2 | ====================== | ||
| 3 | |||
| 4 | written by palmers / teso | ||
| 5 | |||
| 6 | if you relly want to know what this is all about read the whole file. it | ||
| 7 | will (hopefully) explain my approach to this whole thing. | ||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | how to start | ||
| 12 | ------------ | ||
| 13 | |||
| 14 | inserting the first function might be a problem. we can not allocate memory for | ||
| 15 | it and overwritting a function inside the kernel will result in problems, right? | ||
| 16 | wrong. | ||
| 17 | there are hundreds of functions which can be overwritten without any negative | ||
| 18 | side effects. a example for such a function is init (). it is called only once | ||
| 19 | at kernel start (boot). | ||
| 20 | if a function is inserted we can write its address into a empty slot in the | ||
| 21 | system call table and call the function from userland. This function is prefearably | ||
| 22 | a hook to kmalloc. So we are not forced to corrupt the kernel any longer and | ||
| 23 | are less likely to be detected. (Since the number of possible entry points is | ||
| 24 | limited one could check them, if they were corrupted. But a malloced space in | ||
| 25 | memory may contain any data.) | ||
| 26 | (see: call_syscall.c and sys_malloc.c) | ||
| 27 | |||
| 28 | |||
| 29 | finding the sys_call_table | ||
| 30 | -------------------------- | ||
| 31 | |||
| 32 | how do we find the system call table? if the kernel has module support, | ||
| 33 | fine - this symbol was exported. however, if the kernel does not have module | ||
| 34 | support we have a problem. No, not really. the system call table is an array | ||
| 35 | of addresses. Or, more general, a amount of data we know. We only need to | ||
| 36 | find, the first (say) 4 system calls referenced by the table. Their addresses | ||
| 37 | are not identical in differnet kernels, but the functions are the same. So | ||
| 38 | we search for their patterns in memory. | ||
| 39 | These are exit, fork, read and write. As we know now their addresses, we know | ||
| 40 | what we need to search for to find the address of the sys_call_table. | ||
| 41 | (see: find_sys_call_table.sh) | ||
| 42 | |||
| 43 | |||
| 44 | finding the current task_struct | ||
| 45 | ------------------------------- | ||
| 46 | |||
| 47 | as important as the system call table is "current". (If you are not familiar with | ||
| 48 | the linux kernel: it carries all runtime information [pid, priority, uid, | ||
| 49 | etc..] of the task currently running, see include/linux/sched.h). It is a pointer | ||
| 50 | to the the task_struct of the process currently running, right? well, see your | ||
| 51 | self. (And note that this is architecture dependant). | ||
| 52 | |||
| 53 | :r /usr/include/asm/current.h: | ||
| 54 | ... | ||
| 55 | static inline struct task_struct * get_current(void) | ||
| 56 | { | ||
| 57 | struct task_struct *current; | ||
| 58 | __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL)); | ||
| 59 | return current; | ||
| 60 | } | ||
| 61 | |||
| 62 | #define current get_current() | ||
| 63 | ... | ||
| 64 | |||
| 65 | even if you always used it just as a pointer, it is either a function returning | ||
| 66 | a pointer or its address is carried in a register. It should be possible to use | ||
| 67 | it like in a real module. | ||
| 68 | |||
| 69 | |---------------------------------------------------------------- | ||
| 70 | | use a inlined function: | carry pointer in a register: | | ||
| 71 | |---------------------------------------------------------------- | ||
| 72 | | arm | IA-64 | | ||
| 73 | | cris | sparc, sparc64 | | ||
| 74 | | parisc | mips, mips64 | | ||
| 75 | | s390, s390x | alpha | | ||
| 76 | | i386 | m68000 | | ||
| 77 | | sh | power pc | | ||
| 78 | |---------------------------------------------------------------- | ||
| 79 | |||
| 80 | |||
| 81 | getting into | ||
| 82 | ------------ | ||
| 83 | |||
| 84 | yeah, lets get into play. there is now a new problem. first, let us recall | ||
| 85 | which are already solved: | ||
| 86 | - we know where to put our code | ||
| 87 | - we know how to replace a syscall entry (where to put our hook) | ||
| 88 | |||
| 89 | this does not help much until this problem is solved: | ||
| 90 | - how to link our code into the kernel | ||
| 91 | |||
| 92 | An object file is full of symbols. so we can not just read the file out and | ||
| 93 | write it into memory. A symbol is a placeholder for a address (e.g. to a | ||
| 94 | function). It has to be looked up on loadtime. This is half of the work done | ||
| 95 | by "insmod". We dont want/can not afford that. | ||
| 96 | We avoid the presence of symbols by not using a (global) function. Instead | ||
| 97 | we insert (local) pointers to functions inside our function. As this pointer | ||
| 98 | can only be accesses inside of the function and is therefore not exported, | ||
| 99 | no symbol is created if we compile our code. | ||
| 100 | |||
| 101 | The disadvantages of this approach are: | ||
| 102 | - it is slow | ||
| 103 | - increases code size | ||
| 104 | |||
| 105 | other approaches to insert & link the code could be: | ||
| 106 | - writing a real linker (hehe) | ||
| 107 | - taking a look into insmod source code | ||
| 108 | |||
| 109 | Since we might not be aware of the real addresses of kernel intern symbols | ||
| 110 | (e.g. if we have no System.map file of the system we want to attack) we choose | ||
| 111 | dummy values for the addresses of our pointers. We can replace them with | ||
| 112 | the real values after we looked them up. | ||
| 113 | |||
| 114 | |||
| 115 | Finding a Symbol | ||
| 116 | ---------------- | ||
| 117 | |||
| 118 | These are our four possiblities: | ||
| 119 | - look at System.map file | ||
| 120 | - if was exported and we can query it | ||
| 121 | - we looked it up earlier and recall its address right | ||
| 122 | - we know how it "looks" and can search it | ||
| 123 | |||
| 124 | the first three are equally simple: if it is know where the symbol lives there | ||
| 125 | is no need to search. the fourth means to search a pattern, know to match the | ||
| 126 | symbol in question, inside kernel memory. yes, it works. | ||
| 127 | |||
| 128 | |||
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 */ | ||
diff --git a/other/Kermit/include/Kermit b/other/Kermit/include/Kermit new file mode 100644 index 0000000..bcdb720 --- /dev/null +++ b/other/Kermit/include/Kermit | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* | ||
| 2 | * common header for libKermit | ||
| 3 | * written palmers / teso | ||
| 4 | */ | ||
| 5 | #ifndef __Kermit__ | ||
| 6 | #define __Kermit__ | ||
| 7 | #include <DevMemPatt.hpp> | ||
| 8 | #include <Patch.hpp> | ||
| 9 | #include <SymbolFingp.hpp> | ||
| 10 | #include <SymbolTable.hpp> | ||
| 11 | #include <SystemMap.hpp> | ||
| 12 | #include <name2add.h> | ||
| 13 | #include <rwKernel.hpp> | ||
| 14 | #include <stoi16.hpp> | ||
| 15 | #include <itos16.hpp> | ||
| 16 | #endif /* __Kermit__ */ | ||
diff --git a/other/Kermit/include/Makefile b/other/Kermit/include/Makefile new file mode 100644 index 0000000..97cbe78 --- /dev/null +++ b/other/Kermit/include/Makefile | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | include ../MakeOpt | ||
| 3 | |||
| 4 | all: | ||
| 5 | $(UTIL_DIR)/gen_names_from_proto | ||
| 6 | $(UTIL_DIR)/gen_defines | ||
| 7 | $(UTIL_DIR)/gen_name2add | ||
| 8 | |||
| 9 | clean: | ||
| 10 | rm -rf addresses.h | ||
| 11 | |||
diff --git a/other/Kermit/include/Patch.hpp b/other/Kermit/include/Patch.hpp new file mode 100644 index 0000000..a784f9c --- /dev/null +++ b/other/Kermit/include/Patch.hpp | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | /* | ||
| 2 | * Patch.hpp: | ||
| 3 | * representation of a kernel patch. | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #ifndef __PATCH_C | ||
| 7 | #define __PATCH_C | ||
| 8 | |||
| 9 | #include <rwKernel.hpp> | ||
| 10 | #include <SymbolTable.hpp> | ||
| 11 | #include <SystemMap.hpp> | ||
| 12 | #include <stoi16.hpp> | ||
| 13 | #include <itos16.hpp> | ||
| 14 | #include <utility> | ||
| 15 | #include <functional> | ||
| 16 | #include <algorithm> | ||
| 17 | #include <list> | ||
| 18 | #include <fstream> | ||
| 19 | #include <string> | ||
| 20 | #include <name2add.h> | ||
| 21 | |||
| 22 | |||
| 23 | typedef pair<unsigned int, unsigned int> Addr2Addr; | ||
| 24 | typedef list<Addr2Addr *> Addr2AddrList; | ||
| 25 | |||
| 26 | Addr2AddrList *genReplaceValMap (SymbolTable *st); | ||
| 27 | void genDummyValMap (); | ||
| 28 | extern SystemMap DummyValMap; | ||
| 29 | |||
| 30 | |||
| 31 | #define CLEAN 1 | ||
| 32 | #define LINKED 2 | ||
| 33 | #define APPLIED 4 | ||
| 34 | #define LFAILED 8 | ||
| 35 | #define AFAILED 16 | ||
| 36 | |||
| 37 | |||
| 38 | /** | ||
| 39 | * Representation of a kernel patch. A Patch is a amount of data, which is to be written | ||
| 40 | * to a given address. Patching means modification of kernel memory. Therefore, the data, | ||
| 41 | * which will be overwritten, is saved (before writting). | ||
| 42 | * Additionally the status of the Patch is tracked. Thus, you are able to undo, reapply | ||
| 43 | * and debug patches. The states a Patch must be in are: | ||
| 44 | * CLEAN (the patch was never touched) | ||
| 45 | * LINKED (it was linked without an error) | ||
| 46 | * APPLIED (it was applied without an error) | ||
| 47 | * LFAILED (linking failed) | ||
| 48 | * AFAILED (applying failed) | ||
| 49 | */ | ||
| 50 | class Patch | ||
| 51 | { | ||
| 52 | private: | ||
| 53 | int state; | ||
| 54 | unsigned short len; | ||
| 55 | unsigned char *back_data, *data, *overwr; | ||
| 56 | unsigned int address; | ||
| 57 | rwKernel *local_rw; | ||
| 58 | |||
| 59 | bool initObjects (unsigned char *, unsigned short, unsigned int, rwKernel *); | ||
| 60 | string state2string (); | ||
| 61 | void string2state (string); | ||
| 62 | string data2string (unsigned char *); | ||
| 63 | void string2data (string, unsigned char *); | ||
| 64 | void parse (string); | ||
| 65 | |||
| 66 | public: | ||
| 67 | /** | ||
| 68 | * Create, but init nothing. | ||
| 69 | */ | ||
| 70 | Patch (); | ||
| 71 | |||
| 72 | /** | ||
| 73 | * Create a patch with supplied data. | ||
| 74 | * @param data patch data. | ||
| 75 | * @param len length of patch data. | ||
| 76 | * @param addr memory address to where the data shall be written. | ||
| 77 | */ | ||
| 78 | Patch (unsigned char *data, unsigned short len, unsigned int addr); | ||
| 79 | |||
| 80 | /** | ||
| 81 | * Create a patch with supplied data. This constructor, compared with the above, | ||
| 82 | * will set a local reference to a rwKernel object. | ||
| 83 | * @param x pointer to a rwKernel object. | ||
| 84 | */ | ||
| 85 | Patch (unsigned char *data, unsigned short len, unsigned int addr, rwKernel *x); | ||
| 86 | |||
| 87 | /** | ||
| 88 | * Initialize the object from a string as created by dump (). | ||
| 89 | * @see dump() | ||
| 90 | */ | ||
| 91 | Patch (string); | ||
| 92 | |||
| 93 | /** | ||
| 94 | * Initialize the object from a string as created by dump (). | ||
| 95 | * @see dump() | ||
| 96 | */ | ||
| 97 | Patch (string, rwKernel *); | ||
| 98 | |||
| 99 | /** | ||
| 100 | * Foo. | ||
| 101 | */ | ||
| 102 | ~Patch (); | ||
| 103 | |||
| 104 | |||
| 105 | /** | ||
| 106 | * init object from a string. | ||
| 107 | */ | ||
| 108 | void initFromString (string); | ||
| 109 | |||
| 110 | /** | ||
| 111 | * Foo. | ||
| 112 | */ | ||
| 113 | string getPatchAsString (); | ||
| 114 | |||
| 115 | /** | ||
| 116 | * tells you if the patch data was modified. (e.g. by linking). | ||
| 117 | * @return true if backup data and data differ. | ||
| 118 | */ | ||
| 119 | bool wasChanged (); | ||
| 120 | |||
| 121 | /** | ||
| 122 | * @return true if the linking returned no error messages. | ||
| 123 | */ | ||
| 124 | bool isLinked (); | ||
| 125 | |||
| 126 | /** | ||
| 127 | * @return true if the applying was successful. | ||
| 128 | */ | ||
| 129 | bool isApplied (); | ||
| 130 | |||
| 131 | /** | ||
| 132 | * @return true if linking or applying failed. | ||
| 133 | */ | ||
| 134 | bool isFailed (); | ||
| 135 | |||
| 136 | /** | ||
| 137 | * @return true if the patch was not touched. | ||
| 138 | */ | ||
| 139 | bool isClean (); | ||
| 140 | |||
| 141 | /** | ||
| 142 | * @return the status. | ||
| 143 | */ | ||
| 144 | int getState (); | ||
| 145 | |||
| 146 | /** | ||
| 147 | * Restore patch data. Might be helpful if linking failed. | ||
| 148 | */ | ||
| 149 | void restore (); | ||
| 150 | |||
| 151 | /** | ||
| 152 | * Remove applied Patch (Undo changes done to memory). | ||
| 153 | */ | ||
| 154 | bool remove (); | ||
| 155 | |||
| 156 | /** | ||
| 157 | * Remove applied Patch (Undo changes done to memory). | ||
| 158 | */ | ||
| 159 | bool remove (rwKernel *); | ||
| 160 | |||
| 161 | /** | ||
| 162 | * Get a pointer to patch data. | ||
| 163 | */ | ||
| 164 | unsigned char *getData (); | ||
| 165 | |||
| 166 | /** | ||
| 167 | * Apply the patch to the kernel. Effectivly write the patch data to the supplied address. | ||
| 168 | * The method allows you to supply a a reference to a rwKernel object. you can supply on | ||
| 169 | * construction of the patch. However, there might be none at that time. | ||
| 170 | */ | ||
| 171 | void apply (rwKernel *); | ||
| 172 | |||
| 173 | /** | ||
| 174 | * Apply the patch to the kernel. Use this apply method if you supplied a reference to a | ||
| 175 | * rwKernel object at creation time. | ||
| 176 | */ | ||
| 177 | void apply (); | ||
| 178 | |||
| 179 | /** | ||
| 180 | * link the patch with the kernel. Replace all placeholders with real addresses. | ||
| 181 | */ | ||
| 182 | void link (Addr2AddrList *); | ||
| 183 | |||
| 184 | /** | ||
| 185 | * Dump patch information into a file. This will produce human readable output. It | ||
| 186 | * can be used e.g. for restoring and debugging. Because the output is line based | ||
| 187 | * and can be used to initialize a Patch object you are effecitvely able to reproduce | ||
| 188 | * patching sessions. | ||
| 189 | * @see Patch(string) | ||
| 190 | * @param file filename. | ||
| 191 | */ | ||
| 192 | void dump (string file); | ||
| 193 | |||
| 194 | /** | ||
| 195 | * Foo. | ||
| 196 | */ | ||
| 197 | friend istream& operator>> (istream&, Patch&); | ||
| 198 | |||
| 199 | /** | ||
| 200 | * Foo. | ||
| 201 | */ | ||
| 202 | friend ostream& operator<< (ostream&, Patch&); | ||
| 203 | }; | ||
| 204 | #endif /* __PATCH_C */ | ||
diff --git a/other/Kermit/include/SymbolFingp.hpp b/other/Kermit/include/SymbolFingp.hpp new file mode 100644 index 0000000..248ed13 --- /dev/null +++ b/other/Kermit/include/SymbolFingp.hpp | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | /* | ||
| 2 | * SymbolFingp.hpp: | ||
| 3 | * some fingerprint | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #ifndef __SymbolFingp_H | ||
| 7 | #define __SymbolFingp_H | ||
| 8 | #include <map> | ||
| 9 | #include <fstream> | ||
| 10 | #include <string> | ||
| 11 | #include <iostream> | ||
| 12 | |||
| 13 | /* default file to open */ | ||
| 14 | #define DEFAULT_FILE "SymbolFind.conf" | ||
| 15 | |||
| 16 | /* defines used for the type field in struct cell */ | ||
| 17 | #define WWCARD 1 | ||
| 18 | #define NOCARD 0 | ||
| 19 | |||
| 20 | |||
| 21 | struct cell | ||
| 22 | { | ||
| 23 | unsigned char type; | ||
| 24 | unsigned char val; | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | struct sfp | ||
| 29 | { | ||
| 30 | char *name; | ||
| 31 | unsigned long start_addr; | ||
| 32 | unsigned long stop_addr; | ||
| 33 | long offset; | ||
| 34 | unsigned short length; | ||
| 35 | struct cell *fp; | ||
| 36 | }; | ||
| 37 | |||
| 38 | |||
| 39 | /** | ||
| 40 | * class to hold fingerprints of a function (a [kernel-]symbol). | ||
| 41 | */ | ||
| 42 | class SymbolFingp | ||
| 43 | { | ||
| 44 | private: | ||
| 45 | |||
| 46 | typedef map<string, struct sfp> FingerThing; | ||
| 47 | FingerThing Fingers; | ||
| 48 | |||
| 49 | void readFingers (ifstream); | ||
| 50 | bool addFinger (struct sfp *); | ||
| 51 | |||
| 52 | public: | ||
| 53 | |||
| 54 | /** | ||
| 55 | * Reads configuration from default file. | ||
| 56 | */ | ||
| 57 | SymbolFingp (); | ||
| 58 | |||
| 59 | /** | ||
| 60 | * Reads configuration from specified file. | ||
| 61 | */ | ||
| 62 | SymbolFingp (string); | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Foo. | ||
| 66 | */ | ||
| 67 | ~SymbolFingp (); | ||
| 68 | |||
| 69 | /** | ||
| 70 | * Return the Fingerprint matching the supplied name. | ||
| 71 | */ | ||
| 72 | struct sfp *getFinger (string); | ||
| 73 | }; | ||
| 74 | |||
| 75 | #endif /* __SymbolFingp_H */ | ||
diff --git a/other/Kermit/include/SymbolTable.hpp b/other/Kermit/include/SymbolTable.hpp new file mode 100644 index 0000000..b0f8aa3 --- /dev/null +++ b/other/Kermit/include/SymbolTable.hpp | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | /* | ||
| 2 | * SymbolTable.hpp: | ||
| 3 | * a container for "on-demand" symbol address fetching | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #ifndef __SYMBOL_TABLE_C | ||
| 7 | #define __SYMBOL_TABLE_C | ||
| 8 | |||
| 9 | #include <SymbolFingp.hpp> | ||
| 10 | #include <SystemMap.hpp> | ||
| 11 | #include <DevMemPatt.hpp> | ||
| 12 | #include <rwKernel.hpp> | ||
| 13 | #include <list> | ||
| 14 | #include <string> | ||
| 15 | #include <iostream> | ||
| 16 | #include <fstream> | ||
| 17 | #include <algorithm> | ||
| 18 | #include <iterator> | ||
| 19 | |||
| 20 | #define DEFAULTDUMP "SymbolTableDump" | ||
| 21 | #define DEFAULTSYSTEMMAP "System.map" | ||
| 22 | |||
| 23 | typedef struct | ||
| 24 | { | ||
| 25 | string Name; | ||
| 26 | unsigned int Address; | ||
| 27 | } zzSym; | ||
| 28 | typedef list<zzSym *> zzSymList; | ||
| 29 | |||
| 30 | |||
| 31 | /** | ||
| 32 | * A container class for "on-demand" symbol address fetching. | ||
| 33 | */ | ||
| 34 | class SymbolTable | ||
| 35 | { | ||
| 36 | private: | ||
| 37 | SymbolFingp *fing; | ||
| 38 | DevMemPatt *patt; | ||
| 39 | SystemMap exported; | ||
| 40 | SystemMap mapp; | ||
| 41 | SystemMap rest; | ||
| 42 | string dump_file; | ||
| 43 | |||
| 44 | bool createObjects (rwKernel *); | ||
| 45 | bool loadFiles (string, string); | ||
| 46 | |||
| 47 | public: | ||
| 48 | /** | ||
| 49 | * List of name, address pairs. | ||
| 50 | */ | ||
| 51 | zzSymList symList; | ||
| 52 | |||
| 53 | /** | ||
| 54 | * Construct a SymbolTable object and load configuration from default files. | ||
| 55 | */ | ||
| 56 | SymbolTable (); | ||
| 57 | |||
| 58 | /** | ||
| 59 | * Construct a SymbolTable object and load configuration from defined files. | ||
| 60 | * @param res file name of restore file. | ||
| 61 | * @param sys System.map file to load. | ||
| 62 | */ | ||
| 63 | SymbolTable (string res, string sys); | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Construct a SymbolTable object and use the referenced rwKernel object in all | ||
| 67 | * member attributes and methods. | ||
| 68 | */ | ||
| 69 | SymbolTable (rwKernel *); | ||
| 70 | |||
| 71 | /** | ||
| 72 | * Foo. | ||
| 73 | */ | ||
| 74 | ~SymbolTable (); | ||
| 75 | |||
| 76 | /** | ||
| 77 | * Define the file written to on saveCache (). | ||
| 78 | * @see saveCache() | ||
| 79 | */ | ||
| 80 | void setSaveFile (string); | ||
| 81 | |||
| 82 | /** | ||
| 83 | * get the address of a known symbol. | ||
| 84 | * @return If the symbol is unknow zero is returned. | ||
| 85 | * (hey, would you call 0x00000000?). Else, the address | ||
| 86 | * of the symbol. | ||
| 87 | */ | ||
| 88 | unsigned int getSymbol (string); | ||
| 89 | |||
| 90 | /** | ||
| 91 | * Find a symbol. This will try all available methods to | ||
| 92 | * find a symbol and cache the address, name pair (zero | ||
| 93 | * if search was not successfull). | ||
| 94 | * @return true on success. | ||
| 95 | */ | ||
| 96 | bool findSymbol (string); | ||
| 97 | |||
| 98 | /** | ||
| 99 | * add a symbol, address pair to the cache. | ||
| 100 | */ | ||
| 101 | void addSymbolToCache (string, unsigned int); | ||
| 102 | |||
| 103 | /** | ||
| 104 | * flush the address cache. | ||
| 105 | */ | ||
| 106 | void clearCache (); | ||
| 107 | |||
| 108 | /** | ||
| 109 | * save the cache to a file (human readable, System.map style). | ||
| 110 | */ | ||
| 111 | bool saveCache (); | ||
| 112 | }; | ||
| 113 | #endif /* __SYMBOL_TABLE_C */ | ||
diff --git a/other/Kermit/include/SystemMap.hpp b/other/Kermit/include/SystemMap.hpp new file mode 100644 index 0000000..ff59094 --- /dev/null +++ b/other/Kermit/include/SystemMap.hpp | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | * SystemMap.hpp: | ||
| 3 | * representation if a system map file (and alike). | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #ifndef SYSTEM_MAP_C | ||
| 7 | #define SYSTEM_MAP_C | ||
| 8 | |||
| 9 | #include <map> | ||
| 10 | #include <string> | ||
| 11 | #include <fstream> | ||
| 12 | |||
| 13 | /** | ||
| 14 | * Representation of a System.map file. It maps names to addresses. | ||
| 15 | */ | ||
| 16 | class SystemMap | ||
| 17 | { | ||
| 18 | private: | ||
| 19 | typedef map<string, unsigned int> blamap; | ||
| 20 | typedef blamap::value_type bla_val; | ||
| 21 | |||
| 22 | blamap add_map; | ||
| 23 | |||
| 24 | public: | ||
| 25 | /** | ||
| 26 | * Create a SystemMap object and read symbol names and addresses from a file. | ||
| 27 | */ | ||
| 28 | SystemMap (string file); | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Create a SystemMap object and leave it empty. | ||
| 32 | */ | ||
| 33 | SystemMap (); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * Foo. | ||
| 37 | */ | ||
| 38 | ~SystemMap (); | ||
| 39 | |||
| 40 | /** | ||
| 41 | * Check if a symbol (by name) is part of the object. | ||
| 42 | * @return true if the questioned symbol is part of the object (else false). | ||
| 43 | */ | ||
| 44 | bool contains (string); | ||
| 45 | |||
| 46 | /** | ||
| 47 | * Add a name, address pair to the object. | ||
| 48 | * @param name Symbolname. If a symbol with this name already exists | ||
| 49 | * it will not be added. | ||
| 50 | * @param address the address of the symbol. | ||
| 51 | */ | ||
| 52 | void add (string name, unsigned int address); | ||
| 53 | |||
| 54 | /** | ||
| 55 | * Random access operator for accessing elements in the form x = <name>[<symbol>]. | ||
| 56 | * @param name of a symbol. | ||
| 57 | * @return the address of symbol name. | ||
| 58 | */ | ||
| 59 | unsigned int operator[] (string name); | ||
| 60 | }; | ||
| 61 | #endif /* SYSTEM_MAP_C */ | ||
diff --git a/other/Kermit/include/addresses.h b/other/Kermit/include/addresses.h new file mode 100644 index 0000000..8f9dee6 --- /dev/null +++ b/other/Kermit/include/addresses.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * addresses.h: | ||
| 3 | * this file was automaticly generated by gen_defines | ||
| 4 | */ | ||
| 5 | #define SYS_FORK_ADD 0xf8f8f8f8 | ||
| 6 | #define SYS_READ_ADD 0xf8f8f7f7 | ||
| 7 | #define SYS_WRITE_ADD 0xf8f8f6f6 | ||
| 8 | #define SYS_EXIT_ADD 0xf8f8f5f5 | ||
| 9 | #define SYS_SETUID_ADD 0xf8f8f4f4 | ||
| 10 | #define SYS_SETGID_ADD 0xf8f8f3f3 | ||
| 11 | #define SYS_GETUID_ADD 0xf8f8f2f2 | ||
| 12 | #define SYS_GETGID_ADD 0xf8f8f1f1 | ||
| 13 | #define SYS_OPEN_ADD 0xf8f8f0f0 | ||
| 14 | #define SYS_CLOSE_ADD 0xf8f8efef | ||
| 15 | #define KMALLOC_ADD 0xf8f8eeee | ||
| 16 | /* | ||
| 17 | * addresses.h: | ||
| 18 | * this file was automaticly generated by gen_defines | ||
| 19 | */ | ||
| 20 | #define SYS_FORK_ADD 0xf8f8f8f8 | ||
| 21 | #define SYS_READ_ADD 0xf8f8f7f7 | ||
| 22 | #define SYS_WRITE_ADD 0xf8f8f6f6 | ||
| 23 | #define SYS_EXIT_ADD 0xf8f8f5f5 | ||
| 24 | #define SYS_SETUID_ADD 0xf8f8f4f4 | ||
| 25 | #define SYS_SETGID_ADD 0xf8f8f3f3 | ||
| 26 | #define SYS_GETUID_ADD 0xf8f8f2f2 | ||
| 27 | #define SYS_GETGID_ADD 0xf8f8f1f1 | ||
| 28 | #define SYS_OPEN_ADD 0xf8f8f0f0 | ||
| 29 | #define SYS_CLOSE_ADD 0xf8f8efef | ||
| 30 | #define KMALLOC_ADD 0xf8f8eeee | ||
diff --git a/other/Kermit/include/arch.hpp b/other/Kermit/include/arch.hpp new file mode 100644 index 0000000..3ac1a90 --- /dev/null +++ b/other/Kermit/include/arch.hpp | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * maybe used for porting ... | ||
| 3 | * (ignore this file.) | ||
| 4 | */ | ||
| 5 | #ifdef __ALWAYS_UNDEFINED | ||
| 6 | template <class Ad_t, bool BE, unsigned short A> | ||
| 7 | class Architecture | ||
| 8 | { | ||
| 9 | private: | ||
| 10 | le_replace (unsigned char *, AddressType); | ||
| 11 | be_replace (unsigned char *, AddressType); | ||
| 12 | |||
| 13 | public: | ||
| 14 | typedef Ad_t AddressType; /* type capable for holding a memory address as integer */ | ||
| 15 | bool BigEndian; /* true if machine uses big endian */ | ||
| 16 | unsigned short Align; /* data alignment - needed? (sanity checks) */ | ||
| 17 | |||
| 18 | Architecture () | ||
| 19 | { | ||
| 20 | BigEndian = BE; | ||
| 21 | Align = A; | ||
| 22 | } | ||
| 23 | |||
| 24 | replaceAddress (unsigned char *, AddressType); | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | Architecture<unsigned int, false, 4> x86; | ||
| 29 | // ... | ||
| 30 | |||
| 31 | #define x86 this_arch; | ||
| 32 | #endif | ||
diff --git a/other/Kermit/include/itos16.hpp b/other/Kermit/include/itos16.hpp new file mode 100644 index 0000000..21ce390 --- /dev/null +++ b/other/Kermit/include/itos16.hpp | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | /* | ||
| 2 | * itos16.hpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #ifndef __ITOS16_C | ||
| 6 | #define __ITOS16_C | ||
| 7 | #include <string> | ||
| 8 | string itos16 (unsigned int); | ||
| 9 | #endif /* __ITOS16_C */ | ||
diff --git a/other/Kermit/include/name2add.h b/other/Kermit/include/name2add.h new file mode 100644 index 0000000..ad10c88 --- /dev/null +++ b/other/Kermit/include/name2add.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* | ||
| 2 | * name2add.h: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #ifndef __NAME2ADD | ||
| 6 | #define __NAME2ADD | ||
| 7 | |||
| 8 | typedef struct | ||
| 9 | { | ||
| 10 | char *name; | ||
| 11 | unsigned int add; | ||
| 12 | } __name2add; | ||
| 13 | |||
| 14 | extern __name2add __n2a[]; | ||
| 15 | |||
| 16 | #endif /* __NAME2ADD*/ | ||
diff --git a/other/Kermit/include/pseudo_link.h b/other/Kermit/include/pseudo_link.h new file mode 100644 index 0000000..44a139c --- /dev/null +++ b/other/Kermit/include/pseudo_link.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* | ||
| 2 | * pseudo_link.h: | ||
| 3 | * file for pseudolinking. | ||
| 4 | * put all your pointer to function prototypes here. | ||
| 5 | * written by palmers / teso | ||
| 6 | */ | ||
| 7 | #include <glob.h> | ||
| 8 | #include <linux/types.h> | ||
| 9 | #include <sys/stat.h> | ||
| 10 | #include <sys/types.h> | ||
| 11 | #include <asm/ptrace.h> | ||
| 12 | #include <addresses.h> | ||
| 13 | |||
| 14 | #define USE_SYS_FORK \ | ||
| 15 | int (*sys_fork)(struct pt_regs) = \ | ||
| 16 | (int (*)(struct pt_regs))SYS_FORK_ADD; /* arch dependant! */ | ||
| 17 | |||
| 18 | #define USE_SYS_READ \ | ||
| 19 | size_t (*sys_read)(unsigned int, char *, size_t) = \ | ||
| 20 | (size_t (*)(unsigned int, char *, size_t))SYS_READ_ADD; | ||
| 21 | |||
| 22 | #define USE_SYS_WRITE \ | ||
| 23 | size_t (*sys_write)(unsigned int, char *, size_t) = \ | ||
| 24 | (size_t (*)(unsigned int, char *, size_t))SYS_WRITE_ADD; | ||
| 25 | |||
| 26 | #define USE_SYS_EXIT \ | ||
| 27 | int (*sys_exit)(int) = \ | ||
| 28 | (int (*)(int))SYS_EXIT_ADD; | ||
| 29 | |||
| 30 | #define USE_SYS_SETUID \ | ||
| 31 | int (*sys_setuid)(uid_t) = \ | ||
| 32 | (int (*)(uid_t))SYS_SETUID_ADD; | ||
| 33 | |||
| 34 | #define USE_SYS_SETGID \ | ||
| 35 | int (*sys_setgid)(gid_t) = \ | ||
| 36 | (int (*)(gid_t))SYS_SETGID_ADD; | ||
| 37 | |||
| 38 | #define USE_SYS_GETUID \ | ||
| 39 | int (*sys_getuid)(void) = \ | ||
| 40 | (int (*)(void))SYS_GETUID_ADD; | ||
| 41 | |||
| 42 | #define USE_SYS_GETGID \ | ||
| 43 | int (*sys_getgid)(void) = \ | ||
| 44 | (int (*)(void))SYS_GETGID_ADD; | ||
| 45 | |||
| 46 | #define USE_SYS_OPEN \ | ||
| 47 | int (*sys_open)(const char *, int, int) = \ | ||
| 48 | (int (*)(const char *, int, int))SYS_OPEN_ADD; | ||
| 49 | |||
| 50 | #define USE_SYS_CLOSE \ | ||
| 51 | int (*sys_close)(int) = \ | ||
| 52 | (int (*)(int))SYS_CLOSE_ADD; | ||
| 53 | |||
| 54 | #define USE_KMALLOC \ | ||
| 55 | void *(*kmalloc)(size_t, int) = \ | ||
| 56 | (void *(*)(size_t, int)) KMALLOC_ADD; | ||
| 57 | |||
| 58 | |||
diff --git a/other/Kermit/include/rwKernel.hpp b/other/Kermit/include/rwKernel.hpp new file mode 100644 index 0000000..3b57750 --- /dev/null +++ b/other/Kermit/include/rwKernel.hpp | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | * rwKernel.hpp: | ||
| 3 | * access to kernel memory. | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #ifndef __RW_KERNEL_C | ||
| 7 | #define __RW_KERNEL_C | ||
| 8 | |||
| 9 | #include <algorithm> | ||
| 10 | |||
| 11 | #define PROCKCORE 213 | ||
| 12 | #define DEVMEM 23846 | ||
| 13 | |||
| 14 | #define CONF_1GB 34 | ||
| 15 | #define CONF_2GB 33 | ||
| 16 | #define CONF_3GB 32 | ||
| 17 | #define IGNORE 31 | ||
| 18 | |||
| 19 | /** | ||
| 20 | * Wrapper around kernel memory access. It lets you read from | ||
| 21 | * and write to the kernel without taking care of offsets or file access. | ||
| 22 | */ | ||
| 23 | class rwKernel | ||
| 24 | { | ||
| 25 | private: | ||
| 26 | |||
| 27 | char *fd; | ||
| 28 | int which; | ||
| 29 | unsigned int mem_conf; | ||
| 30 | |||
| 31 | bool openFile (int); | ||
| 32 | void closeFile (); | ||
| 33 | void setOffset (int); | ||
| 34 | |||
| 35 | |||
| 36 | public: | ||
| 37 | |||
| 38 | /** | ||
| 39 | * Create the object with a fairly standard configuration. This constructor will assume | ||
| 40 | * that you want to use /dev/mem and a standard offset (as used by any 2.4.x and any | ||
| 41 | * 2.2.x kernel not defined to use more than 1GB of ram). | ||
| 42 | */ | ||
| 43 | rwKernel (); | ||
| 44 | |||
| 45 | /** | ||
| 46 | * Create a rwKernel object with the defined parameters. | ||
| 47 | * @param file sets the file to use. This must be either | ||
| 48 | * PROCKCORE (to use /proc/kcore as the memory device) or | ||
| 49 | * DEVMEM (to use /dev/mem as the memory device). | ||
| 50 | * @param offset sets the offset from real memory addresses | ||
| 51 | * to virtual (kernel-) addresses. This is only needed if | ||
| 52 | * (file == DEVMEM), otherways supply IGNORE. | ||
| 53 | */ | ||
| 54 | rwKernel (int file, int offset); | ||
| 55 | |||
| 56 | /** | ||
| 57 | * Destructor. Will unmap the used device. | ||
| 58 | */ | ||
| 59 | ~rwKernel (); | ||
| 60 | |||
| 61 | /** | ||
| 62 | * read from kernel. | ||
| 63 | * @param dest read data to this address. | ||
| 64 | * @param len amount of bytes to read. | ||
| 65 | * @param addr read data from this address. | ||
| 66 | */ | ||
| 67 | void read (unsigned char *dest, unsigned int len, unsigned int addr); | ||
| 68 | |||
| 69 | /** | ||
| 70 | * write to kernel. | ||
| 71 | * @param src read data from this address. | ||
| 72 | * @param len amount of bytes to write. | ||
| 73 | * @param addr write data to this address. | ||
| 74 | */ | ||
| 75 | void write (unsigned char *src, unsigned int len, unsigned int addr); | ||
| 76 | |||
| 77 | /** | ||
| 78 | * Foo. | ||
| 79 | */ | ||
| 80 | void read (char *a, unsigned int b, unsigned int c) | ||
| 81 | { | ||
| 82 | read ((unsigned char *) a, b, c); | ||
| 83 | } | ||
| 84 | |||
| 85 | /** | ||
| 86 | * Foo. | ||
| 87 | */ | ||
| 88 | void write (char *a, unsigned int b, unsigned int c) | ||
| 89 | { | ||
| 90 | write ((unsigned char *) a, b, c); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | |||
| 94 | #endif /* __RW_KERNEL_C */ | ||
diff --git a/other/Kermit/include/stoi16.hpp b/other/Kermit/include/stoi16.hpp new file mode 100644 index 0000000..cbf75b6 --- /dev/null +++ b/other/Kermit/include/stoi16.hpp | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | /* | ||
| 2 | * stoi16.hpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #ifndef __STOI16_C | ||
| 6 | #define __STOI16_C | ||
| 7 | #include <string> | ||
| 8 | |||
| 9 | /** | ||
| 10 | * Convert a string of hexadecimal charcters to an unsigned integer. | ||
| 11 | */ | ||
| 12 | unsigned int stoi16 (string); | ||
| 13 | #endif /* __STOI16_C */ | ||
diff --git a/other/Kermit/lib/DevMemPatt.cpp b/other/Kermit/lib/DevMemPatt.cpp new file mode 100644 index 0000000..81fd6e9 --- /dev/null +++ b/other/Kermit/lib/DevMemPatt.cpp | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* | ||
| 2 | * DevMemPatt.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <DevMemPatt.hpp> | ||
| 6 | |||
| 7 | |||
| 8 | DevMemPatt::DevMemPatt () | ||
| 9 | { | ||
| 10 | rw = new rwKernel (); | ||
| 11 | } | ||
| 12 | |||
| 13 | |||
| 14 | DevMemPatt::DevMemPatt (rwKernel *a) | ||
| 15 | { | ||
| 16 | rw = a; | ||
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | DevMemPatt::~DevMemPatt () | ||
| 21 | { | ||
| 22 | } | ||
| 23 | |||
| 24 | |||
| 25 | int DevMemPatt::compare_data_snippet (unsigned char *x, struct sfp *y) | ||
| 26 | { | ||
| 27 | bool i = false; | ||
| 28 | int ret = -1; | ||
| 29 | short a = 0, | ||
| 30 | b = 0; | ||
| 31 | |||
| 32 | while ((b < y->length) && (a < READ_BUFF_SIZE)) | ||
| 33 | { | ||
| 34 | if ((x[a] == y->fp[b].val) || (y->fp[b].type == WWCARD)) | ||
| 35 | { | ||
| 36 | if (i == false) | ||
| 37 | { | ||
| 38 | i = true; | ||
| 39 | ret = a; | ||
| 40 | } | ||
| 41 | b++; | ||
| 42 | } | ||
| 43 | else if (i == true) | ||
| 44 | { | ||
| 45 | i = false; | ||
| 46 | ret = -1; | ||
| 47 | b = 0; | ||
| 48 | } | ||
| 49 | a++; | ||
| 50 | } | ||
| 51 | return ret; | ||
| 52 | } | ||
| 53 | |||
| 54 | |||
| 55 | unsigned int DevMemPatt::find_patt (unsigned int s, \ | ||
| 56 | unsigned int e, unsigned short l, unsigned char *snipp) | ||
| 57 | { | ||
| 58 | bool i = false; | ||
| 59 | int ret = -1; | ||
| 60 | unsigned short a = 0, | ||
| 61 | b = 0; | ||
| 62 | unsigned char *readBuff = NULL; | ||
| 63 | |||
| 64 | readBuff = new unsigned char[READ_BUFF_SIZE]; | ||
| 65 | |||
| 66 | while (s < e) | ||
| 67 | { | ||
| 68 | rw->read (readBuff, READ_BUFF_SIZE, s); | ||
| 69 | while ((b < l) && (a < READ_BUFF_SIZE)) | ||
| 70 | { | ||
| 71 | if (readBuff[a] == snipp[b]) | ||
| 72 | { | ||
| 73 | if (i == false) | ||
| 74 | { | ||
| 75 | i = true; | ||
| 76 | ret = a; | ||
| 77 | } | ||
| 78 | b++; | ||
| 79 | } | ||
| 80 | else if (i == true) | ||
| 81 | { | ||
| 82 | i = false; | ||
| 83 | ret = -1; | ||
| 84 | b = 0; | ||
| 85 | } | ||
| 86 | a++; | ||
| 87 | } | ||
| 88 | if (ret != -1) | ||
| 89 | { | ||
| 90 | if (ret == 0) | ||
| 91 | return s; | ||
| 92 | s = s + ret - READ_BUFF_SIZE; | ||
| 93 | } | ||
| 94 | s += READ_BUFF_SIZE; | ||
| 95 | } | ||
| 96 | return 0; | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | unsigned int DevMemPatt::find_patt (struct sfp *a) | ||
| 101 | { | ||
| 102 | int x = -1; | ||
| 103 | unsigned int s = a->start_addr, | ||
| 104 | e = a->stop_addr; | ||
| 105 | unsigned char *readBuff = NULL; | ||
| 106 | |||
| 107 | readBuff = new unsigned char[READ_BUFF_SIZE]; | ||
| 108 | |||
| 109 | while (s < e) | ||
| 110 | { | ||
| 111 | rw->read (readBuff, READ_BUFF_SIZE, s); | ||
| 112 | if ((x = compare_data_snippet (readBuff, a)) != -1) | ||
| 113 | { | ||
| 114 | if (x == 0) | ||
| 115 | return s; | ||
| 116 | s = s + x - READ_BUFF_SIZE; | ||
| 117 | } | ||
| 118 | s += READ_BUFF_SIZE; | ||
| 119 | } | ||
| 120 | return 0; | ||
| 121 | } | ||
| 122 | |||
diff --git a/other/Kermit/lib/DevMemPatt.o b/other/Kermit/lib/DevMemPatt.o new file mode 100644 index 0000000..196bdfd --- /dev/null +++ b/other/Kermit/lib/DevMemPatt.o | |||
| Binary files differ | |||
diff --git a/other/Kermit/lib/Makefile b/other/Kermit/lib/Makefile new file mode 100644 index 0000000..6d1a1a8 --- /dev/null +++ b/other/Kermit/lib/Makefile | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | include ../MakeOpt | ||
| 3 | |||
| 4 | OBJECTS = name2add.o Patch.o DevMemPatt.o SymbolTable.o SystemMap.o \ | ||
| 5 | stoi16.o itos16.o rwKernel.o SymbolFingp.o | ||
| 6 | |||
| 7 | |||
| 8 | all: $(OBJECTS) libs | ||
| 9 | |||
| 10 | libs: | ||
| 11 | $(AR) $(ARFLAGS) $(AR_OUT) $(OBJECTS) | ||
| 12 | $(CXX) $(CXXFLAGS) -shared -o $(SHARE_OUT) $(OBJECTS) | ||
| 13 | |||
| 14 | clean: | ||
| 15 | rm -rf *.o name2add.c $(SHARE_OUT) $(AR_OUT) | ||
| 16 | |||
diff --git a/other/Kermit/lib/Patch.cpp b/other/Kermit/lib/Patch.cpp new file mode 100644 index 0000000..b72f860 --- /dev/null +++ b/other/Kermit/lib/Patch.cpp | |||
| @@ -0,0 +1,502 @@ | |||
| 1 | /* | ||
| 2 | * Patch.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <Patch.hpp> | ||
| 6 | |||
| 7 | SystemMap DummyValMap; | ||
| 8 | |||
| 9 | /* | ||
| 10 | * helper class | ||
| 11 | */ | ||
| 12 | class replaceAddr | ||
| 13 | { | ||
| 14 | private: | ||
| 15 | unsigned char *data; | ||
| 16 | unsigned short len; | ||
| 17 | |||
| 18 | public: | ||
| 19 | replaceAddr (unsigned char *a, unsigned short x) | ||
| 20 | { | ||
| 21 | data = a; | ||
| 22 | len = x; | ||
| 23 | } | ||
| 24 | |||
| 25 | void operator() (Addr2Addr *a) | ||
| 26 | { | ||
| 27 | unsigned short x = 0; | ||
| 28 | unsigned char *b = NULL, | ||
| 29 | *c = NULL; | ||
| 30 | |||
| 31 | b = (unsigned char *) &a->first; | ||
| 32 | c = (unsigned char *) &a->second; | ||
| 33 | |||
| 34 | for (x = 0; x <= (len - 3); x++) | ||
| 35 | { | ||
| 36 | if (b[0] == data[x]) | ||
| 37 | { | ||
| 38 | if ((b[1] == data[x + 1]) && \ | ||
| 39 | (b[2] == data[x + 2]) && \ | ||
| 40 | (b[3] == data[x + 3])) | ||
| 41 | { | ||
| 42 | data[x] = c[0]; | ||
| 43 | data[x + 1] = c[1]; | ||
| 44 | data[x + 2] = c[2]; | ||
| 45 | data[x + 3] = c[3]; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | } | ||
| 50 | }; | ||
| 51 | |||
| 52 | |||
| 53 | /* | ||
| 54 | * member functions | ||
| 55 | */ | ||
| 56 | string Patch::state2string () | ||
| 57 | { | ||
| 58 | string ret; | ||
| 59 | |||
| 60 | switch (state) | ||
| 61 | { | ||
| 62 | case CLEAN: | ||
| 63 | ret = "Clean"; | ||
| 64 | break; | ||
| 65 | case LINKED: | ||
| 66 | ret = "Linked"; | ||
| 67 | break; | ||
| 68 | case APPLIED: | ||
| 69 | ret = "Applied"; | ||
| 70 | break; | ||
| 71 | case AFAILED: | ||
| 72 | ret = "ApplyFailed"; | ||
| 73 | break; | ||
| 74 | case LFAILED: | ||
| 75 | ret = "LinkFailed"; | ||
| 76 | break; | ||
| 77 | default: | ||
| 78 | ret = "Unknown"; | ||
| 79 | break; | ||
| 80 | } | ||
| 81 | return ret; | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | void Patch::string2state (string a) | ||
| 86 | { | ||
| 87 | if (a == "Clean") | ||
| 88 | state = CLEAN; | ||
| 89 | else if (a == "Linked") | ||
| 90 | state = LINKED; | ||
| 91 | else if (a == "Applied") | ||
| 92 | state = APPLIED; | ||
| 93 | else if (a == "ApplyFailed") | ||
| 94 | state = AFAILED; | ||
| 95 | else if (a == "LinkFailed") | ||
| 96 | state = LFAILED; | ||
| 97 | else if (a == "Unknown") | ||
| 98 | abort (); | ||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | string Patch::data2string (unsigned char *a) | ||
| 103 | { | ||
| 104 | string ret; | ||
| 105 | int x; | ||
| 106 | |||
| 107 | ret = itos16 ((unsigned int) a[0]); | ||
| 108 | for (x = 1; x < len; x++) | ||
| 109 | { | ||
| 110 | ret += ' '; | ||
| 111 | ret += itos16 ((unsigned int) a[x]); | ||
| 112 | } | ||
| 113 | |||
| 114 | return ret; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 118 | void Patch::string2data (string s, unsigned char *d) | ||
| 119 | { | ||
| 120 | string tmp; | ||
| 121 | unsigned short x, | ||
| 122 | y; | ||
| 123 | |||
| 124 | for (x = 0; x < (len - 1); x++) | ||
| 125 | { | ||
| 126 | y = s.find_first_of (" "); | ||
| 127 | tmp.resize (y); | ||
| 128 | s.copy (tmp.begin (), y); | ||
| 129 | s.erase (0, y + 1); | ||
| 130 | d[x] = (unsigned char) stoi16 (tmp) & 0xff; | ||
| 131 | tmp.erase (); | ||
| 132 | } | ||
| 133 | tmp.resize (s.length ()); | ||
| 134 | s.copy (tmp.begin (), s.length ()); | ||
| 135 | d[x] = (unsigned char) stoi16 (tmp) & 0xff; | ||
| 136 | } | ||
| 137 | |||
| 138 | |||
| 139 | bool Patch::initObjects (unsigned char *d, unsigned short l, unsigned int add, rwKernel *x) | ||
| 140 | { | ||
| 141 | len = l; | ||
| 142 | address = add; | ||
| 143 | local_rw = x; | ||
| 144 | |||
| 145 | data = new unsigned char[len]; | ||
| 146 | back_data = new unsigned char[len]; | ||
| 147 | overwr = new unsigned char[len]; | ||
| 148 | |||
| 149 | copy (d, d + len, data); | ||
| 150 | copy (d, d + len, back_data); | ||
| 151 | state = CLEAN; | ||
| 152 | return true; | ||
| 153 | } | ||
| 154 | |||
| 155 | |||
| 156 | void Patch::parse (string s) | ||
| 157 | { | ||
| 158 | unsigned char *a = NULL; | ||
| 159 | string tmp; | ||
| 160 | int x = 0; | ||
| 161 | |||
| 162 | x = s.find_first_of (","); | ||
| 163 | tmp.resize (x); | ||
| 164 | s.copy (tmp.begin (), x); | ||
| 165 | s.erase (0, x + 1); | ||
| 166 | |||
| 167 | address = stoi16 (tmp); | ||
| 168 | tmp.erase (); | ||
| 169 | |||
| 170 | x = s.find_first_of (":"); | ||
| 171 | tmp.resize (x); | ||
| 172 | s.copy (tmp.begin (), x); | ||
| 173 | s.erase (0, x + 1); | ||
| 174 | |||
| 175 | string2state (tmp); | ||
| 176 | tmp.erase (); | ||
| 177 | |||
| 178 | x = s.find_first_of ("("); | ||
| 179 | s.erase (0, x + 1); | ||
| 180 | |||
| 181 | x = s.find_first_of (")"); | ||
| 182 | tmp.resize (x); | ||
| 183 | s.copy (tmp.begin (), x); | ||
| 184 | len = count (tmp.begin (), tmp.end (), ' ') + 1; | ||
| 185 | |||
| 186 | data = new unsigned char[len]; | ||
| 187 | back_data = new unsigned char[len]; | ||
| 188 | overwr = new unsigned char[len]; | ||
| 189 | |||
| 190 | string2data (tmp, data); | ||
| 191 | tmp.erase (); | ||
| 192 | |||
| 193 | if (state == CLEAN) | ||
| 194 | return; | ||
| 195 | |||
| 196 | switch (state) | ||
| 197 | { | ||
| 198 | case LINKED: | ||
| 199 | case LFAILED: | ||
| 200 | a = back_data; | ||
| 201 | break; | ||
| 202 | case APPLIED: | ||
| 203 | case AFAILED: | ||
| 204 | a = overwr; | ||
| 205 | break; | ||
| 206 | } | ||
| 207 | |||
| 208 | x = s.find_first_of ("("); | ||
| 209 | s.erase (0, x + 1); | ||
| 210 | |||
| 211 | x = s.find_first_of (")"); | ||
| 212 | tmp.resize (x); | ||
| 213 | s.copy (tmp.begin (), x); | ||
| 214 | |||
| 215 | string2data (tmp, a); | ||
| 216 | } | ||
| 217 | |||
| 218 | |||
| 219 | Patch::Patch () | ||
| 220 | { | ||
| 221 | } | ||
| 222 | |||
| 223 | |||
| 224 | Patch::Patch (unsigned char *d, unsigned short l, unsigned int add) | ||
| 225 | { | ||
| 226 | initObjects (d, l, add, NULL); | ||
| 227 | } | ||
| 228 | |||
| 229 | |||
| 230 | Patch::Patch (unsigned char *d, unsigned short l, unsigned int add, rwKernel *x) | ||
| 231 | { | ||
| 232 | initObjects (d, l, add, x); | ||
| 233 | } | ||
| 234 | |||
| 235 | |||
| 236 | Patch::Patch (string s) | ||
| 237 | { | ||
| 238 | parse (s); | ||
| 239 | } | ||
| 240 | |||
| 241 | |||
| 242 | Patch::Patch (string s, rwKernel *rw) | ||
| 243 | { | ||
| 244 | parse (s); | ||
| 245 | local_rw = rw; | ||
| 246 | } | ||
| 247 | |||
| 248 | |||
| 249 | Patch::~Patch () | ||
| 250 | { | ||
| 251 | delete data; | ||
| 252 | delete back_data; | ||
| 253 | delete overwr; | ||
| 254 | } | ||
| 255 | |||
| 256 | |||
| 257 | void Patch::initFromString (string a) | ||
| 258 | { | ||
| 259 | parse (a); | ||
| 260 | } | ||
| 261 | |||
| 262 | |||
| 263 | string Patch::getPatchAsString () | ||
| 264 | { | ||
| 265 | unsigned char *a = NULL; | ||
| 266 | string b; | ||
| 267 | |||
| 268 | switch (state) | ||
| 269 | { | ||
| 270 | case LINKED: | ||
| 271 | case LFAILED: | ||
| 272 | a = back_data; | ||
| 273 | break; | ||
| 274 | case APPLIED: | ||
| 275 | case AFAILED: | ||
| 276 | a = overwr; | ||
| 277 | break; | ||
| 278 | } | ||
| 279 | |||
| 280 | b = itos16 (address) + ',' + state2string () + ": (" + data2string (data) + ')'; | ||
| 281 | if (a != NULL) | ||
| 282 | b += ", (" + data2string (a) + ')'; | ||
| 283 | b += '\n'; | ||
| 284 | return b; | ||
| 285 | } | ||
| 286 | |||
| 287 | |||
| 288 | bool Patch::isLinked () | ||
| 289 | { | ||
| 290 | return (state & LINKED); | ||
| 291 | } | ||
| 292 | |||
| 293 | |||
| 294 | bool Patch::wasChanged () | ||
| 295 | { | ||
| 296 | int x; | ||
| 297 | |||
| 298 | for (x = 0; x < len; x++) | ||
| 299 | if (data[x] != back_data[x]) | ||
| 300 | return true; | ||
| 301 | return false; | ||
| 302 | } | ||
| 303 | |||
| 304 | |||
| 305 | bool Patch::isApplied () | ||
| 306 | { | ||
| 307 | return (state & APPLIED); | ||
| 308 | } | ||
| 309 | |||
| 310 | |||
| 311 | bool Patch::isClean () | ||
| 312 | { | ||
| 313 | return (state & CLEAN); | ||
| 314 | } | ||
| 315 | |||
| 316 | |||
| 317 | bool Patch::isFailed () | ||
| 318 | { | ||
| 319 | return (state & AFAILED) || (state & LFAILED); | ||
| 320 | } | ||
| 321 | |||
| 322 | |||
| 323 | int Patch::getState () | ||
| 324 | { | ||
| 325 | return state; | ||
| 326 | } | ||
| 327 | |||
| 328 | |||
| 329 | void Patch::restore () | ||
| 330 | { | ||
| 331 | copy (back_data, back_data + len, data); | ||
| 332 | state = CLEAN; | ||
| 333 | } | ||
| 334 | |||
| 335 | |||
| 336 | bool Patch::remove (rwKernel *rw) | ||
| 337 | { | ||
| 338 | if (state != APPLIED) | ||
| 339 | return false; | ||
| 340 | |||
| 341 | rw->write (overwr, len, address); | ||
| 342 | return true; | ||
| 343 | } | ||
| 344 | |||
| 345 | |||
| 346 | bool Patch::remove () | ||
| 347 | { | ||
| 348 | if (local_rw == NULL) | ||
| 349 | return false; | ||
| 350 | if (state != APPLIED) | ||
| 351 | return false; | ||
| 352 | |||
| 353 | local_rw->write (overwr, len, address); | ||
| 354 | return true; | ||
| 355 | } | ||
| 356 | |||
| 357 | |||
| 358 | unsigned char *Patch::getData () | ||
| 359 | { | ||
| 360 | return data; | ||
| 361 | } | ||
| 362 | |||
| 363 | |||
| 364 | void Patch::apply (rwKernel *rw) | ||
| 365 | { | ||
| 366 | /* pretty simple :) */ | ||
| 367 | rw->read (overwr, len, address); | ||
| 368 | rw->write (data, len, address); | ||
| 369 | state = APPLIED; | ||
| 370 | } | ||
| 371 | |||
| 372 | |||
| 373 | void Patch::apply () | ||
| 374 | { | ||
| 375 | if (local_rw == NULL) | ||
| 376 | { | ||
| 377 | state = AFAILED; | ||
| 378 | return; | ||
| 379 | } | ||
| 380 | local_rw->read (overwr, len, address); | ||
| 381 | local_rw->write (data, len, address); | ||
| 382 | state = APPLIED; | ||
| 383 | } | ||
| 384 | |||
| 385 | |||
| 386 | void Patch::link (Addr2AddrList *a2a) | ||
| 387 | { | ||
| 388 | replaceAddr x (data, len); | ||
| 389 | int y = a2a->size (); | ||
| 390 | Addr2AddrList::iterator z = a2a->begin (); | ||
| 391 | Addr2Addr *t = NULL; | ||
| 392 | |||
| 393 | /* XXX: why doesnt for_each work with pointer to list??? | ||
| 394 | * its the same problem with for "(x = a2a->begin (); x != a2a->end (); ..." | ||
| 395 | * the x != end (); just f#$§ true! | ||
| 396 | */ | ||
| 397 | while (y--) | ||
| 398 | { | ||
| 399 | t = *z; | ||
| 400 | x (t); | ||
| 401 | z++; | ||
| 402 | } | ||
| 403 | state = LINKED; | ||
| 404 | } | ||
| 405 | |||
| 406 | |||
| 407 | void Patch::dump (string file) | ||
| 408 | { | ||
| 409 | unsigned char *a = NULL; | ||
| 410 | /* | ||
| 411 | * dump file format: | ||
| 412 | * <Address>,<State>: (<data, hex, byte wise>){, (<other data, hex, byte wise>)}\n | ||
| 413 | * where the data in the curled brackets in depending on the state: | ||
| 414 | * state: data in the curled bbrackets: | ||
| 415 | * clean none | ||
| 416 | * applied overwr | ||
| 417 | * afailed overwr | ||
| 418 | * linked back_date | ||
| 419 | * lfailed back_data | ||
| 420 | */ | ||
| 421 | ofstream f; | ||
| 422 | |||
| 423 | switch (state) | ||
| 424 | { | ||
| 425 | case LINKED: | ||
| 426 | case LFAILED: | ||
| 427 | a = back_data; | ||
| 428 | break; | ||
| 429 | case APPLIED: | ||
| 430 | case AFAILED: | ||
| 431 | a = overwr; | ||
| 432 | break; | ||
| 433 | } | ||
| 434 | |||
| 435 | f.open (file.c_str (), ios::ate | ios::app); | ||
| 436 | |||
| 437 | f.setf (ios::hex, ios::basefield); | ||
| 438 | f << address << ',' << state2string () << ':' << ' '; | ||
| 439 | f << '(' << data2string (data) << ')'; | ||
| 440 | if (a != NULL) | ||
| 441 | f << ',' << ' ' << '(' << data2string (a) << ')'; | ||
| 442 | f << endl; | ||
| 443 | f.setf (ios::dec, ios::basefield); | ||
| 444 | } | ||
| 445 | |||
| 446 | |||
| 447 | istream& operator>> (istream& is, Patch& p) | ||
| 448 | { | ||
| 449 | string tmp; | ||
| 450 | |||
| 451 | getline (is, tmp, '\n'); | ||
| 452 | p.initFromString (tmp); | ||
| 453 | return is; | ||
| 454 | } | ||
| 455 | |||
| 456 | |||
| 457 | ostream& operator<< (ostream& os, Patch& p) | ||
| 458 | { | ||
| 459 | os << p.getPatchAsString (); | ||
| 460 | return os; | ||
| 461 | } | ||
| 462 | |||
| 463 | |||
| 464 | /* | ||
| 465 | * unrelated functions .... | ||
| 466 | */ | ||
| 467 | Addr2AddrList *genReplaceValMap (SymbolTable *st) | ||
| 468 | { | ||
| 469 | zzSymList::iterator x; | ||
| 470 | Addr2Addr *y = NULL; | ||
| 471 | zzSym *z = NULL; | ||
| 472 | Addr2AddrList *a2a = NULL; | ||
| 473 | |||
| 474 | a2a = new Addr2AddrList (); | ||
| 475 | |||
| 476 | /* get all symbol addressess together with dummy values */ | ||
| 477 | for (x = st->symList.begin (); x != st->symList.end (); x++) | ||
| 478 | { | ||
| 479 | z = *x; | ||
| 480 | if (DummyValMap[z->Name] != 0) | ||
| 481 | { | ||
| 482 | y = new Addr2Addr (); | ||
| 483 | y->first = DummyValMap[z->Name]; | ||
| 484 | y->second = z->Address; | ||
| 485 | a2a->push_back (y); | ||
| 486 | } | ||
| 487 | } | ||
| 488 | return a2a; | ||
| 489 | } | ||
| 490 | |||
| 491 | |||
| 492 | void genDummyValMap () | ||
| 493 | { | ||
| 494 | int x = 0; | ||
| 495 | |||
| 496 | while (__n2a[x].name != NULL) | ||
| 497 | { | ||
| 498 | DummyValMap.add (string (__n2a[x].name), __n2a[x].add); | ||
| 499 | x++; | ||
| 500 | } | ||
| 501 | } | ||
| 502 | |||
diff --git a/other/Kermit/lib/Patch.o b/other/Kermit/lib/Patch.o new file mode 100644 index 0000000..630c201 --- /dev/null +++ b/other/Kermit/lib/Patch.o | |||
| Binary files differ | |||
diff --git a/other/Kermit/lib/SymbolFingp.cpp b/other/Kermit/lib/SymbolFingp.cpp new file mode 100644 index 0000000..4b29bef --- /dev/null +++ b/other/Kermit/lib/SymbolFingp.cpp | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | /* | ||
| 2 | * SymbolFingp.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <SymbolFingp.hpp> | ||
| 6 | #include <stoi16.hpp> | ||
| 7 | |||
| 8 | |||
| 9 | bool SymbolFingp::addFinger (struct sfp *a) | ||
| 10 | { | ||
| 11 | Fingers.insert (FingerThing::value_type (string (a->name), *a)); | ||
| 12 | return true; /* ah, well - think positiv ... */ | ||
| 13 | } | ||
| 14 | |||
| 15 | |||
| 16 | void SymbolFingp::readFingers (ifstream a) | ||
| 17 | { | ||
| 18 | int x = 0; | ||
| 19 | struct sfp *tmp_sfp = NULL; | ||
| 20 | string tmp_string; | ||
| 21 | |||
| 22 | if (!a.is_open ()) | ||
| 23 | { | ||
| 24 | cerr << "failed to open file" << endl; | ||
| 25 | abort (); | ||
| 26 | } | ||
| 27 | #ifdef DEBUG | ||
| 28 | else | ||
| 29 | { | ||
| 30 | cout << "Reading fingerprints ..." << endl; | ||
| 31 | } | ||
| 32 | #endif | ||
| 33 | |||
| 34 | a.setf (ios::skipws); | ||
| 35 | while (!a.eof ()) | ||
| 36 | { | ||
| 37 | tmp_sfp = new struct sfp; | ||
| 38 | |||
| 39 | /* get the name */ | ||
| 40 | a >> tmp_string; | ||
| 41 | tmp_sfp->name = new char[tmp_string.length () + 1]; | ||
| 42 | copy (tmp_string.begin (), tmp_string.end (), tmp_sfp->name); | ||
| 43 | |||
| 44 | /* the addresses */ | ||
| 45 | a.setf (ios::hex, ios::basefield); | ||
| 46 | a >> tmp_sfp->start_addr; | ||
| 47 | a >> tmp_sfp->stop_addr; | ||
| 48 | |||
| 49 | /* offset from fp to real address */ | ||
| 50 | a >> tmp_sfp->offset; | ||
| 51 | |||
| 52 | /* length of fp */ | ||
| 53 | a >> tmp_sfp->length; | ||
| 54 | |||
| 55 | /* the cells */ | ||
| 56 | tmp_sfp->fp = new struct cell[tmp_sfp->length]; | ||
| 57 | |||
| 58 | for (x = 0; x < tmp_sfp->length; x++) | ||
| 59 | { | ||
| 60 | a >> tmp_string; | ||
| 61 | |||
| 62 | if ((tmp_string.length () == 1) && (tmp_string[0] == '?')) | ||
| 63 | { | ||
| 64 | tmp_sfp->fp[x].type = WWCARD; | ||
| 65 | tmp_sfp->fp[x].val = 0; | ||
| 66 | } | ||
| 67 | else | ||
| 68 | { | ||
| 69 | tmp_sfp->fp[x].type = NOCARD; | ||
| 70 | tmp_sfp->fp[x].val = stoi16 (tmp_string); | ||
| 71 | } | ||
| 72 | } | ||
| 73 | if (addFinger (tmp_sfp) != true) | ||
| 74 | { | ||
| 75 | cerr << "Could not add fingerprint" << endl; | ||
| 76 | abort (); | ||
| 77 | } | ||
| 78 | } | ||
| 79 | a.setf (ios::dec, ios::basefield); | ||
| 80 | #ifdef DEBUG | ||
| 81 | cout << "done." << endl; | ||
| 82 | #endif | ||
| 83 | } | ||
| 84 | |||
| 85 | |||
| 86 | SymbolFingp::SymbolFingp () | ||
| 87 | { | ||
| 88 | readFingers (ifstream (DEFAULT_FILE)); | ||
| 89 | } | ||
| 90 | |||
| 91 | |||
| 92 | SymbolFingp::SymbolFingp (string a) | ||
| 93 | { | ||
| 94 | readFingers (ifstream (a.c_str ())); | ||
| 95 | } | ||
| 96 | |||
| 97 | |||
| 98 | SymbolFingp::~SymbolFingp () | ||
| 99 | { | ||
| 100 | Fingers.clear (); | ||
| 101 | } | ||
| 102 | |||
| 103 | |||
| 104 | struct sfp *SymbolFingp::getFinger (string a) | ||
| 105 | { | ||
| 106 | return &Fingers[a]; | ||
| 107 | } | ||
| 108 | |||
diff --git a/other/Kermit/lib/SymbolTable.cpp b/other/Kermit/lib/SymbolTable.cpp new file mode 100644 index 0000000..1d412e0 --- /dev/null +++ b/other/Kermit/lib/SymbolTable.cpp | |||
| @@ -0,0 +1,205 @@ | |||
| 1 | /* | ||
| 2 | * SymbolTable.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <SymbolTable.hpp> | ||
| 6 | |||
| 7 | |||
| 8 | /* | ||
| 9 | * helper classes | ||
| 10 | */ | ||
| 11 | class DumpTable | ||
| 12 | { | ||
| 13 | private: | ||
| 14 | string file; | ||
| 15 | |||
| 16 | public: | ||
| 17 | DumpTable (string a) | ||
| 18 | { | ||
| 19 | file = string (a); | ||
| 20 | } | ||
| 21 | |||
| 22 | ~DumpTable () | ||
| 23 | { | ||
| 24 | } | ||
| 25 | |||
| 26 | void operator() (zzSym *foo) | ||
| 27 | { | ||
| 28 | ofstream dump (file.c_str ()); | ||
| 29 | if (!dump.is_open ()) | ||
| 30 | { | ||
| 31 | cerr << "Pfff..." << endl; | ||
| 32 | abort (); | ||
| 33 | } | ||
| 34 | dump << foo->Name << "\tE\t" << foo->Address << endl; | ||
| 35 | dump.close (); | ||
| 36 | } | ||
| 37 | }; | ||
| 38 | |||
| 39 | |||
| 40 | class FindFind | ||
| 41 | { | ||
| 42 | private: | ||
| 43 | string search; | ||
| 44 | |||
| 45 | public: | ||
| 46 | FindFind (string a) | ||
| 47 | { | ||
| 48 | search = string (a); | ||
| 49 | } | ||
| 50 | |||
| 51 | bool operator() (struct zzSym *foo) | ||
| 52 | { | ||
| 53 | if (search.compare (foo->Name, search.length ())) | ||
| 54 | { | ||
| 55 | return true; | ||
| 56 | } | ||
| 57 | return false; | ||
| 58 | } | ||
| 59 | }; | ||
| 60 | |||
| 61 | |||
| 62 | /* | ||
| 63 | * member functions | ||
| 64 | */ | ||
| 65 | bool SymbolTable::loadFiles (string a, string b) | ||
| 66 | { | ||
| 67 | /* check for System.map */ | ||
| 68 | mapp = SystemMap (a); | ||
| 69 | |||
| 70 | /* load a dumped cache */ | ||
| 71 | rest = SystemMap (b); | ||
| 72 | return true; | ||
| 73 | } | ||
| 74 | |||
| 75 | |||
| 76 | bool SymbolTable::createObjects (rwKernel *a) | ||
| 77 | { | ||
| 78 | if (a == NULL) | ||
| 79 | patt = new DevMemPatt (); | ||
| 80 | else | ||
| 81 | patt = new DevMemPatt (a); | ||
| 82 | fing = new SymbolFingp (); | ||
| 83 | return true; | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | SymbolTable::SymbolTable () | ||
| 88 | { | ||
| 89 | loadFiles (DEFAULTSYSTEMMAP, DEFAULTDUMP); | ||
| 90 | createObjects (NULL); | ||
| 91 | |||
| 92 | /* XXX, init set of exported symbols */ | ||
| 93 | if (false) | ||
| 94 | { | ||
| 95 | exported = SystemMap (); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | SymbolTable::SymbolTable (string res, string sys) | ||
| 101 | { | ||
| 102 | loadFiles (sys, res); | ||
| 103 | createObjects (NULL); | ||
| 104 | |||
| 105 | /* XXX, init set of exported symbols */ | ||
| 106 | if (false) | ||
| 107 | { | ||
| 108 | exported = SystemMap (); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | SymbolTable::SymbolTable (rwKernel *f) | ||
| 114 | { | ||
| 115 | loadFiles (DEFAULTSYSTEMMAP, DEFAULTDUMP); | ||
| 116 | createObjects (f); | ||
| 117 | } | ||
| 118 | |||
| 119 | |||
| 120 | SymbolTable::~SymbolTable () | ||
| 121 | { | ||
| 122 | delete fing; | ||
| 123 | delete patt; | ||
| 124 | clearCache (); | ||
| 125 | } | ||
| 126 | |||
| 127 | |||
| 128 | void SymbolTable::setSaveFile (string file) | ||
| 129 | { | ||
| 130 | dump_file = string (file); | ||
| 131 | } | ||
| 132 | |||
| 133 | |||
| 134 | unsigned int SymbolTable::getSymbol (string name) | ||
| 135 | { | ||
| 136 | zzSymList::iterator x; | ||
| 137 | zzSym *y = NULL; | ||
| 138 | |||
| 139 | x = find_if (symList.begin (), symList.end (), FindFind (name)); | ||
| 140 | if (x == symList.end ()) | ||
| 141 | return 0; | ||
| 142 | y = *x; | ||
| 143 | return y->Address; | ||
| 144 | } | ||
| 145 | |||
| 146 | |||
| 147 | bool SymbolTable::findSymbol (string name) | ||
| 148 | { | ||
| 149 | unsigned int x = 0; | ||
| 150 | /* | ||
| 151 | * first check if the symbol can be found in restore date | ||
| 152 | * second check if the symbol can be found using SymbolFingp | ||
| 153 | * third is list of exported symbols | ||
| 154 | * fourth System.map (if supplied) | ||
| 155 | */ | ||
| 156 | if (rest.contains (name)) | ||
| 157 | { | ||
| 158 | addSymbolToCache (name, rest[name]); | ||
| 159 | return true; | ||
| 160 | } | ||
| 161 | |||
| 162 | if ((x = patt->find_patt (fing->getFinger (name))) != 0) | ||
| 163 | { | ||
| 164 | addSymbolToCache (name, x); | ||
| 165 | return true; | ||
| 166 | } | ||
| 167 | |||
| 168 | if (exported.contains (name)) | ||
| 169 | { | ||
| 170 | addSymbolToCache (name, exported[name]); | ||
| 171 | return true; | ||
| 172 | } | ||
| 173 | |||
| 174 | if (mapp.contains (name)) | ||
| 175 | { | ||
| 176 | addSymbolToCache (name, mapp[name]); | ||
| 177 | return true; | ||
| 178 | } | ||
| 179 | |||
| 180 | return false; | ||
| 181 | } | ||
| 182 | |||
| 183 | |||
| 184 | void SymbolTable::addSymbolToCache (string name, unsigned int add) | ||
| 185 | { | ||
| 186 | zzSym *x = new zzSym; | ||
| 187 | |||
| 188 | x->Name = string (name); | ||
| 189 | x->Address = add; | ||
| 190 | symList.push_back (x); | ||
| 191 | } | ||
| 192 | |||
| 193 | |||
| 194 | void SymbolTable::clearCache () | ||
| 195 | { | ||
| 196 | symList.clear (); | ||
| 197 | } | ||
| 198 | |||
| 199 | |||
| 200 | bool SymbolTable::saveCache () | ||
| 201 | { | ||
| 202 | for_each (symList.begin (), symList.end (), DumpTable (dump_file)); | ||
| 203 | return true; | ||
| 204 | } | ||
| 205 | |||
diff --git a/other/Kermit/lib/SystemMap.cpp b/other/Kermit/lib/SystemMap.cpp new file mode 100644 index 0000000..03e2fb4 --- /dev/null +++ b/other/Kermit/lib/SystemMap.cpp | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * SystemMap.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <SystemMap.hpp> | ||
| 6 | |||
| 7 | |||
| 8 | SystemMap::SystemMap (string a) | ||
| 9 | { | ||
| 10 | string tmp; | ||
| 11 | unsigned int num = 0; | ||
| 12 | ifstream f; | ||
| 13 | |||
| 14 | f.open (a.c_str ()); | ||
| 15 | if (!f.is_open ()) | ||
| 16 | { | ||
| 17 | cerr << "Error opening file \"" << a << "\"!" << endl; | ||
| 18 | abort (); | ||
| 19 | } | ||
| 20 | |||
| 21 | f.setf (ios::skipws); | ||
| 22 | f.setf (ios::hex, ios::basefield); | ||
| 23 | |||
| 24 | while (!f.eof ()) | ||
| 25 | { | ||
| 26 | f >> num; | ||
| 27 | f >> tmp; | ||
| 28 | f >> tmp; | ||
| 29 | |||
| 30 | add_map.insert (add_map.end (), bla_val (tmp, num)); | ||
| 31 | } | ||
| 32 | f.close (); | ||
| 33 | } | ||
| 34 | |||
| 35 | |||
| 36 | SystemMap::SystemMap () | ||
| 37 | { | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | SystemMap::~SystemMap () | ||
| 42 | { | ||
| 43 | add_map.clear (); | ||
| 44 | } | ||
| 45 | |||
| 46 | |||
| 47 | bool SystemMap::contains (string a) | ||
| 48 | { | ||
| 49 | if (add_map.find (a) == add_map.end ()) | ||
| 50 | return false; | ||
| 51 | return true; | ||
| 52 | } | ||
| 53 | |||
| 54 | |||
| 55 | void SystemMap::add (string a, unsigned int x) | ||
| 56 | { | ||
| 57 | add_map.insert (add_map.end (), bla_val (a, x)); | ||
| 58 | } | ||
| 59 | |||
| 60 | |||
| 61 | unsigned int SystemMap::operator[] (string a) | ||
| 62 | { | ||
| 63 | if (add_map.find (a) == add_map.end ()) | ||
| 64 | return 0; | ||
| 65 | return add_map[a]; | ||
| 66 | } | ||
| 67 | |||
diff --git a/other/Kermit/lib/itos16.cpp b/other/Kermit/lib/itos16.cpp new file mode 100644 index 0000000..b7a8a20 --- /dev/null +++ b/other/Kermit/lib/itos16.cpp | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * itos16.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <itos16.hpp> | ||
| 6 | #include <iostream> | ||
| 7 | |||
| 8 | string itos16 (unsigned int x) | ||
| 9 | { | ||
| 10 | char t[] = "0123456789abcdef"; | ||
| 11 | string y; | ||
| 12 | unsigned int a, | ||
| 13 | base = 1, | ||
| 14 | z = 0; | ||
| 15 | |||
| 16 | while (base < x && z++ < 7) | ||
| 17 | base *= 16; | ||
| 18 | |||
| 19 | if (z != 8 && z != 0) | ||
| 20 | base /= 16; | ||
| 21 | |||
| 22 | while (base != 1) | ||
| 23 | { | ||
| 24 | a = 0; | ||
| 25 | while (x >= base) | ||
| 26 | { | ||
| 27 | a++; | ||
| 28 | x -= base; | ||
| 29 | } | ||
| 30 | y += t[a]; | ||
| 31 | base /= 16; | ||
| 32 | } | ||
| 33 | y += t[x]; | ||
| 34 | return y; | ||
| 35 | } | ||
| 36 | |||
diff --git a/other/Kermit/lib/name2add.c b/other/Kermit/lib/name2add.c new file mode 100644 index 0000000..a141075 --- /dev/null +++ b/other/Kermit/lib/name2add.c | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * name2add.c: | ||
| 3 | * this file was automaticly generated by gen_name2add | ||
| 4 | */ | ||
| 5 | #include <stdio.h> | ||
| 6 | #include <name2add.h> | ||
| 7 | |||
| 8 | __name2add __n2a[] = | ||
| 9 | { | ||
| 10 | {"sys_fork", 0xf8f8f8f8}, | ||
| 11 | {"sys_read", 0xf8f8f7f7}, | ||
| 12 | {"sys_write", 0xf8f8f6f6}, | ||
| 13 | {"sys_exit", 0xf8f8f5f5}, | ||
| 14 | {"sys_setuid", 0xf8f8f4f4}, | ||
| 15 | {"sys_setgid", 0xf8f8f3f3}, | ||
| 16 | {"sys_getuid", 0xf8f8f2f2}, | ||
| 17 | {"sys_getgid", 0xf8f8f1f1}, | ||
| 18 | {"sys_open", 0xf8f8f0f0}, | ||
| 19 | {"sys_close", 0xf8f8efef}, | ||
| 20 | {"kmalloc", 0xf8f8eeee}, | ||
| 21 | {NULL, 0} | ||
| 22 | }; | ||
| 23 | |||
| 24 | /* | ||
| 25 | * name2add.c: | ||
| 26 | * this file was automaticly generated by gen_name2add | ||
| 27 | */ | ||
| 28 | #include <stdio.h> | ||
| 29 | #include <name2add.h> | ||
| 30 | |||
| 31 | __name2add __n2a[] = | ||
| 32 | { | ||
| 33 | {"sys_fork", 0xf8f8f8f8}, | ||
| 34 | {"sys_read", 0xf8f8f7f7}, | ||
| 35 | {"sys_write", 0xf8f8f6f6}, | ||
| 36 | {"sys_exit", 0xf8f8f5f5}, | ||
| 37 | {"sys_setuid", 0xf8f8f4f4}, | ||
| 38 | {"sys_setgid", 0xf8f8f3f3}, | ||
| 39 | {"sys_getuid", 0xf8f8f2f2}, | ||
| 40 | {"sys_getgid", 0xf8f8f1f1}, | ||
| 41 | {"sys_open", 0xf8f8f0f0}, | ||
| 42 | {"sys_close", 0xf8f8efef}, | ||
| 43 | {"kmalloc", 0xf8f8eeee}, | ||
| 44 | {NULL, 0} | ||
| 45 | }; | ||
| 46 | |||
diff --git a/other/Kermit/lib/name2add.o b/other/Kermit/lib/name2add.o new file mode 100644 index 0000000..260866e --- /dev/null +++ b/other/Kermit/lib/name2add.o | |||
| Binary files differ | |||
diff --git a/other/Kermit/lib/rwKernel.cpp b/other/Kermit/lib/rwKernel.cpp new file mode 100644 index 0000000..4077ff5 --- /dev/null +++ b/other/Kermit/lib/rwKernel.cpp | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | /* | ||
| 2 | * rwKernel.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <rwKernel.hpp> | ||
| 6 | #include <unistd.h> | ||
| 7 | #include <sys/types.h> | ||
| 8 | #include <sys/stat.h> | ||
| 9 | #include <fcntl.h> | ||
| 10 | #include <sys/mman.h> | ||
| 11 | #include <iostream> | ||
| 12 | |||
| 13 | |||
| 14 | bool rwKernel::openFile (int w) | ||
| 15 | { | ||
| 16 | int a = 0; | ||
| 17 | void *tmp = NULL; | ||
| 18 | char *file = NULL; | ||
| 19 | |||
| 20 | if (w == DEVMEM) | ||
| 21 | file = "/dev/mem"; | ||
| 22 | else if (w == PROCKCORE) | ||
| 23 | file = "/proc/kcore"; | ||
| 24 | |||
| 25 | if ((a = open (file, O_RDWR)) <= 0) | ||
| 26 | { | ||
| 27 | cerr << "open error" << endl; | ||
| 28 | abort (); | ||
| 29 | } | ||
| 30 | |||
| 31 | if ((tmp = mmap (NULL, 0x40000000, PROT_READ | \ | ||
| 32 | PROT_WRITE, MAP_SHARED, a, 0xc0000000 - mem_conf)) == (void *) -1) | ||
| 33 | { | ||
| 34 | cerr << "mmap failed" << endl; | ||
| 35 | abort (); | ||
| 36 | } | ||
| 37 | fd = (char *) tmp; | ||
| 38 | return true; | ||
| 39 | } | ||
| 40 | |||
| 41 | |||
| 42 | void rwKernel::setOffset (int x) | ||
| 43 | { | ||
| 44 | switch (x) | ||
| 45 | { | ||
| 46 | case CONF_1GB: | ||
| 47 | mem_conf = 0xC0000000; | ||
| 48 | break; | ||
| 49 | case CONF_2GB: | ||
| 50 | mem_conf = 0x80000000; | ||
| 51 | break; | ||
| 52 | case CONF_3GB: | ||
| 53 | mem_conf = 0x40000000; | ||
| 54 | break; | ||
| 55 | case IGNORE: | ||
| 56 | mem_conf = 0xC0000000; | ||
| 57 | break; | ||
| 58 | default: | ||
| 59 | mem_conf = 0xC0000000; | ||
| 60 | break; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | |||
| 65 | void rwKernel::closeFile () | ||
| 66 | { | ||
| 67 | munmap (fd, 0x40000000); | ||
| 68 | } | ||
| 69 | |||
| 70 | |||
| 71 | rwKernel::rwKernel () | ||
| 72 | { | ||
| 73 | setOffset (CONF_1GB); | ||
| 74 | openFile (DEVMEM); | ||
| 75 | } | ||
| 76 | |||
| 77 | |||
| 78 | rwKernel::rwKernel (int file, int off) | ||
| 79 | { | ||
| 80 | if (file == PROCKCORE) | ||
| 81 | off = IGNORE; | ||
| 82 | setOffset (off); | ||
| 83 | openFile (file); | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | rwKernel::~rwKernel () | ||
| 88 | { | ||
| 89 | closeFile (); | ||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 93 | void rwKernel::read (unsigned char *dest, unsigned int len, \ | ||
| 94 | unsigned int offset) | ||
| 95 | { | ||
| 96 | offset -= mem_conf; | ||
| 97 | copy (fd + offset, fd + offset + len, dest); | ||
| 98 | } | ||
| 99 | |||
| 100 | |||
| 101 | void rwKernel::write (unsigned char *src, unsigned int len, \ | ||
| 102 | unsigned int offset) | ||
| 103 | { | ||
| 104 | offset -= mem_conf; | ||
| 105 | copy (src, src + len, fd + offset); | ||
| 106 | } | ||
| 107 | |||
diff --git a/other/Kermit/lib/stoi16.cpp b/other/Kermit/lib/stoi16.cpp new file mode 100644 index 0000000..83aad59 --- /dev/null +++ b/other/Kermit/lib/stoi16.cpp | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * stoi16.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <stoi16.hpp> | ||
| 6 | |||
| 7 | unsigned int stoi16 (string x) | ||
| 8 | { | ||
| 9 | int num = 0, | ||
| 10 | base = 1, | ||
| 11 | z = x.length () - 1; | ||
| 12 | unsigned int y = 0; | ||
| 13 | |||
| 14 | while (z >= 0) | ||
| 15 | { | ||
| 16 | if (x[z] <= '9' && x[z] >= '0') | ||
| 17 | num = x[z] - '0'; | ||
| 18 | if (x[z] <= 'f' && x[z] >= 'a') | ||
| 19 | num = x[z] - 'a' + 10; | ||
| 20 | if (x[z] <= 'F' && x[z] >= 'A') | ||
| 21 | num = x[z] - 'A' + 10; | ||
| 22 | |||
| 23 | y += num * base; | ||
| 24 | base *= 16; | ||
| 25 | z--; | ||
| 26 | } | ||
| 27 | return y; | ||
| 28 | } | ||
| 29 | |||
diff --git a/other/Kermit/src/Makefile b/other/Kermit/src/Makefile new file mode 100644 index 0000000..c5d923b --- /dev/null +++ b/other/Kermit/src/Makefile | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # written by palmers / teso | ||
| 2 | include ../MakeOpt | ||
| 3 | |||
| 4 | all: load unload findsym readsym writesym callsyscall | ||
| 5 | |||
| 6 | load: | ||
| 7 | $(CXX) $(CXXFLAGS) load.cpp -o $(BIN_DIR)/load $(AR_OUT) | ||
| 8 | |||
| 9 | unload: | ||
| 10 | $(CXX) $(CXXFLAGS) unload.cpp -o $(BIN_DIR)/unload $(AR_OUT) | ||
| 11 | |||
| 12 | readsym: | ||
| 13 | $(CXX) $(CXXFLAGS) readsym.cpp -o $(BIN_DIR)/readsym $(AR_OUT) | ||
| 14 | |||
| 15 | writesym: | ||
| 16 | $(CXX) $(CXXFLAGS) writesym.cpp -o $(BIN_DIR)/writesym $(AR_OUT) | ||
| 17 | |||
| 18 | findsym: | ||
| 19 | $(CXX) $(CXXFLAGS) findsym.cpp -o $(BIN_DIR)/findsym $(AR_OUT) | ||
| 20 | |||
| 21 | callsyscall: | ||
| 22 | $(CC) $(CFLAGS) -O2 call_syscall.c -o $(BIN_DIR)/call_syscall | ||
| 23 | |||
| 24 | clean: | ||
| 25 | rm -rf $(BIN_DIR)/findsym $(BIN_DIR)/readsym \ | ||
| 26 | $(BIN_DIR)/writesym $(BIN_DIR)/call_syscall \ | ||
| 27 | $(BIN_DIR)/unload $(BIN_DIR)/load | ||
diff --git a/other/Kermit/src/__exported_sym.c b/other/Kermit/src/__exported_sym.c new file mode 100644 index 0000000..3a9943a --- /dev/null +++ b/other/Kermit/src/__exported_sym.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #ifdef 0 | ||
| 2 | void | ||
| 3 | print_exported_symbols () | ||
| 4 | { | ||
| 5 | struct new_module_symbol | ||
| 6 | { | ||
| 7 | unsigned long value; | ||
| 8 | unsigned long name; | ||
| 9 | } | ||
| 10 | *syms = NULL, *s = NULL; | ||
| 11 | |||
| 12 | unsigned long long_tmp; | ||
| 13 | char *char_tmp = NULL; | ||
| 14 | size_t ret, bufsize, x = 800; | ||
| 15 | |||
| 16 | s = syms = new struct new_module_symbol[x]; | ||
| 17 | bufsize = sizeof (struct new_module_symbol) * x; | ||
| 18 | |||
| 19 | while (query_module (NULL, QM_SYMBOLS, syms, bufsize, &ret) == -1) | ||
| 20 | { | ||
| 21 | if (errno == ENOSPC) | ||
| 22 | { | ||
| 23 | delete syms; | ||
| 24 | x += 400; | ||
| 25 | s = syms = new struct new_module_symbol[x]; | ||
| 26 | bufsize = sizeof (struct new_module_symbol) * x; | ||
| 27 | } | ||
| 28 | else | ||
| 29 | { | ||
| 30 | if (Silent) | ||
| 31 | { | ||
| 32 | cout << "0" << endl; | ||
| 33 | exit (1); | ||
| 34 | } | ||
| 35 | cerr << "query_module error!" << endl; | ||
| 36 | abort (); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | cout.setf (ios::hex, ios::basefield); | ||
| 41 | for (x = 0; x < ret; x++, s++) | ||
| 42 | { | ||
| 43 | char_tmp = (char *) syms + s->name; | ||
| 44 | long_tmp = (unsigned long) s->value; | ||
| 45 | cout << long_tmp << " " << char_tmp << endl; | ||
| 46 | } | ||
| 47 | delete syms; | ||
| 48 | cout.setf (ios::dec, ios::basefield); | ||
| 49 | } | ||
| 50 | #endif | ||
| 51 | |||
| 52 | main (){} | ||
diff --git a/other/Kermit/src/call_syscall.c b/other/Kermit/src/call_syscall.c new file mode 100644 index 0000000..8b85ed5 --- /dev/null +++ b/other/Kermit/src/call_syscall.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * call_syscall.c: | ||
| 3 | * you can figure it out ;) | ||
| 4 | * written by palmers / teso | ||
| 5 | */ | ||
| 6 | #include <stdio.h> | ||
| 7 | #include <errno.h> | ||
| 8 | #include <asm/unistd.h> | ||
| 9 | |||
| 10 | #define __NR_evilmalloc 251 | ||
| 11 | |||
| 12 | int main () | ||
| 13 | { | ||
| 14 | int x = 1024; | ||
| 15 | void *xx = NULL; | ||
| 16 | |||
| 17 | _syscall1 (void *, evilmalloc, int, x); | ||
| 18 | xx = evilmalloc (x); | ||
| 19 | if ((unsigned int) xx == 0xffffffff) | ||
| 20 | printf ("evilmalloc failed?\n"); | ||
| 21 | printf ("evilmalloc: %d bytes at %p\n", x, (unsigned int) xx); | ||
| 22 | return 0; | ||
| 23 | } | ||
| 24 | |||
diff --git a/other/Kermit/src/findsym.cpp b/other/Kermit/src/findsym.cpp new file mode 100644 index 0000000..cceefab --- /dev/null +++ b/other/Kermit/src/findsym.cpp | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /* | ||
| 2 | * findsym.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <DevMemPatt.hpp> | ||
| 6 | #include <SymbolFingp.hpp> | ||
| 7 | #include <iostream> | ||
| 8 | |||
| 9 | |||
| 10 | #define PROGRAM "findsym" | ||
| 11 | #define AUTHOR "palmers / teso" | ||
| 12 | #define VERSION "0.0.2" | ||
| 13 | |||
| 14 | |||
| 15 | void usage (char *s) | ||
| 16 | { | ||
| 17 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 18 | cout << "Usage: " << s << " [Options] name0 [name1 ... nameN]" << endl; | ||
| 19 | cout << "Options:" << endl; | ||
| 20 | cout << "\t-s:\t\t silent mode" << endl; | ||
| 21 | cout << "\t-f <file>:\t set config file to <file>" << endl; | ||
| 22 | cout << endl; | ||
| 23 | exit (0); | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | int main (int argc, char **argv) | ||
| 28 | { | ||
| 29 | bool silent = false; | ||
| 30 | int x = 1; | ||
| 31 | DevMemPatt *a = new DevMemPatt (); | ||
| 32 | SymbolFingp *b = new SymbolFingp (); | ||
| 33 | |||
| 34 | if (argc < 2) | ||
| 35 | usage (argv[0]); | ||
| 36 | |||
| 37 | cout.setf (ios::hex, ios::basefield); | ||
| 38 | while (x < argc) | ||
| 39 | { | ||
| 40 | if (argv[x][0] == '-') | ||
| 41 | { | ||
| 42 | switch (argv[x][1]) | ||
| 43 | { | ||
| 44 | case 's': | ||
| 45 | if (silent == false) | ||
| 46 | silent = true; | ||
| 47 | else | ||
| 48 | silent = false; | ||
| 49 | break; | ||
| 50 | case 'f': | ||
| 51 | if (b != NULL) | ||
| 52 | delete b; | ||
| 53 | b = new SymbolFingp (string (argv[++x])); | ||
| 54 | break; | ||
| 55 | default: | ||
| 56 | cerr << "Illegal option!" << endl; | ||
| 57 | usage (argv[0]); | ||
| 58 | break; | ||
| 59 | } | ||
| 60 | } | ||
| 61 | else | ||
| 62 | { | ||
| 63 | if (silent) | ||
| 64 | cout << a->find_patt (b->getFinger (string (argv[x]))) << endl; | ||
| 65 | else | ||
| 66 | cout << argv[x] << '\t' << a->find_patt (b->getFinger (string (argv[x]))) << endl; | ||
| 67 | } | ||
| 68 | x++; | ||
| 69 | } | ||
| 70 | |||
| 71 | delete a; | ||
| 72 | delete b; | ||
| 73 | return 0; | ||
| 74 | } | ||
diff --git a/other/Kermit/src/load.cpp b/other/Kermit/src/load.cpp new file mode 100644 index 0000000..2d40735 --- /dev/null +++ b/other/Kermit/src/load.cpp | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | /* | ||
| 2 | * load.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <Kermit> | ||
| 6 | #include <string> | ||
| 7 | #include <iostream> | ||
| 8 | #include <fstream> | ||
| 9 | #include <stack> | ||
| 10 | |||
| 11 | #define PROGRAM "load" | ||
| 12 | #define VERSION "0.0.1" | ||
| 13 | #define AUTHOR "palmers / teso" | ||
| 14 | |||
| 15 | #define LINE_LENGTH 16384 | ||
| 16 | |||
| 17 | |||
| 18 | void usage (char *s) | ||
| 19 | { | ||
| 20 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 21 | cout << "Usage: " << s << " [options] <file>" << endl; | ||
| 22 | cout << "Options:" << endl; | ||
| 23 | cout << "\t-v:\t be verbose" << endl; | ||
| 24 | cout << "\t-E:\t proceed even if errors occour" << endl; | ||
| 25 | cout << endl; | ||
| 26 | exit (0); | ||
| 27 | } | ||
| 28 | |||
| 29 | |||
| 30 | int main (int argc, char **argv) | ||
| 31 | { | ||
| 32 | bool verbose = false, | ||
| 33 | err_continue = false; | ||
| 34 | int x = 0; | ||
| 35 | ifstream fs; | ||
| 36 | char line[LINE_LENGTH + 1]; | ||
| 37 | Patch *tp = NULL; | ||
| 38 | rwKernel *rw = NULL; | ||
| 39 | SymbolTable *st = NULL; | ||
| 40 | Addr2AddrList *a2a = NULL; | ||
| 41 | |||
| 42 | if (argc < 2) | ||
| 43 | usage (argv[0]); | ||
| 44 | |||
| 45 | for (x = 1; x < argc; x++) | ||
| 46 | { | ||
| 47 | if (argv[x][0] == '-') | ||
| 48 | { | ||
| 49 | switch (argv[x][1]) | ||
| 50 | { | ||
| 51 | case 'v': | ||
| 52 | verbose = true; | ||
| 53 | break; | ||
| 54 | case 'E': | ||
| 55 | err_continue = true; | ||
| 56 | break; | ||
| 57 | default: | ||
| 58 | cout << "unknow option: " << argv[x] << endl; | ||
| 59 | usage (argv[0]); | ||
| 60 | break; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | rw = new rwKernel (); | ||
| 66 | genDummyValMap (); | ||
| 67 | st = new SymbolTable (rw); | ||
| 68 | a2a = genReplaceValMap (st); | ||
| 69 | |||
| 70 | fs.open (argv[argc - 1]); | ||
| 71 | if (!fs.is_open ()) | ||
| 72 | { | ||
| 73 | cerr << "failed to open \"" << argv[argc - 1] << "\"" << endl; | ||
| 74 | abort (); | ||
| 75 | } | ||
| 76 | |||
| 77 | if (verbose) | ||
| 78 | cout << "done." << endl; | ||
| 79 | |||
| 80 | while (!fs.eof ()) | ||
| 81 | { | ||
| 82 | fs.getline (line, LINE_LENGTH, '\n'); | ||
| 83 | tp = new Patch (string (line), rw); | ||
| 84 | |||
| 85 | if (tp->isClean ()) | ||
| 86 | tp->link (a2a); | ||
| 87 | |||
| 88 | if (tp->isLinked ()) | ||
| 89 | tp->apply (); | ||
| 90 | else if (verbose) | ||
| 91 | { | ||
| 92 | cout << "#" << x << ": Linking Failed" << endl; | ||
| 93 | if (err_continue) | ||
| 94 | continue; | ||
| 95 | break; | ||
| 96 | } | ||
| 97 | if (tp->isApplied () && verbose) | ||
| 98 | cout << "#" << x << ": Success" << endl; | ||
| 99 | else | ||
| 100 | { | ||
| 101 | cout << "#" << x << ": Applying Failed" << endl; | ||
| 102 | if (err_continue) | ||
| 103 | continue; | ||
| 104 | break; | ||
| 105 | } | ||
| 106 | delete tp; | ||
| 107 | } | ||
| 108 | if (verbose) | ||
| 109 | cout << "done." << endl; | ||
| 110 | fs.close (); | ||
| 111 | return 0; | ||
| 112 | } | ||
diff --git a/other/Kermit/src/readsym.cpp b/other/Kermit/src/readsym.cpp new file mode 100644 index 0000000..541d594 --- /dev/null +++ b/other/Kermit/src/readsym.cpp | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * readsym.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <Kermit> | ||
| 6 | #include <iostream> | ||
| 7 | #include <fstream> | ||
| 8 | |||
| 9 | #define PROGRAM "readsym" | ||
| 10 | #define VERSION "0.1" | ||
| 11 | #define AUTHOR "palmers / teso" | ||
| 12 | |||
| 13 | |||
| 14 | void dump_c_array (char *arr, char *b, int x) | ||
| 15 | { | ||
| 16 | int y; | ||
| 17 | cout.setf (ios::hex, ios::basefield); | ||
| 18 | cout << "char " << arr << "[] = {" << endl; | ||
| 19 | for (y = 0; y < x; y++) | ||
| 20 | { | ||
| 21 | cout << "0x" << ((int) b[y] & 0xff); | ||
| 22 | if (y != (x - 1)) | ||
| 23 | cout << ", "; | ||
| 24 | if (!(y % 10)) | ||
| 25 | cout << endl; | ||
| 26 | } | ||
| 27 | cout << endl << "};" << endl; | ||
| 28 | cout.setf (ios::dec, ios::basefield); | ||
| 29 | } | ||
| 30 | |||
| 31 | |||
| 32 | void dump (char *a, int x) | ||
| 33 | { | ||
| 34 | int y; | ||
| 35 | cout.setf (ios::hex, ios::basefield); | ||
| 36 | |||
| 37 | for (y = 0; y < x; y++) | ||
| 38 | { | ||
| 39 | if ((a[y] & 0xff) < 16) | ||
| 40 | cout << '0'; | ||
| 41 | cout << ((int) a[y] & 0xff) << ' '; | ||
| 42 | } | ||
| 43 | cout.setf (ios::dec, ios::basefield); | ||
| 44 | cout << endl; | ||
| 45 | } | ||
| 46 | |||
| 47 | void usage (char *a) | ||
| 48 | { | ||
| 49 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 50 | cout << endl; | ||
| 51 | cout << "Usage: " << a << " [options] <d|p> <offset> <length>" << endl; | ||
| 52 | cout << "Options:" << endl; | ||
| 53 | cout << "\t-x:\t where x is 1, 2, 3: the amount of ram in GB the system is ought to run" << endl; | ||
| 54 | cout << "\t-c <name>:\t dump the read data as a c array" << endl; | ||
| 55 | cout << endl; | ||
| 56 | exit (0); | ||
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | int main (int argc, char **argv) | ||
| 61 | { | ||
| 62 | rwKernel *rw = NULL; | ||
| 63 | char *inBuf = NULL, | ||
| 64 | *arr_name = NULL; | ||
| 65 | unsigned long length = 0, | ||
| 66 | offset = CONF_1GB; | ||
| 67 | int x = 0; | ||
| 68 | |||
| 69 | if (argc < 4) | ||
| 70 | usage (argv[0]); | ||
| 71 | |||
| 72 | while (x < argc) | ||
| 73 | { | ||
| 74 | if (argv[x][0] == '-') | ||
| 75 | { | ||
| 76 | switch (argv[x][1]) | ||
| 77 | { | ||
| 78 | case '1': | ||
| 79 | offset = CONF_1GB; | ||
| 80 | break; | ||
| 81 | case '2': | ||
| 82 | offset = CONF_2GB; | ||
| 83 | break; | ||
| 84 | case '3': | ||
| 85 | offset = CONF_3GB; | ||
| 86 | break; | ||
| 87 | case 'c': | ||
| 88 | arr_name = argv[x + 1]; | ||
| 89 | x++; | ||
| 90 | break; | ||
| 91 | case 'h': | ||
| 92 | usage (argv[0]); | ||
| 93 | break; | ||
| 94 | default: | ||
| 95 | usage (argv[0]); | ||
| 96 | break; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | x++; | ||
| 100 | } | ||
| 101 | |||
| 102 | if (argv[argc - 3][0] == 'd') | ||
| 103 | rw = new rwKernel (DEVMEM, offset); | ||
| 104 | else if (argv[argc - 3][0] == 'p') | ||
| 105 | rw = new rwKernel (PROCKCORE, offset); | ||
| 106 | |||
| 107 | offset = stoi16 (string (argv[argc - 2])); | ||
| 108 | length = stoi16 (string (argv[argc - 1])); | ||
| 109 | |||
| 110 | inBuf = new char[length + 1]; | ||
| 111 | rw->read (inBuf, length, offset); | ||
| 112 | |||
| 113 | if (arr_name != NULL) | ||
| 114 | { | ||
| 115 | dump_c_array (arr_name, inBuf, length); | ||
| 116 | delete inBuf; | ||
| 117 | exit (0); | ||
| 118 | } | ||
| 119 | |||
| 120 | dump (inBuf, length); | ||
| 121 | delete inBuf; | ||
| 122 | return 0; | ||
| 123 | } | ||
diff --git a/other/Kermit/src/sys_malloc.c b/other/Kermit/src/sys_malloc.c new file mode 100644 index 0000000..96a3b4d --- /dev/null +++ b/other/Kermit/src/sys_malloc.c | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * sys_malloc: system call for malloc'ing kernel memory | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <stdio.h> | ||
| 6 | #include <pseudo_link.h> | ||
| 7 | |||
| 8 | /* from linux/mm.h */ | ||
| 9 | #define __GFP_WAIT 0x01 | ||
| 10 | #define __GFP_MED 0x04 | ||
| 11 | #define __GFP_IO 0x10 | ||
| 12 | #define GFP_KERNEL (__GFP_MED | __GFP_WAIT | __GFP_IO) | ||
| 13 | |||
| 14 | |||
| 15 | void cbegin (){} | ||
| 16 | |||
| 17 | void *sys_malloc (size_t x) /* malloc x bytes */ | ||
| 18 | { | ||
| 19 | USE_KMALLOC | ||
| 20 | void *y = NULL; | ||
| 21 | |||
| 22 | y = kmalloc (x, GFP_KERNEL); | ||
| 23 | return y; | ||
| 24 | } | ||
| 25 | |||
| 26 | void cend(){} | ||
| 27 | |||
diff --git a/other/Kermit/src/unload.cpp b/other/Kermit/src/unload.cpp new file mode 100644 index 0000000..90630ea --- /dev/null +++ b/other/Kermit/src/unload.cpp | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | /* | ||
| 2 | * unload.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <Kermit> | ||
| 6 | #include <string> | ||
| 7 | #include <iostream> | ||
| 8 | #include <fstream> | ||
| 9 | #include <stack> | ||
| 10 | |||
| 11 | #define PROGRAM "unload" | ||
| 12 | #define VERSION "0.0.1" | ||
| 13 | #define AUTHOR "palmers / teso" | ||
| 14 | |||
| 15 | #define LINE_LENGTH 16384 | ||
| 16 | |||
| 17 | |||
| 18 | void usage (char *s) | ||
| 19 | { | ||
| 20 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 21 | cout << "Usage: " << s << " [options] <file>" << endl; | ||
| 22 | cout << "Options:" << endl; | ||
| 23 | cout << "\t-l:\t restore in linear order [default: reversed order]" << endl; | ||
| 24 | cout << endl; | ||
| 25 | exit (0); | ||
| 26 | } | ||
| 27 | |||
| 28 | |||
| 29 | int main (int argc, char **argv) | ||
| 30 | { | ||
| 31 | bool linear = false; | ||
| 32 | int x = 0; | ||
| 33 | ifstream fs; | ||
| 34 | char line[LINE_LENGTH + 1]; | ||
| 35 | Patch *tp = NULL; | ||
| 36 | rwKernel *rw = NULL; | ||
| 37 | |||
| 38 | if (argc < 2) | ||
| 39 | usage (argv[0]); | ||
| 40 | |||
| 41 | for (x = 1; x < argc; x++) | ||
| 42 | { | ||
| 43 | if (argv[x][0] == '-') | ||
| 44 | { | ||
| 45 | switch (argv[x][1]) | ||
| 46 | { | ||
| 47 | case 'l': | ||
| 48 | linear = true; | ||
| 49 | break; | ||
| 50 | default: | ||
| 51 | cout << "unknow option: " << argv[x] << endl; | ||
| 52 | usage (argv[0]); | ||
| 53 | break; | ||
| 54 | } | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | fs.open (argv[argc - 1]); | ||
| 59 | if (!fs.is_open ()) | ||
| 60 | { | ||
| 61 | cerr << "failed to open \"" << argv[argc - 1] << "\"" << endl; | ||
| 62 | abort (); | ||
| 63 | } | ||
| 64 | |||
| 65 | if (linear) | ||
| 66 | { | ||
| 67 | while (!fs.eof ()) | ||
| 68 | { | ||
| 69 | fs.getline (line, LINE_LENGTH, '\n'); | ||
| 70 | tp = new Patch (string (line), rw); | ||
| 71 | tp->remove (); | ||
| 72 | delete tp; | ||
| 73 | } | ||
| 74 | } | ||
| 75 | else | ||
| 76 | { | ||
| 77 | stack<Patch *> pstack; | ||
| 78 | while (!fs.eof ()) | ||
| 79 | { | ||
| 80 | fs.getline (line, LINE_LENGTH, '\n'); | ||
| 81 | tp = new Patch (string (line), rw); | ||
| 82 | pstack.push (tp); | ||
| 83 | } | ||
| 84 | |||
| 85 | while (!pstack.empty ()) | ||
| 86 | { | ||
| 87 | tp = pstack.top (); | ||
| 88 | tp->remove (); | ||
| 89 | delete tp; | ||
| 90 | pstack.pop (); | ||
| 91 | } | ||
| 92 | } | ||
| 93 | |||
| 94 | return 0; | ||
| 95 | } | ||
diff --git a/other/Kermit/src/writesym.cpp b/other/Kermit/src/writesym.cpp new file mode 100644 index 0000000..13d521e --- /dev/null +++ b/other/Kermit/src/writesym.cpp | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | /* | ||
| 2 | * readsym.cpp: | ||
| 3 | * written by palmers / teso | ||
| 4 | */ | ||
| 5 | #include <Kermit> | ||
| 6 | #include <iostream> | ||
| 7 | #include <fstream> | ||
| 8 | |||
| 9 | #define PROGRAM "writesym" | ||
| 10 | #define VERSION "0.1" | ||
| 11 | #define AUTHOR "palmers / teso" | ||
| 12 | |||
| 13 | |||
| 14 | void | ||
| 15 | usage (char *a) | ||
| 16 | { | ||
| 17 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 18 | cout << endl; | ||
| 19 | cout << "Usage: " << a << " [options] <d|p> <offset> <length>" << endl; | ||
| 20 | cout << "Options:" << endl; | ||
| 21 | cout << "\t-x:\t where x is 1, 2, 3: ... " << endl; | ||
| 22 | cout << endl; | ||
| 23 | exit (0); | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | int | ||
| 28 | main (int argc, char **argv) | ||
| 29 | { | ||
| 30 | rwKernel *rw = NULL; | ||
| 31 | char *inBuf = NULL; | ||
| 32 | unsigned long y = 0, | ||
| 33 | length = 0, | ||
| 34 | out_offset = 0, | ||
| 35 | offset = CONF_1GB; | ||
| 36 | int x = 0; | ||
| 37 | |||
| 38 | if (argc < 4) | ||
| 39 | usage (argv[0]); | ||
| 40 | |||
| 41 | while (x < argc) | ||
| 42 | { | ||
| 43 | if (argv[x][0] == '-') | ||
| 44 | { | ||
| 45 | switch (argv[x][1]) | ||
| 46 | { | ||
| 47 | case '1': | ||
| 48 | offset = CONF_1GB; | ||
| 49 | break; | ||
| 50 | case '2': | ||
| 51 | offset = CONF_2GB; | ||
| 52 | break; | ||
| 53 | case '3': | ||
| 54 | offset = CONF_3GB; | ||
| 55 | break; | ||
| 56 | case 'h': | ||
| 57 | usage (argv[0]); | ||
| 58 | break; | ||
| 59 | default: | ||
| 60 | usage (argv[0]); | ||
| 61 | break; | ||
| 62 | } | ||
| 63 | } | ||
| 64 | x++; | ||
| 65 | } | ||
| 66 | |||
| 67 | if (argv[argc - 3][0] == 'd') | ||
| 68 | rw = new rwKernel (DEVMEM, offset); | ||
| 69 | else if (argv[argc - 3][0] == 'p') | ||
| 70 | rw = new rwKernel (PROCKCORE, offset); | ||
| 71 | |||
| 72 | out_offset = stoi16 (string (argv[argc - 2])); | ||
| 73 | length = stoi16 (string (argv[argc - 1])); | ||
| 74 | |||
| 75 | if (length == 0) | ||
| 76 | { | ||
| 77 | cerr << "HaHa" << endl; | ||
| 78 | abort (); | ||
| 79 | } | ||
| 80 | |||
| 81 | inBuf = new char[length + 1]; | ||
| 82 | |||
| 83 | cin.setf (ios::hex, ios::basefield); | ||
| 84 | while (!cin.eof ()) | ||
| 85 | { | ||
| 86 | cin >> x; | ||
| 87 | if (y < length) | ||
| 88 | inBuf[y++] = (x & 0xff); | ||
| 89 | } | ||
| 90 | cin.setf (ios::dec, ios::basefield); | ||
| 91 | |||
| 92 | rw->write (inBuf, length, out_offset); | ||
| 93 | delete inBuf; | ||
| 94 | return 0; | ||
| 95 | } | ||
diff --git a/other/Kermit/test/test_devmempatt.cpp b/other/Kermit/test/test_devmempatt.cpp new file mode 100644 index 0000000..25b34ce --- /dev/null +++ b/other/Kermit/test/test_devmempatt.cpp | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | #include <DevMemPatt.hpp> | ||
| 2 | #include <SymbolFingp.hpp> | ||
| 3 | #include <iostream> | ||
| 4 | |||
| 5 | |||
| 6 | #define PROGRAM "findsym" | ||
| 7 | #define AUTHOR "palmers / teso" | ||
| 8 | #define VERSION "0.0.2" | ||
| 9 | |||
| 10 | |||
| 11 | void usage (char *s) | ||
| 12 | { | ||
| 13 | cout << PROGRAM << VERSION << " by " << AUTHOR << endl; | ||
| 14 | cout << "Usage: " << s << " [Options] name1 [name2 ... nameN]" << endl; | ||
| 15 | cout << "Options:" << endl; | ||
| 16 | cout << endl; | ||
| 17 | exit (0); | ||
| 18 | } | ||
| 19 | |||
| 20 | |||
| 21 | int main (int argc, char **argv) | ||
| 22 | { | ||
| 23 | int x = 1; | ||
| 24 | DevMemPatt *a = new DevMemPatt (); | ||
| 25 | SymbolFingp *b = new SymbolFingp (); | ||
| 26 | |||
| 27 | if (argc < 2) | ||
| 28 | usage (argv[0]); | ||
| 29 | |||
| 30 | cout.setf (ios::hex, ios::basefield); | ||
| 31 | while (x < argc) | ||
| 32 | { | ||
| 33 | if (argv[x][0] == '-') | ||
| 34 | { | ||
| 35 | switch (argv[x][1]) | ||
| 36 | { | ||
| 37 | default: | ||
| 38 | cerr << "Illegal option!" << endl; | ||
| 39 | usage (argv[0]); | ||
| 40 | } | ||
| 41 | } | ||
| 42 | else | ||
| 43 | { | ||
| 44 | cout << argv[x] << '\t' << a->find_patt (b->getFinger (string (argv[x]))) << endl; | ||
| 45 | } | ||
| 46 | x++; | ||
| 47 | } | ||
| 48 | |||
| 49 | return 0; | ||
| 50 | } | ||
diff --git a/other/Kermit/test/test_itos.cpp b/other/Kermit/test/test_itos.cpp new file mode 100644 index 0000000..35c335c --- /dev/null +++ b/other/Kermit/test/test_itos.cpp | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #include <itos16.hpp> | ||
| 2 | #include <iostream> | ||
| 3 | |||
| 4 | |||
| 5 | int main () | ||
| 6 | { | ||
| 7 | cout << itos16 (0x31337) << endl; | ||
| 8 | cout << itos16 (0x7) << endl; | ||
| 9 | cout << itos16 (0x1) << endl; | ||
| 10 | cout << itos16 (0x131337) << endl; | ||
| 11 | cout << itos16 (0x1131337) << endl; | ||
| 12 | cout << itos16 (0x81131337) << endl; | ||
| 13 | |||
| 14 | return 0; | ||
| 15 | } | ||
diff --git a/other/Kermit/test/test_patch.cpp b/other/Kermit/test/test_patch.cpp new file mode 100644 index 0000000..c5bbd94 --- /dev/null +++ b/other/Kermit/test/test_patch.cpp | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | #include <Patch.hpp> | ||
| 2 | #include <SymbolTable.hpp> | ||
| 3 | #include <rwKernel.hpp> | ||
| 4 | #include <string> | ||
| 5 | |||
| 6 | void bla_foo (char *n, bool a) | ||
| 7 | { | ||
| 8 | if (a == false) | ||
| 9 | { | ||
| 10 | cout << n << " Failed" << endl; | ||
| 11 | abort (); | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | |||
| 16 | int main () | ||
| 17 | { | ||
| 18 | bool foo = false; | ||
| 19 | Patch *mall = NULL; | ||
| 20 | SymbolTable *tab = NULL; | ||
| 21 | Addr2AddrList *x = NULL; | ||
| 22 | rwKernel *y = NULL; | ||
| 23 | unsigned char *tmp = NULL; | ||
| 24 | int w = 0; | ||
| 25 | |||
| 26 | unsigned char sys_malloc[] = | ||
| 27 | "\x55\x89\xe5\x83\xec\x14\x53\xc7\x45\xfc\xee\xee" | ||
| 28 | "\xf8\xf8\xc7\x45\xf8\x00\x00\x00\x00\x83\xc4\xf8" | ||
| 29 | "\x6a\x15\x8b\x45\x08\x50\x8b\x5d\xfc\xff\xd3\x83" | ||
| 30 | "\xc4\x10\x89\xc0\x89\x45\xf8\x8b\x55\xf8\x89\xd0" | ||
| 31 | "\xeb\x06\x8d\xb6\x00\x00\x00\x00\x8b\x5d\xe8\x89" | ||
| 32 | "\xec\x5d\xc3\x90"; | ||
| 33 | |||
| 34 | y = new rwKernel (); | ||
| 35 | genDummyValMap (); | ||
| 36 | tab = new SymbolTable (y); | ||
| 37 | |||
| 38 | |||
| 39 | /* look up all needed symbols */ | ||
| 40 | foo = tab->findSymbol (string ("init")); | ||
| 41 | bla_foo ("init", foo); | ||
| 42 | foo = tab->findSymbol (string ("kmalloc")); | ||
| 43 | bla_foo ("kmalloc", foo); | ||
| 44 | |||
| 45 | |||
| 46 | cout << "Found all needed symbols, proceeding .." << endl; | ||
| 47 | x = genReplaceValMap (tab); | ||
| 48 | if (x == NULL) | ||
| 49 | { | ||
| 50 | cout << "Foo!" << endl; | ||
| 51 | abort (); | ||
| 52 | } | ||
| 53 | |||
| 54 | /* insert malloc function [overwritting init] */ | ||
| 55 | cout << "Creating patch" << endl; | ||
| 56 | mall = new Patch (sys_malloc, 72, tab->getSymbol ("init")); | ||
| 57 | |||
| 58 | cout << "linking" << endl; | ||
| 59 | mall->link (x); | ||
| 60 | foo = mall->wasChanged (); | ||
| 61 | bla_foo ("link", foo); | ||
| 62 | cout << "appling now ..." << endl; | ||
| 63 | mall->apply (y); | ||
| 64 | cout << "done." << endl; | ||
| 65 | return 0; | ||
| 66 | } | ||
| 67 | |||
diff --git a/other/Kermit/test/test_patch2.cpp b/other/Kermit/test/test_patch2.cpp new file mode 100644 index 0000000..603ea96 --- /dev/null +++ b/other/Kermit/test/test_patch2.cpp | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #include <Kermit> | ||
| 2 | #include <iostream> | ||
| 3 | #include <fstream> | ||
| 4 | #include <string> | ||
| 5 | #define LINE "12345678,Clean: (73 50 73 50 73 50 73 50), (0 0 0 0 0 0 0 0)" | ||
| 6 | |||
| 7 | int main () | ||
| 8 | { | ||
| 9 | const string dump_f = string ("DUMP_FILE"); | ||
| 10 | /* | ||
| 11 | unsigned short x = 8; | ||
| 12 | unsigned int y = 0x12345678; | ||
| 13 | unsigned char z[] = "\x73\x50\x73\x50\x73\x50\x73\x50"; | ||
| 14 | |||
| 15 | Patch *foo = new Patch (z, x, y); | ||
| 16 | */ | ||
| 17 | Patch *foo = new Patch (string (LINE)); | ||
| 18 | |||
| 19 | foo->dump (dump_f); | ||
| 20 | return 0; | ||
| 21 | } | ||
diff --git a/other/Kermit/test/test_patch3.cpp b/other/Kermit/test/test_patch3.cpp new file mode 100644 index 0000000..b559191 --- /dev/null +++ b/other/Kermit/test/test_patch3.cpp | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #include <Kermit> | ||
| 2 | #include <iostream> | ||
| 3 | #include <fstream> | ||
| 4 | #include <string> | ||
| 5 | |||
| 6 | int main () | ||
| 7 | { | ||
| 8 | Patch foo; | ||
| 9 | cout << "Enter ..." << endl; | ||
| 10 | cin >> foo; | ||
| 11 | |||
| 12 | cout << foo; | ||
| 13 | // foo.dump (string ("TEST")); | ||
| 14 | return 0; | ||
| 15 | } | ||
diff --git a/other/Kermit/test/test_stoi.cpp b/other/Kermit/test/test_stoi.cpp new file mode 100644 index 0000000..4441e49 --- /dev/null +++ b/other/Kermit/test/test_stoi.cpp | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #include <iostream> | ||
| 2 | #include <string> | ||
| 3 | #include <stoi16.hpp> | ||
| 4 | |||
| 5 | main () | ||
| 6 | { | ||
| 7 | cout << stoi16 (string ("0")) << endl; | ||
| 8 | cout << stoi16 (string ("1")) << endl; | ||
| 9 | cout << stoi16 (string ("2")) << endl; | ||
| 10 | cout << stoi16 (string ("f")) << endl; | ||
| 11 | cout << stoi16 (string ("00")) << endl; | ||
| 12 | cout << stoi16 (string ("ff")) << endl; | ||
| 13 | cout << stoi16 (string ("41")) << endl; | ||
| 14 | cout << stoi16 (string ("73")) << endl; | ||
| 15 | cout << stoi16 (string ("50")) << endl; | ||
| 16 | |||
| 17 | } | ||
diff --git a/other/Kermit/test/test_string.cpp b/other/Kermit/test/test_string.cpp new file mode 100644 index 0000000..ad2de42 --- /dev/null +++ b/other/Kermit/test/test_string.cpp | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #include <iostream> | ||
| 2 | #include <string> | ||
| 3 | #include <algorithm> | ||
| 4 | |||
| 5 | main () | ||
| 6 | { | ||
| 7 | string a = "Hallo,bla: foo!"; | ||
| 8 | int x = 0; | ||
| 9 | string b; | ||
| 10 | |||
| 11 | cout << count (a.begin (), a.end (), 'l') << endl; | ||
| 12 | x = a.find_first_of (","); | ||
| 13 | b.resize (x + 1); | ||
| 14 | a.copy (b.begin (), x); | ||
| 15 | cout << b << endl; | ||
| 16 | a.erase (0, x + 1); | ||
| 17 | |||
| 18 | cout << b << endl; | ||
| 19 | cout << a << endl; | ||
| 20 | } | ||
diff --git a/other/Kermit/test/test_symboltable.cpp b/other/Kermit/test/test_symboltable.cpp new file mode 100644 index 0000000..fac5d05 --- /dev/null +++ b/other/Kermit/test/test_symboltable.cpp | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #include <SymbolTable.hpp> | ||
| 2 | #include <string> | ||
| 3 | |||
| 4 | /* | ||
| 5 | * default files: | ||
| 6 | * System.map | ||
| 7 | * SymbolFind.conf | ||
| 8 | * SymbolTableDump | ||
| 9 | */ | ||
| 10 | int main () | ||
| 11 | { | ||
| 12 | unsigned int x = 0; | ||
| 13 | SymbolTable *a = NULL; | ||
| 14 | |||
| 15 | cout.setf (ios::hex, ios::basefield); | ||
| 16 | a = new SymbolTable (); | ||
| 17 | |||
| 18 | cout << "Starting ..." << endl; | ||
| 19 | x = a->getSymbol (string ("sys_exit")); | ||
| 20 | cout << "x = " << x << endl; | ||
| 21 | |||
| 22 | cout << a->findSymbol (string ("sys_exit")) << endl; | ||
| 23 | |||
| 24 | x = a->getSymbol (string ("sys_exit")); | ||
| 25 | cout << "x = " << x << endl; | ||
| 26 | return 0; | ||
| 27 | } | ||
| 28 | |||
diff --git a/other/Kermit/test/test_systemmap.cpp b/other/Kermit/test/test_systemmap.cpp new file mode 100644 index 0000000..41179c1 --- /dev/null +++ b/other/Kermit/test/test_systemmap.cpp | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #include <SystemMap.hpp> | ||
| 2 | #include <string> | ||
| 3 | #include <iostream> | ||
| 4 | |||
| 5 | |||
| 6 | int main () | ||
| 7 | { | ||
| 8 | SystemMap a = SystemMap ("System.map"); | ||
| 9 | cout.setf (ios::hex, ios::basefield); | ||
| 10 | |||
| 11 | cout << "sys_fork " << a[string ("sys_fork")] << endl; | ||
| 12 | cout << "sys_write " << a[string ("sys_write")] << endl; | ||
| 13 | cout << "init " << a[string ("init")] << endl; | ||
| 14 | return 0; | ||
| 15 | } | ||
diff --git a/other/Kermit/tmp/_names b/other/Kermit/tmp/_names new file mode 100644 index 0000000..277460c --- /dev/null +++ b/other/Kermit/tmp/_names | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | sys_fork | ||
| 2 | sys_read | ||
| 3 | sys_write | ||
| 4 | sys_exit | ||
| 5 | sys_setuid | ||
| 6 | sys_setgid | ||
| 7 | sys_getuid | ||
| 8 | sys_getgid | ||
| 9 | sys_open | ||
| 10 | sys_close | ||
| 11 | kmalloc | ||
diff --git a/other/Kermit/util/_numbers b/other/Kermit/util/_numbers new file mode 100644 index 0000000..f89e2e3 --- /dev/null +++ b/other/Kermit/util/_numbers | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | 0xf8f8f8f8 | ||
| 2 | 0xf8f8f7f7 | ||
| 3 | 0xf8f8f6f6 | ||
| 4 | 0xf8f8f5f5 | ||
| 5 | 0xf8f8f4f4 | ||
| 6 | 0xf8f8f3f3 | ||
| 7 | 0xf8f8f2f2 | ||
| 8 | 0xf8f8f1f1 | ||
| 9 | 0xf8f8f0f0 | ||
| 10 | 0xf8f8efef | ||
| 11 | 0xf8f8eeee | ||
| 12 | 0xf8f8eded | ||
| 13 | 0xf8f8ecec | ||
| 14 | 0xf8f8ebeb | ||
| 15 | 0xf8f8eaea | ||
| 16 | 0xf8f7f8f8 | ||
| 17 | 0xf8f7f7f7 | ||
| 18 | 0xf8f7f6f6 | ||
| 19 | 0xf8f7f5f5 | ||
| 20 | 0xf8f7f4f4 | ||
| 21 | 0xf8f7f3f3 | ||
| 22 | 0xf8f7f2f2 | ||
| 23 | 0xf8f7f1f1 | ||
| 24 | 0xf8f7f0f0 | ||
| 25 | 0xf8f7efef | ||
| 26 | 0xf8f7eeee | ||
| 27 | 0xf8f7eded | ||
| 28 | 0xf8f7ecec | ||
| 29 | 0xf8f7ebeb | ||
| 30 | 0xf8f7eaea | ||
| 31 | 0xf8f6f8f8 | ||
| 32 | 0xf8f6f7f7 | ||
| 33 | 0xf8f6f6f6 | ||
| 34 | 0xf8f6f5f5 | ||
| 35 | 0xf8f6f4f4 | ||
| 36 | 0xf8f6f3f3 | ||
| 37 | 0xf8f6f2f2 | ||
| 38 | 0xf8f6f1f1 | ||
| 39 | 0xf8f6f0f0 | ||
| 40 | 0xf8f6efef | ||
| 41 | 0xf8f6eeee | ||
| 42 | 0xf8f6eded | ||
| 43 | 0xf8f6ecec | ||
| 44 | 0xf8f6ebeb | ||
| 45 | 0xf8f6eaea | ||
| 46 | 0xf8f5f8f8 | ||
| 47 | 0xf8f5f7f7 | ||
| 48 | 0xf8f5f6f6 | ||
| 49 | 0xf8f5f5f5 | ||
| 50 | 0xf8f5f4f4 | ||
| 51 | 0xf8f5f3f3 | ||
| 52 | 0xf8f5f2f2 | ||
| 53 | 0xf8f5f1f1 | ||
| 54 | 0xf8f5f0f0 | ||
| 55 | 0xf8f5efef | ||
| 56 | 0xf8f5eeee | ||
| 57 | 0xf8f5eded | ||
| 58 | 0xf8f5ecec | ||
| 59 | 0xf8f5ebeb | ||
| 60 | 0xf8f5eaea | ||
| 61 | 0xf8f4f8f8 | ||
| 62 | 0xf8f4f7f7 | ||
| 63 | 0xf8f4f6f6 | ||
| 64 | 0xf8f4f5f5 | ||
| 65 | 0xf8f4f4f4 | ||
| 66 | 0xf8f4f3f3 | ||
| 67 | 0xf8f4f2f2 | ||
| 68 | 0xf8f4f1f1 | ||
| 69 | 0xf8f4f0f0 | ||
| 70 | 0xf8f4efef | ||
| 71 | 0xf8f4eeee | ||
| 72 | 0xf8f4eded | ||
| 73 | 0xf8f4ecec | ||
| 74 | 0xf8f4ebeb | ||
| 75 | 0xf8f4eaea | ||
| 76 | 0xf8f3f8f8 | ||
| 77 | 0xf8f3f7f7 | ||
| 78 | 0xf8f3f6f6 | ||
| 79 | 0xf8f3f5f5 | ||
| 80 | 0xf8f3f4f4 | ||
| 81 | 0xf8f3f3f3 | ||
| 82 | 0xf8f3f2f2 | ||
| 83 | 0xf8f3f1f1 | ||
| 84 | 0xf8f3f0f0 | ||
| 85 | 0xf8f3efef | ||
| 86 | 0xf8f3eeee | ||
| 87 | 0xf8f3eded | ||
| 88 | 0xf8f3ecec | ||
| 89 | 0xf8f3ebeb | ||
| 90 | 0xf8f3eaea | ||
| 91 | 0xf8f2f8f8 | ||
| 92 | 0xf8f2f7f7 | ||
| 93 | 0xf8f2f6f6 | ||
| 94 | 0xf8f2f5f5 | ||
| 95 | 0xf8f2f4f4 | ||
| 96 | 0xf8f2f3f3 | ||
| 97 | 0xf8f2f2f2 | ||
| 98 | 0xf8f2f1f1 | ||
| 99 | 0xf8f2f0f0 | ||
| 100 | 0xf8f2efef | ||
| 101 | 0xf8f2eeee | ||
| 102 | 0xf8f2eded | ||
| 103 | 0xf8f2ecec | ||
| 104 | 0xf8f2ebeb | ||
| 105 | 0xf8f2eaea | ||
| 106 | 0xf8f1f8f8 | ||
| 107 | 0xf8f1f7f7 | ||
| 108 | 0xf8f1f6f6 | ||
| 109 | 0xf8f1f5f5 | ||
| 110 | 0xf8f1f4f4 | ||
| 111 | 0xf8f1f3f3 | ||
| 112 | 0xf8f1f2f2 | ||
| 113 | 0xf8f1f1f1 | ||
| 114 | 0xf8f1f0f0 | ||
| 115 | 0xf8f1efef | ||
| 116 | 0xf8f1eeee | ||
| 117 | 0xf8f1eded | ||
| 118 | 0xf8f1ecec | ||
| 119 | 0xf8f1ebeb | ||
| 120 | 0xf8f1eaea | ||
| 121 | 0xf8f0f8f8 | ||
| 122 | 0xf8f0f7f7 | ||
| 123 | 0xf8f0f6f6 | ||
| 124 | 0xf8f0f5f5 | ||
| 125 | 0xf8f0f4f4 | ||
| 126 | 0xf8f0f3f3 | ||
| 127 | 0xf8f0f2f2 | ||
| 128 | 0xf8f0f1f1 | ||
| 129 | 0xf8f0f0f0 | ||
| 130 | 0xf8f0efef | ||
| 131 | 0xf8f0eeee | ||
| 132 | 0xf8f0eded | ||
| 133 | 0xf8f0ecec | ||
| 134 | 0xf8f0ebeb | ||
| 135 | 0xf8f0eaea | ||
diff --git a/other/Kermit/util/find_sys_call_table.sh b/other/Kermit/util/find_sys_call_table.sh new file mode 100644 index 0000000..54a7064 --- /dev/null +++ b/other/Kermit/util/find_sys_call_table.sh | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # script to find system call table in /dev/mem | ||
| 3 | # written by palmers / teso | ||
| 4 | |||
| 5 | TMP=./______some_strange_tmp_file | ||
| 6 | |||
| 7 | A=`./findsym -s sys_exit` | ||
| 8 | B=`./findsym -s sys_fork` | ||
| 9 | C=`./findsym -s sys_read` | ||
| 10 | D=`./findsym -s sys_write` | ||
| 11 | |||
| 12 | #echo $A $B $C $D | ||
| 13 | #transform the addresses ... | ||
| 14 | A1=`echo $A | cut -c 7,8` | ||
| 15 | A2=`echo $A | cut -c 5,6` | ||
| 16 | A3=`echo $A | cut -c 3,4` | ||
| 17 | A4=`echo $A | cut -c 1,2` | ||
| 18 | |||
| 19 | B1=`echo $B | cut -c 7,8` | ||
| 20 | B2=`echo $B | cut -c 5,6` | ||
| 21 | B3=`echo $B | cut -c 3,4` | ||
| 22 | B4=`echo $B | cut -c 1,2` | ||
| 23 | |||
| 24 | C1=`echo $C | cut -c 7,8` | ||
| 25 | C2=`echo $C | cut -c 5,6` | ||
| 26 | C3=`echo $C | cut -c 3,4` | ||
| 27 | C4=`echo $C | cut -c 1,2` | ||
| 28 | |||
| 29 | D1=`echo $D | cut -c 7,8` | ||
| 30 | D2=`echo $D | cut -c 5,6` | ||
| 31 | D3=`echo $D | cut -c 3,4` | ||
| 32 | D4=`echo $D | cut -c 1,2` | ||
| 33 | |||
| 34 | echo "sys_call_table c01a0000 c0260000 -4 10 $A1 $A2 $A3 $A4 $B1 $B2 $B3 $B4 $C1 $C2 $C3 $C4 $D1 $D2 $D3 $D4" > $TMP | ||
| 35 | ./findsym -f $TMP sys_call_table | ||
| 36 | rm $TMP | ||
diff --git a/other/Kermit/util/findallsym b/other/Kermit/util/findallsym new file mode 100644 index 0000000..3b2f54a --- /dev/null +++ b/other/Kermit/util/findallsym | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # written by palmers / teso | ||
| 3 | |||
| 4 | for x in `awk '{print $1}' SymbolFind.conf`; do | ||
| 5 | ./findsym $x | ||
| 6 | done | ||
diff --git a/other/Kermit/util/gen_defines b/other/Kermit/util/gen_defines new file mode 100644 index 0000000..dc8b869 --- /dev/null +++ b/other/Kermit/util/gen_defines | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # it is 1 am and im still heading to finish this tonight :) | ||
| 3 | # written by palmers / teso | ||
| 4 | |||
| 5 | IN_FILE="../tmp/_names" | ||
| 6 | OUT_FILE="../include/addresses.h" | ||
| 7 | NUM_FILE="../util/_numbers" | ||
| 8 | |||
| 9 | X=1 | ||
| 10 | LINE_COUNT=`wc -l $IN_FILE | awk '{print $1}' -` | ||
| 11 | |||
| 12 | cat << __EOF__ >> $OUT_FILE | ||
| 13 | /* | ||
| 14 | * addresses.h: | ||
| 15 | * this file was automaticly generated by gen_defines | ||
| 16 | */ | ||
| 17 | __EOF__ | ||
| 18 | |||
| 19 | while [ `expr $X \<\= $LINE_COUNT` == "1" ]; do | ||
| 20 | # did i already mention how late it is? dont try to understand the next line ... | ||
| 21 | echo \#define `sed -n \`echo $X\`p $IN_FILE | awk '{print toupper ($1)}' -`_ADD `sed -n \`echo $X\`p $NUM_FILE` >> $OUT_FILE | ||
| 22 | X=`expr $X \+ 1` | ||
| 23 | done | ||
diff --git a/other/Kermit/util/gen_name2add b/other/Kermit/util/gen_name2add new file mode 100644 index 0000000..62bff99 --- /dev/null +++ b/other/Kermit/util/gen_name2add | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # written by palmers / teso | ||
| 3 | IN_FILE="../tmp/_names" | ||
| 4 | OUT_FILE="../lib/name2add.c" | ||
| 5 | NUM_FILE="../util/_numbers" | ||
| 6 | |||
| 7 | X=1 | ||
| 8 | LINE_COUNT=`wc -l $IN_FILE | awk '{print $1}' -` | ||
| 9 | |||
| 10 | cat << __EOF__ >> $OUT_FILE | ||
| 11 | /* | ||
| 12 | * name2add.c: | ||
| 13 | * this file was automaticly generated by gen_name2add | ||
| 14 | */ | ||
| 15 | #include <stdio.h> | ||
| 16 | #include <name2add.h> | ||
| 17 | |||
| 18 | __name2add __n2a[] = | ||
| 19 | { | ||
| 20 | __EOF__ | ||
| 21 | |||
| 22 | |||
| 23 | while [ `expr $X \<\= $LINE_COUNT` == "1" ]; do | ||
| 24 | echo " " {\"`sed -n \`echo $X\`p $IN_FILE`\", `sed -n \`echo $X\`p $NUM_FILE`}, >> $OUT_FILE | ||
| 25 | X=`expr $X \+ 1` | ||
| 26 | done | ||
| 27 | |||
| 28 | |||
| 29 | cat << __EOF__ >> $OUT_FILE | ||
| 30 | {NULL, 0} | ||
| 31 | }; | ||
| 32 | |||
| 33 | __EOF__ | ||
diff --git a/other/Kermit/util/gen_names_from_proto b/other/Kermit/util/gen_names_from_proto new file mode 100644 index 0000000..3df384f --- /dev/null +++ b/other/Kermit/util/gen_names_from_proto | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # written by palmers / teso | ||
| 3 | |||
| 4 | IN_FILE="../include/pseudo_link.h" | ||
| 5 | OUT_FILE="../tmp/_names" | ||
| 6 | |||
| 7 | grep "^[A-Za-z0-9_-]* [\*]*(\*" $IN_FILE | \ | ||
| 8 | awk -F\( '{print $2}' | \ | ||
| 9 | awk -F\* '{print $2}' | \ | ||
| 10 | awk -F\) '{print $1}' > $OUT_FILE | ||
| 11 | |||
diff --git a/other/Kermit/util/get_some.sh b/other/Kermit/util/get_some.sh new file mode 100644 index 0000000..5d1a7f2 --- /dev/null +++ b/other/Kermit/util/get_some.sh | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # written by palmers / teso | ||
| 3 | # generates SymbolFind.conf | ||
| 4 | # --> unfinished! | ||
| 5 | MAP=../2.2.x/System.map-ditchen-2.2.16 | ||
| 6 | |||
| 7 | for x in kmalloc sys_execve sys_unlink sys_chmod sys_kill sys_exit sys_fork sys_read sys_write sys_open sys_close init sys_setuid sys_setgid sys_getdents sys_socketcall; do | ||
| 8 | ADD=`grep \ $x\$ $MAP | awk '{print $1}' -` | ||
| 9 | PATT=`./readsym d $ADD f` | ||
| 10 | echo $x " " $ADD " 00 0f" $PATT | ||
| 11 | done | ||
