Skip to content

Instantly share code, notes, and snippets.

@h3xstream
h3xstream / bh2014_nike.py
Created August 11, 2014 20:42
Black Hat 2014: Nike T-shirt
from binascii import hexlify,unhexlify
data = int('0b01001010 01110101 01110011 01110100 00100000 01000100 01101111 00100000 01001001 01110100'.replace(" ",""),2)
print unhexlify("%x" % data)
@h3xstream
h3xstream / >> output result
Last active September 3, 2015 20:27
Type erasure
> javac *.java
> javap -c StringBuilderProcessor
Compiled from "StringBuilderProcessor.java"
public class StringBuilderProcessor implements GenericProcessor<java.lang.StringBuilder> {
public StringBuilderProcessor();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
@h3xstream
h3xstream / defcon.spin
Last active October 7, 2015 22:08
Playing with Parallax controller - Defcon 2012 badge (Modification of http://pastebin.com/raw.php?i=XVQ4yKkG)
VAR
byte count
byte A[10]
byte B[10]
byte C[10]
byte D[10]
byte E[10]
byte F[10]
byte G[10]
@h3xstream
h3xstream / folder.py
Created October 21, 2012 23:18
Rename album cover to "folder.jpg"
#!/usr/bin/python
"""
Small script to rename image in folder to 'folder.jpg' to comply with XBMC default filename for music album.
Usage :
python folder.py /home/h3xstream/Music/
"""
import os
import sys
@h3xstream
h3xstream / groupes-montreal.md
Last active December 19, 2015 03:58
Liste de groupes utilisateurs à Montréal
@h3xstream
h3xstream / smartcard.md
Last active December 24, 2015 16:19
References for JavaCard and SmartCard standards.
@h3xstream
h3xstream / install.md
Last active December 25, 2015 06:49
Instructions pour installer des applets sur la carte du NorthSec

Here are the Card Manager Keys used for the cards we gave during the competition, so that you can load/delete applets on the card :

MAC_KEY : 20B2734C890D9F043208810E063B25D6
ENC_KEY : 1A1C5481DDF4A91D5AD25352846EFDF1
KEK_KEY : 065F678AC7C5EB46BC0DEA1ECCF1F03C

Make sure you use -keyver 1 and delete the previous applets as follows :

@h3xstream
h3xstream / file_watch.groovy
Created October 16, 2013 22:02
Simple script that monitor a directory and search for a specific keyword. (Java NIO simple test..)
import java.nio.file.FileSystems
import java.nio.file.Path
import java.nio.file.Paths
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey
import java.nio.file.WatchService;
class FileEvent {
String kind
@h3xstream
h3xstream / session_fixation.js
Last active December 26, 2015 16:09
Session fixation detector (test script for OWASP ZAP)
importPackage(org.parosproxy.paros.extension.history); //ExtensionHistory
importPackage(org.parosproxy.paros.control); //Control
extHist = Control.getSingleton().getExtensionLoader().getExtension(ExtensionHistory.NAME)
if (extHist == null) {
println("ExtensionHistory not found.")
exit;
}
// Loop through the history table, printing out the history id and the URL