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
// package.json | |
{ | |
"dependencies": { | |
"bip32": "^4.0.0", | |
"bitcoinjs-lib": "^6.1.1", | |
"electrum-client": "^0.0.6", | |
"tiny-secp256k1": "^2.2.1", | |
"xpub-converter": "^1.0.2" | |
}, | |
"name": "get-utxos", |
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
#! /usr/bin/env bash | |
function run() { | |
read_wordlist | |
local input | |
printf "Enter seed words: " | |
read -r input | |
local seed_words=() |
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
#! /usr/bin/env node | |
const { Transaction } = require("bitcoinjs-lib"); | |
const fs = require("fs"); | |
const inputFile = "txhex"; | |
const outputFile = "output.bin"; | |
let hex = fs.readFileSync(inputFile, "utf8"); | |
let tx = Transaction.fromHex(Buffer.from(hex, "hex")); |
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
# 1024-bit key | |
keytool -printcert -jarfile apk_file 2>/dev/null | grep SHA256 | cut -f2- -d':' | tr -cd '[[:xdigit:]]:'; echo | |
# 4096-bit key | |
apksigner verify -v --print-certs --min-sdk-version 24 apk_file | grep "certificate SHA-256" |
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
#! /usr/bin/env node | |
// To run, start a project and install the dependency with: | |
// `npm init` and `npm i node-bitcoin-rpc`. | |
const rpc = require("node-bitcoin-rpc"); | |
const fs = require("fs"); | |
const opMap = new Map(); | |
const tickMap = new Map(); |
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
#! /usr/bin/env node | |
const rpc = require("node-bitcoin-rpc"); | |
const fs = require("fs"); | |
const inscriptionMark = Buffer.from("0063036f7264", "hex"); | |
const keywords = ["brc-20", "op", "mint", "tick", "\"sats\"", "amt"]; | |
const op_endif = 0x68; | |
async function run() { |
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
#! /usr/bin/env python | |
# Finds which .dat file contains the block. | |
# Warning: this will most likely corrupt the block index. You are strongly advised to copy the index (around 100MB) to a different location and | |
# run the script in that location (change path below). | |
# | |
# Path to index: $datadir/blocks/index | |
import sys | |
import plyvel |
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
#! /usr/bin/env bash | |
if [ "$#" -eq "0" ]; then | |
echo "Usage: $0 <desired-ip-address>" | |
curr_ip="$(ip route get 1.1.1.1 | awk '{print$7}')" | |
echo "FYI your current IP address is: $curr_ip" | |
exit 1 | |
fi | |
# TODO: check if input looks like an ip |
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
#! /usr/bin/env python | |
import sys, os, base64, argparse | |
def get_cli_args(): | |
ap = argparse.ArgumentParser(description="Parse and output the ordinal inscription inside transaction") | |
if sys.stdin.isatty(): | |
ap.add_argument("tx_file", help="input raw transaction file") | |
ap.add_argument("-du", "--data-uri", action="store_true", help="print inscription as data-uri instead of writing to a file") |
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
#! /usr/bin/env python | |
import base64, binascii, sys | |
key = bytearray("sdf@!#$verf^wv%6Fwe%$$#FFGwfsdefwfe135s$^H)dg", "utf8") | |
def main(): | |
if len(sys.argv) < 2: | |
print(f"usage: {sys.argv[0]} <password>", file = sys.stderr) | |
sys.exit(1) |
NewerOlder