Created
May 10, 2018 20:36
-
-
Save hook-s3c/bc25a09ef7986493ccb10faed820440c to your computer and use it in GitHub Desktop.
Quick utils / alias bash script for convenience when using nmap/airodump/mitmf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias mygateway="print $(route -n | grep 'UG[ \t]' | awk '{print $2}')" | |
| alias myinterface="print $(route -n | grep 'UG[ \t]' | awk '{print $8}')" | |
| alias mysubnet="print $(ip -o -f inet addr show | awk '/scope global/ {print $4}')" |
Author
Author
MITMf example;
./mitmf.py --arp --spoof -i $(myinterface) --gateway $(mygateway) --upsidedownternet
Author
nmap example for local network scanning;
nmap $(mysubnet) -Pn -sV
Author
airodump example;
airodump-ng $(myinterface) --manufacturer --ignore-negative-one --beacons -a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installing
References / discussion
CIDR subnet line taken from;
https://stackoverflow.com/questions/33150176/get-subnet-mask-in-linux-using-bash
Gateway and interface;
https://serverfault.com/questions/31170/how-to-find-the-gateway-ip-address-in-linux