#netcat scanner for HTTP servers
for i inwards $(seq 1 255); create nc -n -v -z "192.168.1.$i" fourscore | grep "open"; done | tee webservers.txt
# Manually perform a HTTP Get Request
echo -ne "GET / HTTP/1.0\n\n" | nc www.redspin.com 80
# Manually perform a HTTP Get Request on a SSL Port
echo -ne "GET / HTTP/1.0\n\n" | socat – OPENSSL:www.website.com:443,verify=0
# Create a local TCP piping to a remote SSL port (to permit netcat to probe a SSL service)
socat -vd TCP-LISTEN:8888,fork OPENSSL:www.redspin.com:443,verify=0
# Always connect to a given webserver PORT regardless if it is SSL or normal HTTP
(curl -iks -m2 "https://www.redspin.com:PORT" || curlicue -iks -m2 "www.redspin.com:PORT")
# Perform a banking firm check on a listing of webservers (HTTP or HTTPS): HOST:PORT -> HOST:PORT|WEB SERVER|HTML Title
# Includes a two seconds timeout using curl's -m2, as well as parallelization using xargs's -P10
cat webservers.txt | xargs -P10 -I'{}' bash -c '(curl -Liks -m2 "https://{}" || curlicue -Liks -m2 "{}") | grep -iao -e "^Server: .*" -e "" | sed "s#Server: \(.*\)#|\1|#i;s###ig" | tr -d "\r\n" | sed "1s/^/{}/;\$a\\" | sed "s/^\([^|]*\)|$/\1||/"' | tee webserver_info.txt
# Check if Trace is enabled on a given website
echo -ne "TRACE /something HTTP/1.0\nX-Header: Trace Enabled\n\n" | socat - OPENSSL:www.website.com:443,verify=0
# Check for the insecure SSLv2 protocol on a website
echo -e '' | openssl s_client -connect WEBSITE:PORT -ssl2 -no_ssl3 -no_tls1 2>/dev/null | grep 'SSLv2'
# Bruteforce a given numerical webpath, printing the HTTP condition code for each request
for ((i=0;i/dev/null | grep HTTP/1.1) | tee webbf.txt ; done
# Simple HTTP Listener
python -m SimpleHTTPServer
# Simple HTTPS (SSL) Listener without a server certificate
sudo openssl s_server -accept 443 -nocert
# Simple HTTPS (SSL) Listener alongside a bad self-signed server certificate
echo -ne "\n\n\n\n\n\n\n" | openssl req -new -newkey rsa:1024 -days 1 -nodes -x509 -keyout out.pem -out out.pem ; openssl s_server -cert out.pem -www
# Sort yesteryear IP Addresses
sort -n -t. -k1,1 -k2,2 -k3,3 -k4,4
# Sort yesteryear IP Addresses as well as Port similar IP:PORT
sed 's#:#.#' | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 | sed 's#\(\([0-9]\{1,3\}\.\)\{4\}\)#\1:#;s#\.:#:#'
# IP2HOST: IP -> IP (HOST) using 'bind-host' packet built into Ubuntu
for i inwards $(cat ips.txt); create echo "$i ("`host $i | grep -v NXDOMAIN | cutting -d' ' -f5`")"; done | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 | sed 's#()##' | tee ip_hosts.txt
# HOST2IP: HOST -> IP (HOST) using 'host' packet available inwards Ubuntu
for i inwards $(cat hosts.txt); create host `echo "$i" | tr -d [[:blank:]]` | grep -v -e 'alias' -e 'handled' -e 'timed' | sed 's/Host \(.*\) .*/\1 0.0.0.0/' | sed "s/;;.*/$i - - 0.0.0.0/" | awk -F' ' '{printf "%s (%s)\n",$4,$1}'; done | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 | tee ip_hosts.txt
#Print IP addresses inwards a file
egrep -o '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'
# Print IP addresses inwards a file: Perl edition
perl -nle 'print $& if /(\d{1,3}\.){3}\d{1,3}/'
# Print IP address inwards all files inwards the electrical current directory tree alongside roughly pretty color matching
find . -type f -exec egrep -a -H -n --color=auto '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' {} \;
for i inwards $(seq 1 255); create nc -n -v -z "192.168.1.$i" fourscore | grep "open"; done | tee webservers.txt
# Manually perform a HTTP Get Request
echo -ne "GET / HTTP/1.0\n\n" | nc www.redspin.com 80
# Manually perform a HTTP Get Request on a SSL Port
echo -ne "GET / HTTP/1.0\n\n" | socat – OPENSSL:www.website.com:443,verify=0
# Create a local TCP piping to a remote SSL port (to permit netcat to probe a SSL service)
socat -vd TCP-LISTEN:8888,fork OPENSSL:www.redspin.com:443,verify=0
# Always connect to a given webserver PORT regardless if it is SSL or normal HTTP
(curl -iks -m2 "https://www.redspin.com:PORT" || curlicue -iks -m2 "www.redspin.com:PORT")
# Perform a banking firm check on a listing of webservers (HTTP or HTTPS): HOST:PORT -> HOST:PORT|WEB SERVER|HTML Title
# Includes a two seconds timeout using curl's -m2, as well as parallelization using xargs's -P10
cat webservers.txt | xargs -P10 -I'{}' bash -c '(curl -Liks -m2 "https://{}" || curlicue -Liks -m2 "{}") | grep -iao -e "^Server: .*" -e "" | sed "s#Server: \(.*\)#|\1|#i;s###ig" | tr -d "\r\n" | sed "1s/^/{}/;\$a\\" | sed "s/^\([^|]*\)|$/\1||/"' | tee webserver_info.txt
# Check if Trace is enabled on a given website
echo -ne "TRACE /something HTTP/1.0\nX-Header: Trace Enabled\n\n" | socat - OPENSSL:www.website.com:443,verify=0
# Check for the insecure SSLv2 protocol on a website
echo -e '' | openssl s_client -connect WEBSITE:PORT -ssl2 -no_ssl3 -no_tls1 2>/dev/null | grep 'SSLv2'
# Bruteforce a given numerical webpath, printing the HTTP condition code for each request
for ((i=0;i/dev/null | grep HTTP/1.1) | tee webbf.txt ; done
# Simple HTTP Listener
python -m SimpleHTTPServer
# Simple HTTPS (SSL) Listener without a server certificate
sudo openssl s_server -accept 443 -nocert
# Simple HTTPS (SSL) Listener alongside a bad self-signed server certificate
echo -ne "\n\n\n\n\n\n\n" | openssl req -new -newkey rsa:1024 -days 1 -nodes -x509 -keyout out.pem -out out.pem ; openssl s_server -cert out.pem -www
# Sort yesteryear IP Addresses
sort -n -t. -k1,1 -k2,2 -k3,3 -k4,4
# Sort yesteryear IP Addresses as well as Port similar IP:PORT
sed 's#:#.#' | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 | sed 's#\(\([0-9]\{1,3\}\.\)\{4\}\)#\1:#;s#\.:#:#'
# IP2HOST: IP -> IP (HOST) using 'bind-host' packet built into Ubuntu
for i inwards $(cat ips.txt); create echo "$i ("`host $i | grep -v NXDOMAIN | cutting -d' ' -f5`")"; done | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 | sed 's#()##' | tee ip_hosts.txt
# HOST2IP: HOST -> IP (HOST) using 'host' packet available inwards Ubuntu
for i inwards $(cat hosts.txt); create host `echo "$i" | tr -d [[:blank:]]` | grep -v -e 'alias' -e 'handled' -e 'timed' | sed 's/Host \(.*\) .*/\1 0.0.0.0/' | sed "s/;;.*/$i - - 0.0.0.0/" | awk -F' ' '{printf "%s (%s)\n",$4,$1}'; done | course of pedagogy -n -t. -k1,1 -k2,2 -k3,3 -k4,4 | tee ip_hosts.txt
#Print IP addresses inwards a file
egrep -o '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'
# Print IP addresses inwards a file: Perl edition
perl -nle 'print $& if /(\d{1,3}\.){3}\d{1,3}/'
# Print IP address inwards all files inwards the electrical current directory tree alongside roughly pretty color matching
find . -type f -exec egrep -a -H -n --color=auto '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' {} \;