Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
#!/usr/bin/env python | |
## Decodes NTLM "Authenticate" HTTP-Header blobs. | |
## Reads the raw blob from stdin; prints out the contained metadata. | |
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages. | |
## Based on the excellent protocol description from: | |
## <http://davenport.sourceforge.net/ntlm.html> | |
## with additional detail subsequently added from the official protocol spec: | |
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx> | |
## |
Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
<?php | |
highlight_file(__FILE__); | |
$dir = 'sandbox/' . $_SERVER['REMOTE_ADDR']; | |
if ( !file_exists($dir) ) | |
mkdir($dir); | |
chdir($dir); | |
$args = $_GET['args']; | |
for ( $i=0; $i<count($args); $i++ ){ |
<?php | |
/* | |
sqlpwn by orange | |
Don't brute force or you will be banned ! | |
*/ | |
session_start(); | |
error_reporting(0); | |
include "template.html"; |
<?php | |
include "config.php"; | |
mysql_connect($dbhost, $dbuser, $dbpass); | |
mysql_select_db($dbname); | |
function escape($str){ | |
$str = strtolower($str); | |
$str = str_replace("'", "", $str); | |
$str = str_replace("\\", "", $str); |
**Encrypting data** (*Was: AES-CTR with HMAC*): Use, in order of preference: (1) The Nacl/libsodium default, (2) Chacha20-Poly1305, or (3) AES-GCM. | |
*You care about this if: you're hiding information from users or the network.* | |
All three options get you "AEAD", which is the only way you want to encrypt in 2015. Options (2) and (3) are morally the same thing: a stream cipher with a polynomial ("thermonuclear CRC") MAC. Option (2) gets there with a native stream cipher and a MAC optimized for general purpose CPUs; Poly1305 is also easier than GCM for library designers to implement safely. Option (3)'s AES-GCM is the industry standard; it's fast and usually hardware accelerated on modern processors, but has implementation safety pitfalls on platforms that aren't accelerated. | |
*Avoid: AES-CBC, AES-CTR by itself, block ciphers with 64-bit blocks --- most especially Blowfish, which is inexplicably popular, OFB mode. Don't ever use RC4, which is comically broken.* | |
**Symmetric key length** (*Was: Use 256 bit keys* |
#!/usr/bin/env python | |
#coding=utf-8 | |
import web, settings | |
urls = ( | |
'/uploads/(.*)', 'download', | |
'([a-z0-9\/]*)', 'dispatcher' | |
) | |
class dispatcher: |