-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trace 192.168.120.254:5500 using frida
- Loading branch information
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Auto-generated by Frida. Please modify to match the signature of SSL_read. | ||
* This stub is currently auto-generated from manpages when available. | ||
* | ||
* For full API reference, see: https://frida.re/docs/javascript-api/ | ||
*/ | ||
|
||
{ | ||
/** | ||
* Called synchronously when about to call SSL_read. | ||
* | ||
* @this {object} - Object allowing you to store state for use in onLeave. | ||
* @param {function} log - Call this function with a string to be presented to the user. | ||
* @param {array} args - Function arguments represented as an array of NativePointer objects. | ||
* For example use args[0].readUtf8String() if the first argument is a pointer to a C string encoded as UTF-8. | ||
* It is also possible to modify arguments by assigning a NativePointer object to an element of this array. | ||
* @param {object} state - Object allowing you to keep state across function calls. | ||
* Only one JavaScript function will execute at a time, so do not worry about race-conditions. | ||
* However, do not use this to store function arguments across onEnter/onLeave, but instead | ||
* use "this" which is an object for keeping state local to an invocation. | ||
*/ | ||
onEnter(log, args, state) { | ||
this.ssl = args[0]; | ||
this.buf = args[1]; | ||
this.num = args[2]; | ||
}, | ||
|
||
/** | ||
* Called synchronously when about to return from SSL_read. | ||
* | ||
* See onEnter for details. | ||
* | ||
* @this {object} - Object allowing you to access state stored in onEnter. | ||
* @param {function} log - Call this function with a string to be presented to the user. | ||
* @param {NativePointer} retval - Return value represented as a NativePointer object. | ||
* @param {object} state - Object allowing you to keep state across function calls. | ||
*/ | ||
onLeave(log, retval, state) { | ||
retval |= 0; | ||
if (retval <= 0) | ||
{ | ||
return; | ||
} | ||
const data = this.buf.readByteArray(retval); | ||
send(["read", retval, this.ssl, this.buf, this.num]); | ||
console.log(data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Auto-generated by Frida. Please modify to match the signature of SSL_write. | ||
* This stub is currently auto-generated from manpages when available. | ||
* | ||
* For full API reference, see: https://frida.re/docs/javascript-api/ | ||
*/ | ||
|
||
{ | ||
/** | ||
* Called synchronously when about to call SSL_write. | ||
* | ||
* @this {object} - Object allowing you to store state for use in onLeave. | ||
* @param {function} log - Call this function with a string to be presented to the user. | ||
* @param {array} args - Function arguments represented as an array of NativePointer objects. | ||
* For example use args[0].readUtf8String() if the first argument is a pointer to a C string encoded as UTF-8. | ||
* It is also possible to modify arguments by assigning a NativePointer object to an element of this array. | ||
* @param {object} state - Object allowing you to keep state across function calls. | ||
* Only one JavaScript function will execute at a time, so do not worry about race-conditions. | ||
* However, do not use this to store function arguments across onEnter/onLeave, but instead | ||
* use "this" which is an object for keeping state local to an invocation. | ||
*/ | ||
onEnter(log, args, state) { | ||
const ssl = args[0]; | ||
const buf = args[1]; | ||
const num = parseInt(args[2]); | ||
const data = buf.readByteArray(num); | ||
send(["write", ssl, buf, num]); | ||
console.log(data) | ||
}, | ||
|
||
/** | ||
* Called synchronously when about to return from SSL_write. | ||
* | ||
* See onEnter for details. | ||
* | ||
* @this {object} - Object allowing you to access state stored in onEnter. | ||
* @param {function} log - Call this function with a string to be presented to the user. | ||
* @param {NativePointer} retval - Return value represented as a NativePointer object. | ||
* @param {object} state - Object allowing you to keep state across function calls. | ||
*/ | ||
onLeave(log, retval, state) { | ||
} | ||
} |