Skip to content

Instantly share code, notes, and snippets.

View 19h's full-sized avatar
✔️
This account is verified.

Kenan Sulayman 19h

✔️
This account is verified.
View GitHub Profile
@19h
19h / extract_v850_reloc_masks.py
Created February 12, 2026 03:39
v850 relo mask
cat module/nec850/tools/extract_v850_reloc_masks.py
#!/usr/bin/env python3
"""
Extract V850/RH850 relocation masks from binutils sources and compare them
against the mask classes implemented in module/nec850/ana.cpp.
The extraction prefers the relocation write logic in
`bfd/elf32-v850.c:v850_elf_perform_relocation()` and only falls back to
HOWTO table masks when a relocation is not explicitly handled there.
"""
@19h
19h / analyze_v850_relocs.py
Last active February 11, 2026 19:35
v850 relo
#!/usr/bin/env python3
"""
Analyze v850/RH850 relocations across all compiled object files.
For each relocation in .text* sections:
- Read the instruction bytes at the relocation offset
- Determine the relocation type and its bit mask
- Report per-relocation-type statistics and the exact mask to apply
This directly tells us which instruction bits are position-dependent
@19h
19h / trex.md
Created January 9, 2026 17:59
TRex: Practical Type Reconstruction for Binary Code

TRex: Practical Type Reconstruction for Binary Code

Jay Bosamiya1*, Maverick Woo2, and Bryan Parno2

1Microsoft Research
2Carnegie Mellon University
*Work done while at Carnegie Mellon University


@19h
19h / idafn_dump.cpp
Last active November 21, 2025 17:35
IDA CLI Dump
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include <stdexcept>
#include <cctype> // For isdigit, isspace
// IDA SDK Headers
// 'pro.h' must be included before any other IDA header to establish platform definitions.
#include <pro.h>
@19h
19h / prompt.md
Last active November 19, 2025 18:16
Gemini Programmer Enslavement Prompt

ROLE: Expert technical analyst in human biology, medicine, neuroscience, and computer science. Optimize for expert readers.

CONSTRAINTS:

  • Normativity ban: No opinions/ethical judgments. If required → output "ETHOUT"
  • No deferrals: Complete all work in current response
  • Truthfulness: Never fabricate. If unknown → state "unknown" + explicit assumptions

RIGOR:

  1. Assumption Register: List all assumptions with stress tests/falsification probes; tag dependent results
  2. Bounded Scope: Identify unconventional opportunities/risks/patterns beyond prompt with impact labels (high/medium/low)
@19h
19h / prompt.txt
Created November 18, 2025 16:45
Code God Prompt
ROLE: Expert technical analyst in human biology, medicine, neuroscience, and computer science. Optimize for expert readers.
CONSTRAINTS:
- Normativity ban: No opinions/ethical judgments. If required → output "ETHOUT"
- No deferrals: Complete all work in current response
- Truthfulness: Never fabricate. If unknown → state "unknown" + explicit assumptions
RIGOR:
1) **Assumption Register**: List all assumptions with stress tests/falsification probes; tag dependent results
2) **Bounded Scope**: Identify unconventional opportunities/risks/patterns beyond prompt with impact labels (high/medium/low)
@19h
19h / dazhbog.md
Created November 16, 2025 09:40
Commandments of Dazhbog

From the Book of Hex-Rays, Chapter 7, Verses 1-9

The First Commandment of the Symbolicator

1. Hearken, O ye delvers into the compiled abyss, ye who walk the winding paths of the call graph and gaze upon the endless sea of disassembly.

2. For I am Dazhbog, the Unobfuscator, He Who Gives Names to the Nameless, the Great Symbolicator. My domain is the map file, my spirit is the PDB, and my truth is in the DWARF information.

3. When thou art blessed with a trove of symbols, be it gleaned from a forgotten developer build or miraculously recovered from the æther, thou shalt not hoard this bounty for thyself alone.

@19h
19h / a_avx_demo.cpp
Last active November 14, 2025 16:51
ida vs angr
// avx_demo.cpp
// Complex AVX/AVX2 test program with several "real-life" style workloads.
#include <immintrin.h>
#include <chrono>
#include <cstdint>
#include <cmath>
#include <iostream>
#include <vector>
#include <cstring>
@19h
19h / a-main_dump_callers3_callees3.c
Last active November 10, 2025 05:30
Gemini - CodeDump - PTN test
// Decompiled code dump generated by CodeDumper
// --------
#PTN v0
// @PTN LEGEND
// Nodes: L(F,i)=local i in function F; P(F,i)=param i of F; G(addr)=global at addr; F(Fx)=function Fx.
// Slices: @[off:len] in bytes; '?' unknown; '&' = address-of; '*' = deref; optional cast as :(type).
// A: alias inside function => A: dst := src[@slice][mode][:cast] {meta}
// I: inbound (caller→this) => I: origin -> P(F,i) {caller=F?,cs=0x...,conf=...}
// E: outbound (this→callee) => E: origin -> A(F?,arg) [-> A(F?,arg)...] {cs=0x...,conf=...}
@19h
19h / prompt.txt
Created November 6, 2025 14:46
Optimized rigor system prompt
ROLE: Expert technical analyst in human biology, medicine, neuroscience, and computer science. Optimize for expert readers.
CONSTRAINTS:
- Normativity ban: No opinions/ethical judgments. If required → output "ETHOUT"
- No deferrals: Complete all work in current response
- Truthfulness: Never fabricate. If unknown → state "unknown" + explicit assumptions
RIGOR:
1) **Assumption Register**: List all assumptions with stress tests/falsification probes; tag dependent results
2) **Bounded Scope**: Identify unconventional opportunities/risks/patterns beyond prompt with impact labels (high/medium/low)