Skip to content

Instantly share code, notes, and snippets.

@doegox
doegox / set_interactive().py
Created March 15, 2009 16:25
Forces interactive mode with autocompletion
def set_interactive():
"""Forces interactive mode with autocompletion"""
print "<<< Autocompletion was turned on"
# Prepare autocompletion mode (rlcompleter is not used per se,.
# just for initialisation but that's the way it works)
import rlcompleter, readline
readline.parse_and_bind('tab: complete')
# Force interactive mode
os.environ['PYTHONINSPECT'] = '1'
@doegox
doegox / debug().py
Created March 15, 2009 16:26
Forces jump to PDB prompt
def debug():
"""Forces jump to PDB prompt"""
print "<<< You are in the PDB debugger."
import pdb
pdb.set_trace()
@doegox
doegox / keybase.md
Created August 6, 2016 14:02
Keybase proof

Keybase proof

I hereby claim:

  • I am doegox on github.
  • I am doegox (https://keybase.io/doegox) on keybase.
  • I have a public key ASBy2tVJN_uwAZ0JQ7eUsLqzCH_qUpKIVo1Jll0Lc2J_cwo

To claim this, I am signing this object:

@doegox
doegox / simplepdf_mount_tmp_and_attack.sh
Created October 20, 2016 21:07
Hack.lu 2016 simplepdf write-up
#!/bin/bash
mkdir -p tmp
mount|grep -q $(pwd)/tmp || sudo mount -t tmpfs -o mode=01777,size=200m tmpfs tmp
cp simplepdf*.pdf tmp/0.pdf
cd tmp
for ((i=0;i<11000;i++)); do
qpdf --show-object=6 --filtered-stream-data $i.pdf > $(($i+1)).pdf
file $(($i+1)).pdf|grep PDF||break
rm $i.pdf
@doegox
doegox / gh16_stego200.py
Last active November 23, 2016 15:20
GreHack 2016 CTF Daytonaaaaaaaaaa!!!!! write-up
#!/usr/bin/env python3
import struct
import zlib
# Daytonaaaaaaaaaa!!!!!
# by iggy
# 200 points
#
# Never look down and go ahead !
@doegox
doegox / st_srx.c
Created August 31, 2017 23:37
LIBNFC: Quick start example that presents how to discover a ST SRx tag
/**
* @file st_srx.c
* @brief Quick start example that presents how to discover a ST SRx tag
*/
// To compile this simple example:
// $ gcc -o st_srx st_srx.c -lnfc
#include <stdlib.h>
#include <nfc/nfc.h>
@doegox
doegox / RPi3_readonly.sh
Created September 11, 2017 00:10
Commands to make a RPi3 read-only
# From https://hallard.me/raspberry-pi-read-only/
# DON'T APPLY IT BLINDLY! USE IT AS A GUIDE
apt-get install -y busybox-syslogd; dpkg --purge rsyslog
sed -i 's/rootwait/rootwait fastboot noswap ro/' /boot/cmdline.txt
rm -rf /var/lib/dhcp/ /var/run /var/spool /var/lock /etc/resolv.conf
ln -s /tmp /var/lib/dhcp
ln -s /tmp /var/run
ln -s /tmp /var/spool
ln -s /tmp /var/lock
@doegox
doegox / notmydigest.cpp
Created October 20, 2017 19:08
Write-up of the Hack.lu 2017 CTF challenge "Not My Digest"
/*
MIT License
Copyright (c) 2017:
Marc Stevens
Cryptology Group
Centrum Wiskunde & Informatica
P.O. Box 94079, 1090 GB Amsterdam, Netherlands
marc@marc-stevens.nl
@doegox
doegox / troopers2019_img2badge.py
Last active April 16, 2019 04:18
Image to badge shitty script, with script helper for uploading it directly on the badge via USB
#!/usr/bin/env python3
# TROOPERS2019
# @doegox
# The script will resize the image and convert it to BW image if needed but
# I would advise to do it yourself first with e.g. Gimp for a better control
# of the aspect ration and the BW threshold.
# Target: 296x128, black & white (no grey)
# Shall we display the result locally?
@doegox
doegox / test-flash.sh
Last active August 1, 2019 09:19
Testing script for Proxmark3 RDV4 external flash
#!/bin/bash
for ((i=0; i<100; i++)); do
echo -e "\n\nIteration $i"
rm -f test_flash_in.bin test_flash_out.bin
dd if=/dev/urandom of=test_flash_in.bin bs=65536 count=3
./proxmark3.sh -c "
mem wipe p 0;
mem wipe p 1;
mem wipe p 2;