Skip to content

Instantly share code, notes, and snippets.

@trufae
trufae / netstat.c
Last active August 29, 2015 14:25
Android Riskware
$ adb shell netstat
Proto R S Local Address Foreign Address State
tcp6 0 0 ::ffff:10.171.225.120:55648 ::ffff:74.125.133.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:10.171.225.120:34181 ::ffff:221.130.183.16:80 CLOSE_WAIT
tcp6 0 0 ::ffff:10.171.225.120:58042 ::ffff:69.28.57.164:10086 ESTABLISHED
tcp6 0 0 ::ffff:10.171.225.120:56774 ::ffff:108.168.176.241:5222 TIME_WAIT
@trufae
trufae / gist:b92c18d368e23fa4bc81
Created November 13, 2015 08:41
Python R2Pipe Debugger Example
import r2pipe
r2=r2pipe.open("/bin/ls", False, False, True)
for a in range(1,10):
print r2.cmdj("drj")
r2.cmd("ds")
import r2pipe
import asyncdispatch
proc test {.async.} =
let r2p = R2PipeHttp(url: "http://cloud.radare.org")
let res = await r2p.cmd("?V")
echo(res);
waitFor test();
@trufae
trufae / sailtermux.sh
Created April 17, 2017 09:45
Termux support for SailfishOS (tested on Xiaomi/Lineage based distro)
#!/bin/sh
R=/data/data/com.termux/files/usr
A=`uname -m`
echo "> Termux for SailfishOS..."
if [ ! -f bootstrap-$A.zip ]; then
echo "> Downloading Termux bootstrap for $A..."
curl -o bootstrap-$A.zip https://termux.net/bootstrap/bootstrap-$A.zip
Hi,
Please find the latest report on new defect(s) introduced to radare2 found with Coverity Scan.
20 new defect(s) introduced to radare2 found with Coverity Scan.
8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 20 defect(s)
@trufae
trufae / frida-launchd-spawn.js
Created May 1, 2017 12:08
launchd posix spawn hookimg
const readString = Memory.readUtf8String;
var readU32 = Memory.readU32;
var pid = ptr(0);
const SIGSTOP = 17;
const kill = new NativeFunction(
Module.findExportByName(null, 'kill'),
'int', [
'int',
$ RUST_BACKTRACE=1 ./servonk run glutin
../../target/debug/servo --resources-path /Users/pancake/prg/servonk/platform/glutin/support/scripts/../../../shared/resources --resolution 720x1280 --user-agent Mozilla/5.0 (Mobile; rv:60.0) Servo/1.0 Firefox/60.0 -M http://localhost:8000/system/index.html
assertion failed: mach_sys::mach_port_mod_refs(mach_task_self(), self.port,
MACH_PORT_RIGHT_SEND, 1) == KERN_SUCCESS (thread Constellation, at /Users/pancake/.cargo/registry/src/github.com-1ecc6299db9ec823/ipc-channel-0.10.0/src/platform/macos/mod.rs:336)
stack backtrace:
0: 0x1079cc474 - backtrace::backtrace::trace::hf902894808ae4113
at /Users/pancake/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.6/src/backtrace/mod.rs:42
1: 0x1079c612c - backtrace::capture::Backtrace::new_unresolved::h28613d9797601b68
at /Users/pancake/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.6/src/capture.rs:88
2
@trufae
trufae / r2debugdata.py
Created April 7, 2021 20:23
script to load symbols from .gnu_debugdata section into r2
#!/usr/bin/env python
#
# Script to parse the .gnu_debugdata section of ELF binaries
# Usage:
# $ r2 -i debugdata.py bd64
# The script can be also executed from the r2 shell
# $ . debugdata.py
#
import r2pipe
@trufae
trufae / asm.v
Last active August 15, 2021 20:05
Assembler proposal for the V compiler
module main
import os
import encoding.hex
struct AsmLabel {
name string
off int
}
if [ -f ~/.vim/autoload/plug.vim ]; then
echo "fzf-vim already installed."
else
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cat >> ~/.vimrc <<EOF
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
call plug#end()
command! -bang -nargs=* GGrep