Skip to content

Instantly share code, notes, and snippets.

aczid / css transparency
Created Jan 23, 2009
Opacity settings for different browsers
View css transparency
opacity: 0.90; /* Safari, Opera */
-moz-opacity:0.90; /* FireFox */
filter: alpha(opacity=90); /* IE */
-khtml-opacity:.90; /* Old safari */
-ms-filter:”alpha(opacity=90)”; /* IE 8*/
aczid / gist:112457
Created May 15, 2009
Four ways to use find with rm
View gist:112457
rm `find . -name foo`
find . -name foo | xargs rm
find . -name foo -exec rm {} \;
for i in `find . -name foo`; do rm $i; done
aczid / Myspace profile table break (put this under bandmembers)
Created Aug 29, 2010
Myspace profile table break (no longer works)
View Myspace profile table break (put this under bandmembers)
.bigdiv {
width:1400x; height:2000px; overflow:hidden;
position: absolute; left:50%; top:0%;margin-top:120px; z-index:2; text-align:left;
aczid /
Created Feb 14, 2011, originally from updated on 2011-02-14
# Edit the following properties to your own taste:
aczid / shellcode_aliases
Created Oct 4, 2011
bash aliases for shellcoding
View shellcode_aliases
# 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 (
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 ';'`; }
aczid / gist:5703046
Last active Dec 18, 2015
Make quick & dirty ASCII art out of a hex string and TTF fonts - example at
View gist:5703046
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"
if not len(sys.argv) > 2:
aczid / gist:5745979
Created Jun 10, 2013
Simple bruteforcer for BostonKeyParty CTF level 'Randy'.
View gist:5745979
#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},
aczid / gist:5745983
Last active Dec 18, 2015
Bruteforcer for BostonKeyParty CTF level 'MITM'.
View gist:5745983
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):
aczid /
Last active Dec 28, 2015
A disgusting Python kludge to convert from Atmel to GNU assembly syntax. If you are reading this I'm sorry. Only here as a reference.
import sys
lines = open(sys.argv[1]).readlines()
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:
View iterate bits in 128-bit value
size_t offset = 8;
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;