Comments (5)
You mean a primitive array (int[])?
Use
var intArray = [1, 2, 3];
...
Update:
Could you use a Java method that returns an array?
var intArray = [1,2,3];
intArray = klass.staticFillMethod(intArray);
send('data', intArray);
from frida-gum.
No, in my case I cannot use a method that return an array, my method only fills the buffer passed as parameter.
As you suggested first, I tried to simply instantiate a JS array (var intArray = new Array(size);
or var intArray = [1, 2, 3];
) and pass it as is, but it is left untouched.
from frida-gum.
One possibilty would be to create a wrapper class in Java so you could load it with Java.openClassFile(...).load()
.
Java.openClassFile('classes.dex').load();
const helperClass = Java.use("....helperClass");
But I think the preferred way would be something like that (but it isn't currently implemented)
const intArray = Java.primitiveArray("int[]", [1,2,3]);
klass.fillMethod(intArray);
from frida-gum.
Ok, thanks a lot for your answer.
This is indeed not the preferable way, but could be a usable workaround.
I'll update my post later when I use it.
from frida-gum.
@stevielavern any update please?
from frida-gum.
Related Issues (20)
- Injected code resolves symbols from target binary, not from libc
- Diet version of Frida-gum doesn't build on Android ARM64 HOT 1
- Can't find Go binary symbols when running in Linux using Docker + Virtiofs + macOS host HOT 3
- gum-js-loop (20): EXC_BAD_ACCESS (code=1, address=0x0)
- gum_memory_patch_code causes EXC_BAD_ACCESS (code=2) on jailbroken iOS 16.5 HOT 1
- gum_stalker_new() Crash!!!!!!!!!! HOT 1
- Regression(?) in Module.enumerateExports and Module.enumerateSymbols HOT 1
- Under certain cases, `_gum_interceptor_backend_create_trampoline` does not relocate instructions properly on aarch64 for the `on_invoke_trampoline` HOT 1
- Signal handling on macOS
- Frida capstone's version is too older
- iterator.context is undefined
- Windows 11 Build Error
- `Module.enumerateSymbols` missed lots of local symbols from iOS dyld_shared_cache
- Fatal signal 11 (SIGSEGV), code 1, fault addr 0x38 in tid 16884 HOT 3
- module.enumerateExports().length == 0 HOT 2
- TypeError: cannot read property 'objc_lookUpClass' of null
- NativeCallback unable to leave thread's last error unchanged
- Don't lose track of the stalker follow when a windows C++/SEH exception is thrown
- [Stalker]Unable to allocate code slab near 0x7c4f333000 with max_distance=2138779647 HOT 2
- Diet Build fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frida-gum.