Skip to content

Instantly share code, notes, and snippets.

@fcremo
fcremo / solver.py
Created September 27, 2015 17:20
pwnable.kr collision solver
#!/usr/bin/python2
'''
Solver for pwnable.kr collision (Toddler's battle section)
'''
from z3 import *
# define the variables for the passcode
s = list()
for i in range(0,20):
@fcremo
fcremo / extract_certs.sh
Created May 15, 2015 22:29
OpenVPN certificate extractor/NetworkManager config generator (from .ovpn config)
#!/bin/bash
# This script helps extracting certificates from a .ovpn files
# in an automated manner
for cfile in *.ovpn; do
cat $cfile | awk "/<ca>/,/<\/ca>/" | tail -n +2 | head -n -1 > "$cfile.ca.pem";
cat $cfile | awk "/<cert>/,/<\/cert>/" | tail -n +2 | head -n -1 > "$cfile.cert.pem";
cat $cfile | awk "/<key>/,/<\/key>/" | tail -n +2 | head -n -1 > "$cfile.priv-key.pem";
@fcremo
fcremo / 60-t440s.conf
Created April 5, 2015 16:18
T440s Clickpad Configuration
# This config works for me.
# /usr/share/X11/xorg.conf.d/60-t440s.conf
Section "InputClass"
Identifier "Clickpad"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
# Synaptics options come here.
Option "Clickpad" "true"
option "EmulatedMidButtonTime" "0"
@fcremo
fcremo / keybase.md
Created February 10, 2015 21:52
Keybase.io verification

Keybase proof

I hereby claim:

  • I am fcremo on github.
  • I am fcremo (https://keybase.io/fcremo) on keybase.
  • I have a public key whose fingerprint is 1CB6 B853 9281 4841 F1C8 DBAE F0C1 735F 894E C24F

To claim this, I am signing this object:

@fcremo
fcremo / stampa_combinazioni.c
Created February 2, 2015 19:12
Combinazioni binarie
#include <stdio.h>
#include <stdlib.h>
#define MAX_N 20
int main(int argc, char* argv[]){
int n, i;
char *s;
do
scanf("%d", &n);