Comments (13)
Ok. I checked. It looks like there is currently no way to convert a NativePointer into a float... We probably need to add a .toFloat
method.
from frida-tools.
If you're feeling adventurous, you could open a PR to add .toFloat
to NativePointer. Unfortunately it's not high on the priority list, even though it would be great to have and probably not too much work.
from frida-tools.
This is expected behavior. Your function is not receiving pointers, it is receiving values. Thus you will see values in the trace handler, not pointers to them. The values will be wrapped in a NativePointer
structure, so that 64-bit values (and pointers) can be represented. NativePointer
does not introduce any indirection in and of itself.
Closing.
from frida-tools.
Could you explain the correct way to print the float in my example in the log, or point me to the documentation, or an example, rather than just saying it is wrong with no correction? Because If what you say is true, then why is neither log of args[2] in my example 3.141?
In the first log command args[2] I get 0x7ffee3d99d90
which is a pointer value, not a 32-bit float (nor is it a 64bit double), and on the second when I call the function NativePointer.readFloat(), I get the wrong value.
from frida-tools.
I'm not sure how to 'cast' the NativePointer to a float. @oleavr Can you chime in?
from frida-tools.
OK, thanks. In the issue I cited, the recommendation was to inject a NativeFunction (especially for structs and other datatypes that are machine/program dependent), but I was hoping there had been progress.
from frida-tools.
Hi @s1341 ... I am feeling adventurous. I'll take a swing at it.
from frida-tools.
@s1341 ... It looks like gumv8memory.cpp
already implemented it:
case GUM_MEMORY_VALUE_FLOAT:
result = Number::New (isolate, *((gfloat *) address));
break;
case GUM_MEMORY_VALUE_DOUBLE:
result = Number::New (isolate, *((gdouble *) address));
break;
But this is reading the pointer memory as float, rather than converting the bytes .toFloat
as you suggested. I see the difference now.
from frida-tools.
@petertorelli looks good in general. I'd recommend trying to get it building. It's quite easy to get setup... Look at the hacking guide and feel free to ask questions here, or in the telegram channel...
from frida-tools.
I also encountered this problem
from frida-tools.
I also encountered this problem ,jni jfloat --> float
from frida-tools.
@petertorelli Have you solved this problem?
from frida-tools.
I have installed the new latest version,encountered this problem also.
from frida-tools.
Related Issues (20)
- Loaded script globals are no longer added to the REPL namespace
- How to load script and exit frida environment after removing `--no-pause`? HOT 2
- Demangle function names on tracing modules with frida-trace
- Error message when using Frida-Tools with Frida 16.0.7: "ValueError: file descriptor cannot be a negative integer" HOT 2
- Add parameters/command args to spawned process
- Trying to get the TP-UE300 Ethernet Adapter to work with the internet on THEA500 HOT 1
- increase members limit ?
- Running APK are crashing during dumping using Frida-trace -U -i "*" to dump all function
- What is frida-itrace?
- Add delay option
- respond to the NO_COLOR environment variable by suppressing color output HOT 1
- test_tracer.py test_basics prints stack trace
- tracer.py has incomplete type annotations
- README.md says "You do not need to build this repo" to use it, but then tracer_agent.js is missing HOT 2
- frida-trace on case insensitive filesystem (Mac OS)
- Failed to attach: the connection is closed, after upgrade to macos 14.4
- frida-discover nothing output
- frida-tools 12.4.0 distribution fails to run frida-ps and frida-trace HOT 4
- frida-tools 12.4.2 wheel build fails HOT 3
- Error in threading.py causes no usb devices
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-tools.