diff options
Diffstat (limited to 'src/js/lib')
| -rwxr-xr-x | src/js/lib/myutils.js | 7 | ||||
| -rw-r--r-- | src/js/lib/str.js | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/js/lib/myutils.js b/src/js/lib/myutils.js index e856624..89860f8 100755 --- a/src/js/lib/myutils.js +++ b/src/js/lib/myutils.js @@ -116,4 +116,9 @@ var mach_msg = scall_wrapper("mach_msg"); var mmap = scall_wrapper("mmap"); var free = scall_wrapper("free"); var mlock = scall_wrapper("mlock"); -var mprotect = scall_wrapper("mprotect");
\ No newline at end of file +var mprotect = scall_wrapper("mprotect"); +var dlopen = scall_wrapper("dlopen"); +var dlsym = scall_wrapper("dlsym"); +var CFDictionaryCreateMutable = scall_wrapper("CFDictionaryCreateMutable"); +var CFDictionarySetValue = scall_wrapper("CFDictionarySetValue"); +var CFNumberCreate = scall_wrapper("CFNumberCreate");
\ No newline at end of file diff --git a/src/js/lib/str.js b/src/js/lib/str.js index 31621bf..c95573d 100644 --- a/src/js/lib/str.js +++ b/src/js/lib/str.js @@ -2,7 +2,7 @@ * currently unused (iirc) garbage * basically just prints an address than the uint32_t there, and then +4, etc */ -function prim_dump_u32(buf) { +function prim_dump_u32(buf, base) { s = ""; for (var i = 0; i < buf.length; i += 4) { @@ -13,10 +13,10 @@ function prim_dump_u32(buf) { tmp.push(buf[i + 2]); tmp.push(buf[i + 3]); - s += "0x" + pad_left((0x422200 + i).toString(16), "0", 8); + s += "0x" + pad_left((base + i).toString(16), "0", 8); s += ": "; s += "0x" + pad_left(u8x4_to_u32(tmp).toString(16), "0", 8); - if (u8x4_to_u32(tmp) >= 0x1800000 && u8x4_to_u32(tmp) < 0x1900000) { +/* if (u8x4_to_u32(tmp) >= 0x1800000 && u8x4_to_u32(tmp) < 0x1900000) { s += " -> 0x" + pad_left(read_u32(u8x4_to_u32(tmp)).toString(16), "0", 8); s += "\n"; val = read_u32(u8x4_to_u32(tmp)); @@ -24,7 +24,7 @@ function prim_dump_u32(buf) { buf = read_buf(val, 0x100); s += (hexdump(buf, 8, 2, val, 8, "0x")); } - } + }*/ s += "\n"; } |
