Skip to content

Instantly share code, notes, and snippets.

@riptl
riptl / xcoff64.pat
Created February 1, 2023 09:57
imHex pattern for XCOFF64
#include <std/mem.pat>
#include <std/io.pat>
struct filehdr {
be u16 f_magic; /* Magic number */
be u16 f_nscns; /* Number of Sections */
be u32 f_timdat; /* Time & date stamp */
be u64 f_symptr; /* File pointer to Symbol Table */
be u16 f_opthdr; /* sizeof (Optional Header) */
be u16 f_flags; /* Flags */
@riptl
riptl / r2deb_update.md
Created January 24, 2023 01:53
Radare2 update instructions

Some notes on how to maintain the radare2 Debian package.

The Debian package source is at https://salsa.debian.org/pkg-security-team/radare2 You'll need a salsa.debian.org account to propose changes.

The following branches are of interest:

  • upstream: Contains a copy of the Git repo
  • debian/master: Contains a Debianized copy of the Git repo
  • pristine-tar: Contains source tarballs
  • pristine-lfs: Contains the latest source tarball as LFS
@riptl
riptl / npm-audit.txt
Created August 13, 2022 16:18
Vulnerabilities in web3.js 1.7.5
# 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
@riptl
riptl / opcode_stats_139240745.csv
Last active July 7, 2022 16:21
SBF opcodes Solana mainnet slot 139240745
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
@riptl
riptl / ppc_opcodes.txt
Created June 10, 2022 16:19
A bunch of PowerPC opcodes
add
addc
adde
addi
addic
addis
addme
addpcis
addze
and
function_0:
exit
function_1:
mov64 r6, r1
call function_16705
mov64 r1, r6
call function_16258
exit
@riptl
riptl / writes.csv
Created February 26, 2022 23:28
Kafka write size breakdown for 10k Solana txns
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
@riptl
riptl / bls12-381-tss.md
Created November 17, 2021 00:30
BLS12-381 threshold signature aggregation

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
------------------------
@riptl
riptl / !ppc750cl_bit_patterns.md
Last active August 14, 2021 04:10
PowerPC 750CL instruction bit patterns

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
@riptl
riptl / ceph-cluster.yaml
Created November 9, 2020 12:41
Rook v1.4 Ceph v14.2.13 OSD Resize Bug report
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