Skip to content

Instantly share code, notes, and snippets.

kalkcommu@sd-29651:~$ ldd /home/kalkcommu/bin/su
libpam.so.0 => not found
libpam_misc.so.0 => not found
libc.so.6 => /lib32/libc.so.6 (0xb7629000)
/lib/ld-linux.so.2 (0xb778a000)
kalkcommu@sd-29651:~$ ldd /home/kalkcommu/bin/ls
libselinux.so.1 => not found
librt.so.1 => /lib32/librt.so.1 (0xb7776000)
libacl.so.1 => not found
@mdeous
mdeous / repermute.py
Created February 13, 2012 16:04
generate all possible permutations of a regex
# -*- coding: utf-8 -*-
#
# Used like this:
#
# from repermute import ipermute
#
# for s in ipermute('[A-Z]\d'):
# print s
#
# Almost all regular expression constructs are supported except for '*'
#!/bin/bash
# -*- coding: utf-8 -*-
###########################################################################
# #
# envbot - an IRC bot in bash #
# Copyright (C) 2007-2008 Arvid Norlander #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
#!/bin/bash
# -*- coding: utf-8 -*-
###########################################################################
# #
# envbot - an IRC bot in bash #
# Copyright (C) 2007-2008 Arvid Norlander #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
@mdeous
mdeous / gist:2217703
Created March 27, 2012 16:31
sentry mod_proxy config
ProxyRequests Off
SetOutputFilter proxy-html
ProxyPass /sentry/ http://127.0.0.1:9000/
ProxyPassReverse /sentry/ http://127.0.0.1:9000/
ProxyHTMLURLMap http://127.0.0.1:9000 /sentry
<Location /sentry/>
ProxyHTMLURLMap / /sentry/
var foo = new Object(null);
// pourquoi...
Object.defineProperty(foo, 'bar', {
value: 'baz',
writable: true}
);
// ...et pas
@mdeous
mdeous / gist:2472190
Created April 23, 2012 16:41
Carto_'s code - Zenk-Security
import Queue
import threading
import urllib2
from urllib2 import urlopen
import time
from bs4 import BeautifulSoup as BeautifulSoup
from urllib3 import HTTPConnectionPool
#from urllib3 import urlopen
import xlwt
import time
from collections import defaultdict
import gevent
import requests
countries_urls = {
'france': ['url1', 'url2', 'url3'],
'belgium': ['url1', 'url2', 'url3', 'url4'],
'uk': ['url1', 'url2']
@mdeous
mdeous / README.txt
Created July 22, 2012 18:46
IPtables Basic Configuration
The rules file should be copied to "/etc/iptables/iptables.rules".
The startup script should be copied to "/etc/init.d/iptables", and then the "update-rc.d iptables defaults"
command should be run to enable it on system startup.
@mdeous
mdeous / shelve_demo.py
Created July 27, 2012 13:45
snippet demonstrating python shelve usage
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import shelve
UBBER_LEET_DB = 'my_leet_db.shelve' # extension doesn't matter
def write_to_db(db_file, key, value):
db = shelve.open(db_file)
db[key] = value