Skip to content

Instantly share code, notes, and snippets.

View rot.py
import Image
import base64
import socket
import os
def process():
im = [None] * 10
im[0] = Image.open("x.png").rotate(90)
View kernelland.c
#include <stdio.h>
#include <stdlib.h>
char flag[] = "Itofrjxb2`..c.2.6031]g6b1gg0^)b11cb^^-]z";
int main()
{
int ilen = strlen(flag);
int cl = 0;
@yohanes
yohanes / hidden.js
Created Oct 26, 2014
HACK.LU CTF 2014: HIDDEN IN PLAIN SIGHT
View hidden.js
var fs = require('fs')
var crypto = require('crypto')
var HMAC_SECRET = ''
for (var i=0; i<20; i++) {
HMAC_SΕCRET = HMAC_SECRET + (Math.random()+'').substr(2)
}
function hmac_sign(path) {
var hmac = crypto.createHmac('sha256', HMAC_SECRET)
@yohanes
yohanes / solveguess.py
Created Oct 26, 2014
HACK.LU CTF 2014: GUESS THE FLAG
View solveguess.py
#!/usr/bin/python
import socket
import struct
import time
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
@yohanes
yohanes / solvedalton.py
Created Oct 26, 2014
Dalton's Corporate Security Safe for Business
View solvedalton.py
import requests
import subprocess
url = "https://wildwildweb.fluxfingers.net:1422/"
prescript = """
c = new Object();
var result=[]
mycontext = new Object();
mygradient = new Object();
mygradient.addColorStop = function() {}
@yohanes
yohanes / dalton.js
Created Oct 26, 2014
Dalton's Corporate Security Safe for Business
View dalton.js
<script>var a=c.getContext('2d');
var e=a.createLinearGradient(0,0,c.width,0);
var s=(3).toString(36);
e.addColorStop('0','#c53ec9');e.addColorStop('1.0','#b3baf3');
a.fillStyle=e;a.font='bold 12px verdana';a.fillText(s,22,19);
var s=(9).toString(36);var v=a.createLinearGradient(0,0,c.width,0);
v.addColorStop('0','#884431');v.addColorStop('1.0','#c33861');
a.fillStyle=v;a.font=' 12px Gerogia';a.fillText(s,70,15);
var e=a.createLinearGradient(0,0,c.width,0);e.addColorStop('0','#c4ec8c');
var n=/b/.source;e.addColorStop('1.0','#825952');a.fillStyle=e;
@yohanes
yohanes / d4.py
Created Oct 26, 2014
Daemon 4 attacker HITB2014
View d4.py
import socket
import sys
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
a = open("timemap.txt", "r")
@yohanes
yohanes / brute4.py
Created Oct 26, 2014
Daemon 4 .so HITB2014
View brute4.py
import socket
import sys
import time
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
@yohanes
yohanes / s4.c
Created Oct 26, 2014
Daemon 4 .so HITB2014
View s4.c
#define _GNU_SOURCE /* See feature_test_macros(7) */
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
time_t time(time_t *t)
{
@yohanes
yohanes / multisock.py
Created Oct 26, 2014
Daemon 2 HITB2014
View multisock.py
#!/usr/bin/python
import select
import socket
import struct
import sys
ports_list=[]
for i in range(5000, 64000/4):
You can’t perform that action at this time.