I figured that I would write down my findings somewhere since this is my first time using Frida. This won't cover installing frida, adb, apktool because these are well covered in other sources.
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 characters
| function interceptNetworkRequests(ee) { | |
| const open = XMLHttpRequest.prototype.open; | |
| const send = XMLHttpRequest.prototype.send; | |
| const isRegularXHR = open.toString().indexOf('native code') !== -1; | |
| // don't hijack if already hijacked - this will mess up with frameworks like Angular with zones | |
| // we work if we load first there which we can. | |
| if (isRegularXHR) { |
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 characters
| // DONT FORGET TO `yarn add esbuild-loader` !!! | |
| // config/webpacker/environment.js | |
| const { environment } = require('@rails/webpacker') | |
| const { ESBuildPlugin } = require('esbuild-loader') | |
| const esBuildUse = [ | |
| { | |
| loader: require.resolve('esbuild-loader'), | |
| // What you want to compile to, in this case, ES7 |
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 characters
| //Import dependencies | |
| const bip32 = require('bip32') | |
| const bip39 = require('bip39') | |
| const bitcoin = require('bitcoinjs-lib') | |
| //Define the network | |
| const network = bitcoin.networks.bitcoin //use networks.testnet for testnet | |
| // Derivation path | |
| const path = `m/49'/0'/0'/0` // Use m/49'/1'/0'/0 for testnet |
Sometimes you have members from your data team who are looking at the database and have no idea what the enum integer values mean. This snippet of code helps to extract the readable names for those integers into markdown tables to help out your data team.
There are alternative approaches by using string enums via gems, or database enums, but this was made for an environment where those weren't an option (legacy enums, and no database enums available).
You could also put this into a Rake task and publish it into a wiki.
OlderNewer