Skip to content

Instantly share code, notes, and snippets.

@terorie
terorie / npm-audit.txt
Created Aug 13, 2022
Vulnerabilities in web3.js 1.7.5
View npm-audit.txt
# npm audit report
ansi-regex 4.0.0 - 4.1.0
Severity: high
Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/ganache-cli/node_modules/ansi-regex
node_modules/yargs/node_modules/ansi-regex
elliptic <6.5.4
@terorie
terorie / opcode_stats_139240745.csv
Last active Jul 7, 2022
SBF opcodes Solana mainnet slot 139240745
View opcode_stats_139240745.csv
opcode mnemonic num_programs num_insns
0x05 JA 3378 4575210
0x07 ADD64_IMM 3378 12310893
0x0f ADD64_REG 3378 1631572
0x15 JEQ_IMM 3378 3253085
0x18 LD_DW_IMM 3379 3771402
0x1d JEQ_REG 3363 247250
0x1f SUB64_REG 3345 514578
0x25 JGT_IMM 3370 697157
0x27 MUL64_IMM 3375 250869
@terorie
terorie / ppc_opcodes.txt
Created Jun 10, 2022
A bunch of PowerPC opcodes
View ppc_opcodes.txt
add
addc
adde
addi
addic
addis
addme
addpcis
addze
and
View B6M8xp4PVMgVzbFXtcthHjE3Zkpjq7q8yhPHDRq3mSsR.asm
function_0:
exit
function_1:
mov64 r6, r1
call function_16705
mov64 r1, r6
call function_16258
exit
@terorie
terorie / writes.csv
Created Feb 26, 2022
Kafka write size breakdown for 10k Solana txns
View writes.csv
program txs data_size data_pct
9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin 738 82565664 0.823
Vote111111111111111111111111111111111111111 2241 8361171 0.083
mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68 155 3316696 0.033
cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ 4 3205916 0.032
FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH 380 1258560 0.013
SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f 554 659660 0.007
ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD 34 276886 0.003
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA 1017 164319 0.002
Sysvar1111111111111111111111111111111111111 24 144192 0.001
@terorie
terorie / bls12-381-tss.md
Created Nov 17, 2021
BLS12-381 threshold signature aggregation
View bls12-381-tss.md

BLS12-381 threshold signature scheme in Go using "trusted" key generation.

Based on cryptography libraries from https://github.com/drand

Output:

Private key:            19ff5b84b3e983e022d9f189a8832ddeb638fb7242c2d1e6c01bfe6afc6f9354
Public key:             87182d07e893944771b9eb443bb43548b060606143587f2e104a9de56a4831848b83deb4ad553cabcbec90ed0adbca91
Message:                Hello Obol
------------------------
@terorie
terorie / !ppc750cl_bit_patterns.md
Last active Aug 14, 2021
PowerPC 750CL instruction bit patterns
View !ppc750cl_bit_patterns.md

PowerPC 750CL instruction bit patterns

The following listing describes the static bit pattern of each opcode.

patterns.txt

Syntax:

line: opcode <pattern>...
pattern: start,stop,value
@terorie
terorie / ceph-cluster.yaml
Created Nov 9, 2020
Rook v1.4 Ceph v14.2.13 OSD Resize Bug report
View ceph-cluster.yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
cephVersion:
# For the latest ceph images, see https://hub.docker.com/r/ceph/ceph/tags
image: ceph/ceph:v14.2
dataDirHostPath: /var/lib/rook
@terorie
terorie / k8s_decode_secret.py
Created Oct 21, 2020
Python script to convert a Kubernetes secret file containing base64-encoded "data" entries to plain text "stringData" entries.
View k8s_decode_secret.py
#!/usr/bin/env python3
from base64 import b64decode
import os
import sys
import yaml
if os.isatty(sys.stdin.fileno()):
print("Usage: ./decode_secret.py < secret.yaml", file=sys.stderr)
sys.exit(1)
@terorie
terorie / _RMCP01_SYMBOLS.md
Last active Jan 7, 2021
Mario Kart Wii RMCP01 symbols [2020-10-15]
View _RMCP01_SYMBOLS.md

My crude attempt at mapping out the symbols in Mario Kart Wii PAL (RMCP01). These symbols are not cleaned up yet and contain dupes.

  • Minimum function size: 24 bytes
  • Search space: 0x80000000..0x8088F400
  • Matches: 1343 (RVL) + 773 (NW4R) + 738 (RevoEX) + 651 (RVLDWC)
  • Unique addresses: 1178 (RVL) + 447 (NW4R) + 651 (RevoEX) + 624 (RVLDWC)