Skip to content

Instantly share code, notes, and snippets.

@z0mbiehunt3r
z0mbiehunt3r / HTTP-Traceroute.py
Created September 5, 2016 12:14 — forked from andresriancho/HTTP-Traceroute.py
HTTP-Traceroute.py
#!/usr/bin/env python
import getopt, sys, re, urllib2, urllib, BaseHTTPServer
from urllib2 import Request, urlopen, URLError, HTTPError
################## HEADER ###################################
#
# Traceroute-like HTTP scanner
# Using the "Max-Forwards" header
@z0mbiehunt3r
z0mbiehunt3r / SNER_preparer
Created April 21, 2016 07:59 — forked from troyane/SNER_preparer
Script to prepare Stanford NER to work with your Python and NLTK
#!/bin/bash
mkdir my_project
cd my_project
echo " . . . Downloading file stanford-ner-2014-08-27.zip"
# NOTE: need to update link for further versions
wget http://nlp.stanford.edu/software/stanford-ner-2014-08-27.zip
echo " . . . Unpacking stanford-ner-2014-08-27.zip"
@z0mbiehunt3r
z0mbiehunt3r / pcapworksheet.txt
Created August 2, 2015 12:47
pcapworksheet
# http://sickbits.net/other/pcapworksheet.txt
1.) OS Stats
$ ifconfig eth0; ifconfig -a
$ netstat -ni
$ netstat -s
$ cat /proc/net/dev | columns -t
$ awk '{ print $1,$5 }' /proc/net/dev
$ watch -n 1 cat /proc/interrupts
'''cjson, jsonlib, simplejson, and yajl also use C code
demjson did not use C code, but was too painfully slow to benchmark
(took about 20 seconds for these tests)
'''
import json
import sys
import time
with open('doc.json') as f:
>>> my_dict = {'one': 1, 'two': 2, 'a_tuple': ('1', '2', '3')}
>>> my_dict.__hash__ is None
True
>>> frozenset(my_dict.items())
frozenset({('a_tuple', ('1', '2', '3')), ('one', 1), ('two', 2)})
>>> hash(frozenset(my_dict.items()))
-8556322717805028753
@z0mbiehunt3r
z0mbiehunt3r / gist:e0e95ceffb6acf9ba94a
Created April 1, 2015 14:27
mysql brew new installation
mysql_install_db --verbose --user=$USER --basedir=/usr/local/Cellar/mysql/5.X --datadir="/NEW/PATH/" --tmpdir=/tmp
cd /usr/local/Cellar/mysql/5.X/bin/
vim mysql.server # change datadir
mysql.server start
/usr/local/Cellar/mysql/5.X/bin/mysqladmin -u root password 'ROOTPASSWORD'
@z0mbiehunt3r
z0mbiehunt3r / requirements.txt
Created March 16, 2015 13:03
Dshell requirements
IPy==0.81
dpkt==1.8.6
pycrypto==2.6.1
pygeoip==0.3.2
pypcap==1.1.1
wsgiref==0.1.2
@z0mbiehunt3r
z0mbiehunt3r / DictDiffer.py
Created May 27, 2014 10:59
python dict diff
class DictDiffer(object):
"""
Calculate the difference between two dictionaries as:
(1) items added
(2) items removed
(3) keys same in both but changed values
(4) keys same in both and unchanged values
http://code.activestate.com/recipes/576644-diff-two-dictionaries/#c7
"""
@z0mbiehunt3r
z0mbiehunt3r / bang.c
Created May 17, 2014 13:28
TCP SYN Denial of Service Exploit (bang.c) (amp.)
/*
* BANG.C Coded by Sorcerer of DALnet
*
* FUCKZ to: etech, blazin, udp, hybrid and kdl
* PROPZ : skrilla, thanks for all your help with JUNO-Z and especially this code :)
* --------------------------------
* REDIRECTION DOS FINALLY DISTRIBUTED !!!!!!
*
* This is POC and demonstrates a new method of DoS. The idea
* behind it is that the attacker generates connection requests

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: