Last active
January 8, 2024 16:21
-
-
Save oleavr/a22d675b76e7509cd2c9 to your computer and use it in GitHub Desktop.
Revisions
-
oleavr revised this gist
Feb 17, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Install Node.js 5.x, then: ``` npm install frida co uuid -
oleavr revised this gist
Sep 19, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Install Node.js 4.x, then: ``` npm install frida co uuid ``` and run: -
oleavr renamed this gist
Sep 19, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
oleavr revised this gist
Sep 19, 2015 . No changes.There are no files selected for viewing
-
oleavr renamed this gist
Sep 19, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
oleavr renamed this gist
Sep 19, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
oleavr revised this gist
Sep 19, 2015 . No changes.There are no files selected for viewing
-
oleavr revised this gist
Sep 19, 2015 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const uuid = require('uuid'); rpc.exports = { init() { Interceptor.attach(Module.findExportByName('libsystem_kernel.dylib', 'open'), { onEnter(args) { send(['open', Memory.readUtf8String(args[0])]); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ co(function *() { script.events.listen('message', onMessage); yield script.load(); const api = yield script.getExports(); const id = yield api.init(); console.log('Got ID:', id); yield device.resume(pid); }) -
oleavr revised this gist
Sep 19, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Install Node.js 4.x, then: ``` npm install --save frida co uuid ``` and run: -
oleavr created this gist
Sep 19, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Install Node.js 4.x, then: ``` npm install --save co frida uuid ``` and run: ``` node app.js ``` This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ 'use strict'; const uuid = require('uuid'); rpc.exports = { hey() { Interceptor.attach(Module.findExportByName('libsystem_kernel.dylib', 'open'), { onEnter(args) { send(['open', Memory.readUtf8String(args[0])]); } }); return uuid.v4(); } }; This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ 'use strict'; const co = require('co'); const frida = require('frida'); let session, script; co(function *() { const source = yield frida.load(require.resolve('./agent.js')); const device = yield frida.getUsbDevice(); const pid = yield device.spawn(['com.atebits.Tweetie2']); session = yield device.attach(pid); script = yield session.createScript(source); script.events.listen('message', onMessage); yield script.load(); const api = yield script.getExports(); const id = yield api.hey(); console.log('Got ID:', id); yield device.resume(pid); }) .catch(onError); function onError(error) { console.error(error.stack); } function onMessage(message, data) { if (message.type === 'send') { console.log(message.payload); } else if (message.type === 'error') { console.error(message.stack); } else { console.log(message); } }