Loading...
Loading...
Reverse engineers shipped software with bounded local CLI inspection. Covers PE headers, Electron archives, custom binary formats, SQLite databases, and JavaScript bundles while separating observed evidence from inference.
npx skill4agent add affaan-m/ecc leanrea.asar.exe.dlluv run --with <package> pythonnpxwgpuegui$env:TEMP\re\<target_name>$TMPDIR/re/<target_name>rg -arg -uurg -arg -uu# Extract 150 characters of context around matching patterns
rg -uu -o '.{0,150}KEYWORD.{0,150}' <file> | head -n 20game.exe:0x0041a020.exe.dllrg -a -o '[A-Za-z0-9_\-\.]{5,}' target.exe | rg -i "config|api|secret|license" | Select-Object -First 50uvpefileuv run --with pefile python -c "import pefile; pe = pefile.PE('target.exe'); print([(s.Name.decode().strip(), hex(s.VirtualAddress), s.SizeOfRawData) for s in pe.sections])"analyzeHeadless "$env:TEMP\ghidra_proj" TempProj -import target.exe -noanalysis -readOnly# parse_header.py
import os
import struct
import sys
with open(sys.argv[1], "rb") as source:
header = source.read(12)
if len(header) != 12:
raise ValueError("truncated header")
magic, version, count = struct.unpack("<4sII", header)
if count > (os.fstat(source.fileno()).st_size - 12) // 8:
raise ValueError("record count exceeds file bounds")
print(f"Magic: {magic}, Version: {version}, Entries: {count}")uv run python parse_header.py sample.binfn parse_header(bytes: &[u8]) -> Result<([u8; 4], u32, u32), &'static str> {
let header = bytes.get(..12).ok_or("truncated header")?;
let magic = header[..4].try_into().map_err(|_| "invalid magic")?;
let version = u32::from_le_bytes(header[4..8].try_into().map_err(|_| "invalid version")?);
let count = u32::from_le_bytes(header[8..12].try_into().map_err(|_| "invalid count")?);
if u64::from(count) > ((bytes.len() - 12) / 8) as u64 {
return Err("record count exceeds file bounds");
}
Ok((magic, version, count))
}app.asar$target = "app.asar"; $out = "$env:TEMP\re\asar"
bunx @electron/asar extract $target $out
Get-Content "$out\package.json" | Select-String "name|version|main"rg -uu -o --glob '!node_modules' '.{0,150}(ipcMain\.(handle|on)|ipcRenderer\.(invoke|send)).{0,150}' $out | head -20.db.sqlitesqlite3 -readonly data.db ".schema"
sqlite3 -readonly data.db "SELECT name, sql FROM sqlite_master WHERE type='table';"bunx prettierbunx prettier --parser babel bundle.js > bundle.pretty.js
rg -n "function\s+[a-zA-Z0-9_]+\s*\(" bundle.pretty.js | head -n 30| Target | Preferred Fast CLI Tool | Quality & Safety Contract |
|---|---|---|
| PE / Native Binary | | Isolate to |
| Python Helpers | | Use the project runner and formatter; declare temporary dependencies explicitly. |
| Custom Binary Formats | Project Python runner; optional Rust port | Explicit byte order, checked lengths and offsets; no unchecked buffer casts. |
| Reimplementation | Existing project stack; Rust is optional | Preserve behavior and compatibility; measure performance before changing architecture. |
| Rendering | Existing graphics API; | Verify required platforms and backend behavior before selecting an API. |
Electron ( | | Extract to temp copy; scan IPC contracts with |
| SQLite Databases | | Read-only copied database; no guarantee of lock-free access to live files. |