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

Method constructor

g2all/900/rop/900.js:193–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191
192class Chain900Base extends ChainBase {
193 constructor() {
194 super();
195
196 // for conditional jumps
197 this._clean_branch_ctx();
198 this.flag = new Uint8Array(8);
199 this.flag_addr = get_view_vector(this.flag);
200 this.jmp_target = new Uint8Array(0x100);
201 rw.write64(this.jmp_target, 0x1c, this.get_gadget(jop4));
202 rw.write64(this.jmp_target, 0, this.get_gadget(jop5));
203
204 // for save/restore
205 this.is_saved = false;
206 this.is_stale = false;
207 this.position = 0;
208 const jmp_buf_size = 0xc8;
209 this.jmp_buf = new Uint8Array(jmp_buf_size);
210 this.jmp_buf_p = get_view_vector(this.jmp_buf);
211 }
212
213 // sequence to pivot back and return
214 push_end() {

Callers

nothing calls this directly

Calls 4

_clean_branch_ctxMethod · 0.95
get_view_vectorFunction · 0.90
write64Method · 0.45
get_gadgetMethod · 0.45

Tested by

no test coverage detected