some useful scripts for penetration tests
This is a netstat implementation to find used ports from the /proc/net/ files. I've found a few systems where netstat was not installed of only the restricted version from busybox. Currently it doesn't support the tcp_diag interface, only the /proc system.
For pretty output use.
./linux-get-programm-to-port.sh | column -t -s $'\t'
Hacky version of netstat, only lists open ports bound to all all interfaces. Easy to understand for modifications in special cases.
Download file to store all pdf papers from exploit-db locally.
Calculate ranges of list of numbers. For example if you have a file with
1
2
3
5
6
7
you can use the script
./getRanges.rb < nummerFile
to get
[1-3]
[5-7]