Open hexploitable opened 2 months ago
Currently module map data is written out to the JS irrespective of whether -S is used. This PR addresses this and correctly produces JS without the module map data embedded within.
-S
Example:
β frida-compile git:(main) β frida-compile foo.js π¦ 358 /foo.js.map 171 /foo.js 11 /foo.d.ts β {"version":3,"file":"foo.js","sourceRoot":"/home/hex/Tools/frida-compile/","sources":["foo.js"],"names":[],"mappings":"AAAA,MAAM,GAAG,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAA;AAEtC,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,MAAM,EAAE,CAAC,CAAA;AAC3C,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;IACnB,OAAO,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;AAC5C,CAAC,CAAC,CAAA"} β const mod = Process.enumerateModules(); console.log(`Modules found: ${mod.length}`); mod.forEach((modObj) => { console.log(`Mod name:= ${modObj.name}`); }); export {}; β export {};
Vs:
β frida-compile git:(main) β frida-compile -S foo.js π¦ 172 /foo.js 11 /foo.d.ts β const mod = Process.enumerateModules(); console.log(`Modules found: ${mod.length}`); mod.forEach((modObj) => { console.log(`Mod name:= ${modObj.name}`); }); export {}; β export {};
Currently module map data is written out to the JS irrespective of whether
-S
is used. This PR addresses this and correctly produces JS without the module map data embedded within.Example:
Vs: