Skip to content

Instantly share code, notes, and snippets.

# Reset our signal handler
signal.signal(signal.SIGINT, signal.SIG_DFL)
target_bssid = raw_input('Enter a BSSID to perform an deauth attack (q to quit): ')
while target_bssid not in networks:
if target_bssid == 'q' : sys.exit(0)
raw_input('BSSID not detected... Please enter another (q to quit): ')
# Get our interface to the correct channel
print 'Changing ' + args.interface + ' to channel ' + str(networks[target_bssid][1])
os.system("iwconfig %s channel %d" % (args.interface, networks[target_bssid][1]))
# Now we have a bssid that we have detected, let's get the client MAC
@carletes
carletes / ubuntu-kernel-for-acer-c7.sh
Last active November 22, 2018 03:51
Script to create Ubuntu kernel packages for an Acer C7 Chromebook running ChrUbuntu
#!/bin/bash
set -x
#
# Grab verified boot utilities from ChromeOS.
#
mkdir -p /usr/share/vboot
mount -o ro /dev/sda3 /mnt
cp /mnt/usr/bin/vbutil_* /usr/bin
@tribut
tribut / mosh_pc.sh
Last active June 4, 2018 11:33
wrapper for mosh to work with ssh's proxycommand directive. this only makes sense if the target machine is directly reachable from the internet using udp (but probably not via tcp). usage: mosh_pc.sh [host as mentioned in .ssh/config] [public ip of host]
#!/bin/sh
# ########################################################## #
# wrapper for mosh to work with ssh's proxycommand directive #
# this only makes sense if the machine is directly reachable #
# from the internet using udp. #
# ########################################################## #
THISSCRIPT="`basename \"$0\"`"
REMOTE="$1"
@rbranson
rbranson / gist:03d88e3733c6ee098a89
Last active July 25, 2017 15:17
My Thoughts on Rust

Rust is the first language that has emerged in the past few years that solves enough of my problems that it would be worth not only learning & teaching an entirely new language, but also sacrificing the maturity of the language ecosystems I’ve become accustomed to.

I highly suggest you read the "Guide" provided by the language developers or this won't make much sense. These are just some of my thoughts and are intended to highlight particular things that stand out to me. I am just a practitioner and not an expert in any of these languages, so I have probably made some incorrect assumptions and out-of-date assertions. Bare with me.

Rust feels like the first time momentum has gained behind a true systems programming language that uses modern PL design techniques to prevent common errors when dealing with memory. It seems like others have previously either been too anemic to be worth adopting or too abstract to provide proper control. The type system and assignment semantics are designed specifically to preven

@zhuowei
zhuowei / angler_partitioninfo.txt
Created December 31, 2015 23:39
Huawei Nexus 6P (Angler) partition information
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 44 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 16384 180223 80.0M 0700 modem
@andrewkroh
andrewkroh / sshd
Last active April 11, 2017 13:57
Google Authenticator PAM - Vagrant User SSH Exception
#%PAM-1.0
# Skip Google Authenticator for the vagrant user:
auth [success=1 default=ignore] pam_succeed_if.so user = vagrant
auth required pam_google_authenticator.so
auth required pam_unix.so
auth required pam_sepermit.so
auth include password-auth
account required pam_nologin.so
@fajarnugraha
fajarnugraha / zfsroot.lua
Last active November 7, 2016 09:45
Grub lua script to enable automatic creation of grub menu entries on zfs root. Download to /rpool/grub/zfsroot.lua
-- Change this two variables with your actual setup
rpool="rpool"
zfs_rootdir="ROOT"
-- End of user-editable section
ds = ""
snap = ""
snap_dir = ""
function find_kernel_pair (name)
@smcnamara3
smcnamara3 / zfs-setup.sh
Created March 25, 2016 07:54
ZFS root on Xenial - personal fork of http://pastebin.com/raw/fa83QrBk
#!/bin/bash
# ZFS-setup.sh 2016-03-24 19:42
# Auto-installer for clean new system using root on zfs, and optionally on
# luks encrypted disks. It installs Ubuntu 14.04.04 or 16.04 with everything
# needed to support ZFS and potentially LUKS. Without LUKS everything lives
# in the main rpool pool. With LUKS then /boot lives in its own boot pool.
# Grub2 is installed to all disks, so the system can boot cleanly from *any*
# disk, even with a failed disk.
--- scapy-2.1.0-rfmon/scapy/arch/pcapdnet.py 2009-09-23 10:27:36.000000000 -0400
+++ scapy-2.1.0/scapy/arch/pcapdnet.py 2014-04-11 20:54:49.000000000 -0400
@@ -52,7 +52,14 @@
class _PcapWrapper_libpcap:
def __init__(self, *args, **kargs):
self.pcap = pcap.pcapObject()
- self.pcap.open_live(*args, **kargs)
+ if sys.platform == 'darwin' and 'pcap_set_rfmon' not in dir(self.pcap):
+ warning("Mac OS WiFI monitor mode not supported unless python-libpcap patched for OS X is used.")
+
diff -ru pylibpcap-0.6.4/pcap.c pylibpcap-0.6.4-mac/pcap.c
--- pylibpcap-0.6.4/pcap.c 2012-01-05 19:13:47.000000000 -0500
+++ pylibpcap-0.6.4-mac/pcap.c 2014-04-11 20:29:02.000000000 -0400
@@ -1,15 +1,16 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
- *
- * This file is not intended to be easily readable and contains a number of
+ * Version 3.0.0