Home

Awesome

oh-my-zsh pentest plugin

Aliases and functions for the lazy penetration tester

Installation

git clone https://github.com/jhwohlgemuth/zsh-pentest.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-pentest

Usage

plugins=(... zsh-pentest)

Tip: For epic synergy and awesome productivity, use the zsh-handy-helpers plugin too!

plugins=(... zsh-pentest zsh-handy-helpers)

Aliases

Hint: The nmap oh-my-zsh plugin has several great aliases for nmap

AliasCommand
meecho $(ifconfig eth0 | grep "inet " | cut -b 9- | cut -d" " -f2)
cmecrackmapexec
e4lenum4linux -a
h2thtml2text -style pretty
osoonesixtyone

Functions

NameCommandTested
create_scan_directoryCreate directory for saving resultsyes
enum_snmp $IP [WORDLIST] [NETWORK]Create host list and scan IP with WORDLISTyes
enum_web $IP [PORT] [WORDLIST]Enumerate IP with whatweb and niktoyes
flush_iptablesYou guessed it...this flushes iptablesyes
focus [IP] [PORT]Set RHOST=IP and RPORT=PORTyes
get_gatewayGet router IP addressyes
get_hosts [PORT]Get list of host IP addresses found via nmapyes
get_hostnames $IPGet list of host names using nmap and the IP of a known DNS serveryes
htm [IP]Download IP and print with html2textyes
monitor_traffic [$IP]Monitor bytes over the line with iptablesyes
scan_tcp $IPScan IP with onetwopunch masscanyes
serve [PORT]Start Python server in current directory on PORT [default: 80]yes
sort_ips ADDRESSESSort list of IP addressesyes

Example Usage

This plugin pairs well with the zsh-handy-helpers plugin iter function:

# Scan all SMB servers for vulnerabilities with nmap scripts
scan() {nmap $1 --script "smb-vuln-*"}
get_hosts 139 | iter scan