Skip to content

Instantly share code, notes, and snippets.

@yohanes
yohanes / solvedalton.py
Created October 26, 2014 11:55
Dalton's Corporate Security Safe for Business
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 / solveguess.py
Created October 26, 2014 11:57
HACK.LU CTF 2014: GUESS THE FLAG
#!/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 / hidden.js
Created October 26, 2014 12:09
HACK.LU CTF 2014: HIDDEN IN PLAIN SIGHT
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 / kernelland.c
Created October 26, 2014 12:13
pwnium2014
#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 / rot.py
Created October 26, 2014 12:34
pwnium2014
import Image
import base64
import socket
import os
def process():
im = [None] * 10
im[0] = Image.open("x.png").rotate(90)
@yohanes
yohanes / altered.c
Created October 26, 2014 12:38
Pwnium.c
#include <ctype.h>
#include <string.h>
#include <stdio.h>
char secret_code[] = "b!Lr}C%R}qSQFG";
void alter_digit(char *s)
{
for (int i = 0; i < strlen(s); ++i)
{
#include <ctype.h>
#include <string.h>
#include <stdio.h>
char secret_code[] = "B1lR]c5r]Qsqfg";
void alter_digit(char *s)
{
for (int i = 0; i < strlen(s); ++i)
{
@yohanes
yohanes / jail1.js
Created October 26, 2014 13:11
Secuinside 2014
function (rand) {
function stage1() {
var a = Array.apply(null,
new Array(Math.floor(Math.random() * 20) + 10)).map(function () {return Math.random() * 0x10000;});
var b = rand(a.length);
if (!Array.isArray(b)) {
print("You're a cheater!");
return false;
% to run it: swipl -g 'conclusion' -t halt -q -s cheryl.pl
% http://www.straitstimes.com/news/singapore/education/story/primary-5-maths-question-goes-viral-stumps-adults-20150413
unique(A) :- aggregate_all(count, A, M), M==1.
birthday_list(15, may).
birthday_list(16, may).
birthday_list(19, may).
birthday_list(29, may).
@yohanes
yohanes / keybase.md
Created June 25, 2015 06:52
keybase.md

Keybase proof

I hereby claim:

  • I am yohanes on github.
  • I am yohanes (https://keybase.io/yohanes) on keybase.
  • I have a public key whose fingerprint is 1095 F8DF 6A46 17E1 693E AAE6 338A 94F8 AC75 B7E0

To claim this, I am signing this object: