RE env for inspecting APKs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.8 KiB

  1. /*
  2. * Auto-generated by Frida. Please modify to match the signature of sendto.
  3. * This stub is currently auto-generated from manpages when available.
  4. *
  5. * For full API reference, see: https://frida.re/docs/javascript-api/
  6. */
  7. {
  8. /**
  9. * Called synchronously when about to call sendto.
  10. *
  11. * @this {object} - Object allowing you to store state for use in onLeave.
  12. * @param {function} log - Call this function with a string to be presented to the user.
  13. * @param {array} args - Function arguments represented as an array of NativePointer objects.
  14. * For example use args[0].readUtf8String() if the first argument is a pointer to a C string encoded as UTF-8.
  15. * It is also possible to modify arguments by assigning a NativePointer object to an element of this array.
  16. * @param {object} state - Object allowing you to keep state across function calls.
  17. * Only one JavaScript function will execute at a time, so do not worry about race-conditions.
  18. * However, do not use this to store function arguments across onEnter/onLeave, but instead
  19. * use "this" which is an object for keeping state local to an invocation.
  20. */
  21. onEnter(log, args, state) {
  22. log(`sendto(sockfd=${args[0]}, buf=${args[1]}, len=${args[2]}, flags=${args[3]}, dest_addr=${args[4]}, addrlen=${args[5]})`);
  23. },
  24. /**
  25. * Called synchronously when about to return from sendto.
  26. *
  27. * See onEnter for details.
  28. *
  29. * @this {object} - Object allowing you to access state stored in onEnter.
  30. * @param {function} log - Call this function with a string to be presented to the user.
  31. * @param {NativePointer} retval - Return value represented as a NativePointer object.
  32. * @param {object} state - Object allowing you to keep state across function calls.
  33. */
  34. onLeave(log, retval, state) {
  35. }
  36. }