Skip to content

Instantly share code, notes, and snippets.

@mdeous
mdeous / anonimize_ips.py
Created February 26, 2013 11:17
IP Anonimizer python anonimize_ips.py input_file output_file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
USAGE = '%s INPUT_FILE OUTPUT_FILE' % sys.argv[0]
IP_RE = re.compile(r'(?:\d{1,3}\.){3}\d{1,3}')
IP_REPLACEMENT = 'xxx.xxx.xxx.xxx'
@mdeous
mdeous / gist:4999830
Created February 20, 2013 21:33
WPA Hanshake Extractor
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from scapy.all import *
if len(sys.argv) != 3:
print "USAGE: %s INPUT_PCAP OUTPUT_PCAP" % sys.argv[0]
sys.exit(1)
_, in_pcap, out_pcap = sys.argv
from circus import get_arbiter
w = dict(
name='watcher:FeedWatcher',
cmd='/home/mdeous/virtualenvs/FeedWatcher/bin/FeedWatcher',
stdout_stream={
'refresh_time': 0.3,
'filename': '/home/mdeous/.FeedWatcher/circus_out.log'
},
stderr_stream={
@mdeous
mdeous / level.c
Created November 25, 2012 23:01
Zenk ASLR OFF Medium1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void copy(char *arg)
{
char msg[256];
strcpy(msg,arg);
printf("Votre argument est : %s\n",msg);
}
@mdeous
mdeous / level.c
Created November 25, 2012 22:51
Zenk ASLR OFF Hard1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (argc != 3)
{
printf("Usage : ./prog nom suid\n");
exit(1);
@mdeous
mdeous / level.c
Created November 25, 2012 17:53
Zenk ASLR ON easy1
#include <stdio.h>
#include <string.h>
void hello(char * src)
{
char buffer[64];
strcpy(buffer, src);
printf("Hello %s !\n", buffer);
}
#include <stdio.h>
#include <stdlib.h>
int main(){
long val=0x00000000;
char tab[20];
scanf("%25s",&tab);
printf("buf: %s\n",tab);
printf("val: 0x%08x\n",val);
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""(Un)Roast a password sent via AIM/ICQ.
The OSCAR protocol (used by AIM and ICQ) uses two alternative methods to pass
authentification credentials. While the second uses an MD5 hash, the first
only XORs the password with a static character set.
This is meant to recover a forgotten password that is still stored by an ICQ
#! /usr/bin/python2.7
"""RFC 3548: Base16, Base32, Base64 Data Encodings"""
# Modified 04-Oct-1995 by Jack Jansen to use binascii module
# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support
import re
import struct
import binascii
@mdeous
mdeous / level.c
Created November 20, 2012 09:44
Zenk-Security Wargame - Easy1 ASLR OFF
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (argc != 2)
{
printf("Usage : prog filename\n");
exit(1);