Skip to content

Instantly share code, notes, and snippets.

@b1tninja
b1tninja / config.json
Last active September 25, 2022 15:42
trunk-recorder with BladeRF
{
"ver": 2,
"frequencyFormat": "mhz",
"logFile": true,
"sources": [
{
"center": 852000000,
"rate": 15000000,
"gainSettings": {
"system": 25,
@b1tninja
b1tninja / retpeek.c
Created November 5, 2020 17:46
peek last ret
int private(void) {
return 42;
}
void public(void) {
volatile int sec_ret;
sec_ret = private();
// Do not return sec_ret!!1one.
}
@b1tninja
b1tninja / PKGBUILD
Last active November 9, 2019 23:16
gcc-python-plugin
# Maintainer: Nicolas Iooss (nicolas <dot> iooss <at> m4x <dot> org)
# Contributor: Justin Capella (justin <dot> capella <at> gmail <dot> com)
pkgbase="gcc-python-plugin"
pkgname=('gcc-python-plugin-git' 'gcc-python-plugin-c-api' 'gcc-python-plugin-doc')
pkgver=v0.17.r6.g8276f91
pkgrel=1
pkgdesc="GCC plugin that embeds CPython inside the compiler"
arch=('i686' 'x86_64')
url='https://gcc-python-plugin.readthedocs.io/en/latest/'
@b1tninja
b1tninja / PKGBUILD
Last active October 30, 2019 18:23
FFT_eval-git
PACKAGER="Justin Capella <justincapella@gmail.com>"
pkgname="fft_eval-git"
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
arch=("x86_64")
depends=("sdl2" "sdl2_ttf")
optdepends=("ttf-liberation")
source=("${pkgname%-git}::git+https://github.com/simonwunderlich/FFT_eval.git")
pkgrel=1
pkgver=0.73
@b1tninja
b1tninja / kcrctab_le.sh
Last active October 22, 2019 10:30
kcrctab from /dev/mem
offsets=($(egrep "__kcrctab" /proc/kallsyms | cut -d " " -f 1 | sort -u));
for ((i=0; i<$((${#offsets[@]}-1)); i++)); do
start=$((0x${offsets[$i]}));
stop=$((0x${offsets[(($i+1))]}));
len=$(($stop-$start));
dd if=/dev/mem bs=${len} skip=${start} count=1 status=none;
done | od --endian little -t x4 -w4 -A
@b1tninja
b1tninja / nocache.patch
Created May 7, 2019 04:51
nocache.patch
commit 9519ee51ecd775e4beaf7625c79207e78df9e0d7
gpg: Signature made Mon 06 May 2019 09:50:33 PM PDT
gpg: using RSA key F6CC1F4DF325EACBBE2532481F299543498470BA
gpg: issuer "justincapella@gmail.com"
gpg: Good signature from "Justin Capella <justincapella@gmail.com>" [ultimate]
Author: Justin Capella <justincapella@gmail.com>
Date: Mon May 6 21:50:33 2019 -0700
opendir
@b1tninja
b1tninja / myspace.py
Created April 30, 2019 18:35
Selenium myspace scraper
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from pprint import pprint
from urllib.parse import urljoin
profiles = dict()
myspace_url = 'https://www.myspace.com/'
img_suffix = '600x600.jpg'
visited = set()
@b1tninja
b1tninja / perf.patch
Last active April 23, 2019 13:17
powertop segfault
commit 318dcc2daf1bf6f297eed022699c39354eab4699
gpg: Signature made Tue 23 Apr 2019 06:09:08 AM PDT
gpg: using RSA key F6CC1F4DF325EACBBE2532481F299543498470BA
gpg: issuer "justincapella@gmail.com"
gpg: Good signature from "Justin Capella <justincapella@gmail.com>" [ultimate]
Author: b1tninja <devnull@localhost>
Date: Tue Apr 23 06:09:08 2019 -0700
Check that perf event is properly allocated, combine constructor
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
#Wants=network-online.target
After=network-online.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
#FailureAction=reboot-force
OnFailure=systemd-reboot.service
OnFailureJobMode=ignore-dependencies
StartLimitBurst=3
commit dc95a771f0d6fab62b7fbccc7f859500134083ac
gpg: Signature made Wed 03 Apr 2019 03:01:58 AM PDT
gpg: using RSA key F6CC1F4DF325EACBBE2532481F299543498470BA
gpg: issuer "justincapella@gmail.com"
gpg: Good signature from "Justin Capella <justincapella@gmail.com>" [ultimate]
Author: b1tninja <devnull@localhost>
Date: Wed Apr 3 03:01:58 2019 -0700
New debian hostname