intercept read/pread/readv from file descriptors
This commit is contained in:
parent
e151ca90fb
commit
26b85c3e4a
@ -266,7 +266,7 @@ var fds = {};
|
|||||||
Interceptor.attach(Module.findExportByName(null, 'open'), {
|
Interceptor.attach(Module.findExportByName(null, 'open'), {
|
||||||
onEnter: function (args) {
|
onEnter: function (args) {
|
||||||
var fname = args[0].readCString();
|
var fname = args[0].readCString();
|
||||||
if (fname.endsWith('kdc')) {
|
if (fname.endsWith('.jar')) {
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
this.fname = fname;
|
this.fname = fname;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,8 @@ Interceptor.attach(Module.findExportByName(null, 'open'), {
|
|||||||
onEnter: function (args) {
|
onEnter: function (args) {
|
||||||
var fd = args[0];
|
var fd = args[0];
|
||||||
if (fd in fds)
|
if (fd in fds)
|
||||||
console.log(`${fnc}: ${fds[fd]}\n\t${Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join('\n\t')}`);
|
console.log(`${fnc}: ${fds[fd]}
|
||||||
|
\t${Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join('\n\t')}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user