This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - requires git, svn, hg installed | |
# - will just build the bleeding edge of everything | |
export PREFIX=`pwd` | |
export PATH=$PATH:$PREFIX/bin/ | |
export SRCDIR=$PREFIX/src/ | |
# todo test if SRCDIR exists, then get the source | |
mkdir -p $SRCDIR | |
# get binutils/gdb, gmp, mpfr, mpc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - requires git, svn, hg installed | |
# - will just build the bleeding edge of everything | |
export PREFIX=`pwd` | |
export PATH=$PATH:$PREFIX/bin/ | |
export SRCDIR=$PREFIX/src/ | |
# todo test if SRCDIR exists, then get the source | |
mkdir -p $SRCDIR | |
# get binutils/gdb, gmp, mpfr, mpc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from BSecure import * | |
from Crypto.Hash import MD5 | |
from Crypto.Cipher import AES | |
from multiprocessing import Pool, cpu_count | |
p_check = MD5.new() | |
p_check.update(hex(Rx)[2:-1]) | |
print "Px == MD5(Rx): %s" % (p_check.hexdigest() == hex(Px)[2:-1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size_t offset = 8; | |
while(offset--){ | |
uint16_t word = _mm_movemask_epi8((__m128i) value); | |
for(int8_t index = offset; index < 128; index += 8){ | |
if(word & 1){ | |
// index was set | |
} | |
word >>= 1; | |
} | |
value <<= 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
lines = open(sys.argv[1]).readlines() | |
double_if=False | |
print "#include <avr/io.h>" | |
print ".global encrypt" | |
print ".global decrypt" | |
for line in lines: | |
if '.endmacro' in line: | |
line = line.replace("endmacro", "endm") | |
if '.db' in line: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import struct | |
from Crypto.Cipher import AES | |
# reduce 2^48 to 2^27-ish using time-memory tradeoff | |
def crack(plaintext1, ciphertext1, plaintext2, ciphertext2): | |
print "Cracking plaintext '%s'" % plaintext1 | |
zeroes = "\x00"*29 | |
for table in range(0,7): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
unsigned int outputs[7][4] = { | |
{0x7358837a, 0x6e1b2658, 0x3c00c5ff, 0x8c0d4aa}, | |
{0x34d8c3b5, 0x5b56dca1, 0x78236d7, 0x1973085e}, | |
{0x1f49456c, 0x27c0fa1d, 0x145214aa, 0x6200299c}, | |
{0x1fea6614, 0x41cdb864, 0x53c0ed56, 0x63642916}, | |
{0x4e81abc7, 0x792ce075, 0x7d2bc59c, 0x42a11ada}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageFont, ImageDraw | |
import sys | |
# Prettify ascii into a TTF rendered ascii art banner | |
if not len(sys.argv) > 1: | |
print "Supply string to render" | |
sys.exit() | |
if not len(sys.argv) > 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some bash aliases for working with shellcode. i386-specific, no configuration etc. | |
# Probably of no use to professionals :) | |
# Thanks for the help, friends! | |
# outputs C array of shellcode from .s file, using s-proc (http://www.safemode.org/files/zillion/shellcode/tools/s-proc.c) | |
function tocshellcode() { gcc -m32 "$@" -o tmp.elf -nostartfiles -nostdlib ; objcopy -O binary -j .text tmp.elf tmp.bin ; s-proc -p tmp.bin ; rm tmp.bin; rm tmp.elf; } | |
# Morphs the tocshellcode into a single string | |
function toshellcode() { echo `tocshellcode "$@" | tail -n+4 | tr -d '\n' | tr -d '\t' | tr -d '"' | tr -d ';'`; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Edit the following properties to your own taste: | |
# NOTE: DIRECTORY PATHS MUST BE ABSOLUTE | |
DEVKITPRO_PATH=$HOME'/.dev/devkitpro' | |
LIBNDS_PATH=$DEVKITPRO_PATH'/libnds' | |
DEFAULT_ARM7_PATH=$LIBNDS_PATH | |
LIBNDS_EX_PATH=$LIBNDS_PATH'/examples' | |
NOCASHGBA_PATH="$DEVKITPRO_PATH/nocashgba" | |
NOCASHGBA_PATH_PRINT="\$DEVKITPRO/nocashgba" |
NewerOlder