Skip to content

Instantly share code, notes, and snippets.

kbahr / BasicUtilities.js
Last active Sep 8, 2021
HEX pull interest to date
View BasicUtilities.js
const Web3 = require('web3');
const compiledContractABI = require('./HEX.abi.json');
const hexAddr = "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39";
const findStakeAndIndex = async (addr, stakeId) => {
let stakes = await hex.stakeList(addr);
for(let i = 0; i < stakes.length; i++){
if(stakes[i].stakeId === stakeId){
View yet another radare2


load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
miglen /
Last active Sep 19, 2021
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4       0      0        ESTABLISHED
mzfr /
Created May 27, 2020
Convert IP address to Decimal or hexadecimal format
You can run this in the following format:
For decimal: python3 D <Ip-address>
For Hexadecimal: python3 H <Ip-address>
import sys
if len(sys.argv) < 3: