Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/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 |
| #!/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" |
| # 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 |
| 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' |
| IPy==0.81 | |
| dpkt==1.8.6 | |
| pycrypto==2.6.1 | |
| pygeoip==0.3.2 | |
| pypcap==1.1.1 | |
| wsgiref==0.1.2 |
| 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 | |
| """ |
| /* | |
| * 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 |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)