Skip to content

Instantly share code, notes, and snippets.

View stefan2904's full-sized avatar
🚲
¯\_(ツ)_/¯

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@stefan2904
stefan2904 / OpenPGP_CFB_demo.java
Created September 12, 2014 18:34
things are strange sometimes.
package iaik.pgp.demos;
import iaik.pgp.exceptions.PGPException;
import iaik.pgp.utils.HexConverter;
import iaik.security.provider.IAIK;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
% gpg --gen-revoke 29743D54EDCBB855 > revocation.asc
sec 1024R/29743D54EDCBB855 2014-11-10 JavaPrivacyGuard <crypto+jpg12@2904.cc>
Create a revocation certificate for this key? (y/N) y
Please select the reason for the revocation:
0 = No reason specified
1 = Key has been compromised
2 = Key is superseded
3 = Key is no longer used
@stefan2904
stefan2904 / getVideoTitle_short.py
Created May 9, 2015 02:12
Get the title of a YoutTube video by it's video ID
from urlparse import urlparse, parse_qs
import urllib2
videoid = "bMSTtWtzV-A"
title = parse_qs(urlparse("/?" + urllib2.urlopen("http://youtube.com/get_video_info?video_id=" + videoid).read()).query)['title']
print title
@stefan2904
stefan2904 / getVideoTitle.py
Created May 9, 2015 02:13
Get the title of a YoutTube video by it's video ID
from urlparse import urlparse, parse_qs
import urllib2
videoid = "bMSTtWtzV-A"
response = urllib2.urlopen("http://youtube.com/get_video_info?video_id=" + videoid)
query = urlparse("/?" + response.read()).query
title = parse_qs(query)['title']
@stefan2904
stefan2904 / DefConCTF_blackbox.txt
Last active August 29, 2015 14:21
zippy in box 3 ?
% python attack_blackbox3.py
[*] ####################################################################
[*] ######## first box
[+] Opening connection to blackbox_ced7f267475a0299446fa86c26d77161.quals.shallweplayaga.me on port 18324: Done
[DEBUG] Received 0x19 bytes:
'You need to open the box!'
[DEBUG] Received 0xb2 bytes:
'\n'
@stefan2904
stefan2904 / blackbox.py
Created May 18, 2015 00:25 — forked from anonymous/blackbox
via IRC
import socket
import random
host = "blackbox_ced7f267475a0299446fa86c26d77161.quals.shallweplayaga.me"
port = 18324
inputs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ "
s = socket.socket()
s.connect((host, port))
@stefan2904
stefan2904 / spaceApiClient.py
Created May 22, 2015 23:28
get realraum's space-api status
import json, requests
resp = requests.get(url="http://realraum.at/status.json")
data = json.loads(resp.text)
print data['state']['message']
print data['state']['lastchange']
@stefan2904
stefan2904 / ddt.ipynb
Last active August 29, 2015 14:22
T8.1 Differential Distribution Table, Notebook: http://nbviewer.ipython.org/gist/stefan2904/80e0b2b4bc9bc7c08bc9
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stefan2904
stefan2904 / itseclicense.cpp
Created June 5, 2015 21:48
IT-SECURITY LICENSE
/****************************************************************************
**
** Copyright (C) 2015 Graz University of Technology
**
** Contact: Erich.Wenger@iaik.tugraz.at
**
** IT-SECURITY LICENSE
** Version 1.0, 12th of March 2015
**
** This framework may only be used within the IT-Security exercises 2015.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.