Automatically find dupa() address, fix plo() command
This commit is contained in:
32
.debugusrc1.js.txt
Normal file
32
.debugusrc1.js.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
// User script
|
||||
|
||||
lif("Loading user init script for program ./test");
|
||||
ler("Test error message");
|
||||
|
||||
var offset = "@DUPA_ADDR"; // dupa(), objdump -d ./test
|
||||
|
||||
// Testing...
|
||||
pf();
|
||||
ppid();
|
||||
pplo();
|
||||
baddr(offset);
|
||||
lsbrk();
|
||||
|
||||
lif("1 --------------------------------------------");
|
||||
dr();
|
||||
var r14 = gr("r14");
|
||||
sr("r14", "0x0");
|
||||
lif("2 --------------------------------------------");
|
||||
dr();
|
||||
sr("r14", r14);
|
||||
lif("3 --------------------------------------------");
|
||||
dr();
|
||||
|
||||
var r14_mem = mrdr("r14");
|
||||
lif("Memory at r14 " + r14_mem);
|
||||
mwrr("r14", "0x696969");
|
||||
lif("Memory at r14 " + mrdr("r14"));
|
||||
mwrr("r14", r14_mem);
|
||||
lif("Memory at r14 " + mrdr("r14"));
|
||||
|
||||
// cont();
|
||||
Reference in New Issue
Block a user