-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'require' is not defined #8
Comments
Hi, the output of Is it just a typo ? |
frida -U -f pkg -l trace.js --no-paus |
error info |
|
are you sure The content of
PS : don't use --no-pause |
frida-compile compile no error message |
Can you copy content of |
📦 ✄ |
Did you download https://github.com/FrenchYeti/interruptor/releases/tag/v0.2.0 |
thanks |
This repository holds the source code of Interruptor, but to keep the final hook script as light as possible you should download the minified Interruptor lib for your target arch/os and refer to it in Scripts inside |
download android-arm64-strace.min.js ,frida-compile compile success frida -U -f pkg -l trace.js --no-paus |
📦 ✄ ✄ |
I don't obtain the same output than you. Can you try following things:
|
D:\work\android\frida\trace\interruptor-0.2.0\test>frida -U -l ./simple_trace.min.js -f |
Oups typo at step 3 |
I know, but frida-compile compile success |
Writing Down My Step Which Might Help Other Guys git clone https://github.com/FrenchYeti/interruptor cd interruptor npm install $ npx tsc && npx webpack --config webpack.android.arm64.config.js
asset android-arm64-strace.min.js 76 KiB [emitted] [minimized] (name: main)
modules by path ./dist/src/common/*.js 17.7 KiB
./dist/src/common/Types.js 1.88 KiB [built] [code generated]
./dist/src/common/AbstractInterruptorFactory.js 1.5 KiB [built] [code generated]
./dist/src/common/TypeDef.js 432 bytes [built] [code generated]
./dist/src/common/InterruptorAgent.js 10.7 KiB [built] [code generated]
./dist/src/common/InterruptorException.js 1.86 KiB [built] [code generated]
./dist/src/common/TypedData.js 1.33 KiB [built] [code generated]
modules by path ./dist/src/arch/*.js 25.2 KiB
./dist/src/arch/LinuxArm64InterruptorFactory.js 3.52 KiB [built] [code generated]
./dist/src/arch/LinuxArm64InterruptorAgent.js 21.6 KiB [built] [code generated]
./dist/index.linux.arm64.js 349 bytes [built] [code generated]
./dist/src/kernelapi/LinuxArm64Flags.js 35.7 KiB [built] [code generated]
./dist/src/syscalls/LinuxAarch64Syscalls.js 39.2 KiB [built] [code generated]
./dist/src/utilities/Coverage.js 8.11 KiB [built] [code generated]
webpack 5.73.0 compiled successfully in 2125 ms cp dist/android-arm64-strace.min.js ./examples/android/ frida-compile examples/android/simple_strace.js -o trace.js |
have same problem |
Got
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64();
// better results, when app is loaded
Java.perform(()=>{
Interruptor.newAgentTracer({
exclude: {
modules: ["linker64"],
syscalls: ["clock_gettime"]
}
}).start();
}); after 📦
402 /a.js.map
295 /a.js
158018 /android-arm64-strace.min.js.map
94278 /android-arm64-strace.min.js
✄
{"version":3,"file":"a.js","sourceRoot":"/home/xxx/Desktop/aaa/","sources":["a.js"],"names":[],"mappings":"AAAA,IAAI,WAAW,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;AAE/E,qCAAqC;AACrC,IAAI,CAAC,OAAO,CAAC,GAAE,EAAE;IACb,WAAW,CAAC,cAAc,CAAC;QACvB,OAAO,EAAE;YACL,OAAO,EAAE,CAAC,UAAU,CAAC;YACrB,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC9B;KACJ,CAAC,CAAC,KAAK,EAAE,CAAC;AACf,CAAC,CAAC,CAAC"}
✄
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64();
// better results, when app is loaded
Java.perform(() => {
Interruptor.newAgentTracer({
exclude: {
modules: ["linker64"],
syscalls: ["clock_gettime"]
}
}).start();
});
✄
{"version":3,"file":"android-arm64-strace.min.js","sourceRoot":"/home/xxx/Desktop/aaa/","sources":["android-arm64-strace.min.js"],"names":[],"mappings":"AAAA,CAAC,GAAE,EAAE,GAAc,IAAI,CAAC,GAAC,EAAC,GAAG,EAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,GAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAC,YAAY,EAAC,EAAC,KAAK,EAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,0BAA0B,GAAC,CAAC,CAAC,IAAI,GAAC,KAAK,CAAC,CAAC,CAAA,MAAM,CAAC,GAAC,CAAC,CAAC,GAAG,CAAC,EAAC,CAAC,GAAC,CAAC,CAAC,GAAG,CAAC,EAAC,CAAC,GAAC,CAAC,CAAC,EAAE,CAAC,EAAC,CAAC,GAAC,CAAC
...
KAAI,IAAI,CAAC,IAAI,CAAC;IAAC,CAAC,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,UAAU,IAAE,MAAM,CAAC,cAAc,CAAC,CAAC,EAAC,YAAY,EAAC,EAAC,KAAK,EAAC,CAAC,CAAC,EAAC,CAAC,CAAA,CAAA,CAAC,CAAC,EAAE,CAAC"}
✄
(() => { var t = { 611: (t, E, e) => { Object.defineProperty(E, "__esModule", { value: !0 }), E.LinuxArm64InterruptorAgent = E.KAPI = void 0; const _ = e(204), T = e(451), n = e(95), I = e(187), s = e(605), o = I.AT_, r = (I.E, I.MAP_), i = I.X, S = {}, A = {}; s.SVC.map((t => { A[t[1]] = t, S[t[0]] = t; })); let O = null; E.KAPI = { CONST: I, SVC: A, SVC_ARG: 3, ERR: I.ERR }; class R extends _.InterruptorAgent {
... |
If I manually remove code specified by scissors I'm getting following error:
|
maybe related: oleavr/frida-agent-example#24 (comment) |
@grubeli Hi, have you settled this issue? because I have the same issue and can't get over it. |
same issue here |
@irineu Since the first issue, there are several new way to use Interruptor, especially with frida v16.x because frida-compile step is not still required. So, could you comment what is the issue ? How do you use Interruptor ? Do you use minified JS file or NPM package with TypeScript agent ? |
#8 (comment) Both for the suggested installation method in the README and this workaround I get same error when trying to run the script with frida. error TS6053: File '.../interruptor/examples/android/examples/android/simple_strace.js' not found. And the file is there ofcourse...Also when running frida -U -l ./android-arm64-strace.min.js -f PACKAGE many things are not clearAlso wasn't sure of the mixing between typescript (Suggested method) and javascript |
demo examples\android\simple_strace.js
1、frida-compile simple_strace.js -o trace.js
2、frida -U -f pkg -l strace.js --no-paus
error:
ReferenceError: 'require' is not defined
at (/strace.js:1)
src:
var em_module = require('./android-arm64-strace.min.js').target.LinuxArm64();
Java.perform(() => {
em_module.newAgentTracer({
exclude: {
syscalls: ["clock_gettime"]
}
}).start();
});
The text was updated successfully, but these errors were encountered: