I would like some constructive critiscism on them.
ARP detecter:
#!/bin/bash export REALARP=`arp -a | cut -d" " -f 4` echo $REALARP sleep 50 export NEWARP=`arp -a |cut -d" " -f 4` echo $NEWARP while [ "$REALARP" = "$NEWARP" ]; do sleep 5 export NEWARP=`arp -a | cut -d" " -f 4` done zenity --warning --text "ARP table changed, new entry is $NEWARP"
The below tries to setup an internet connection then runs onto another script. in the process is also checks DNS resolution. This came in handy for an automated Sniffing attack i was testing using Backtrack on my android. I know there is more efficient ways to do the loops, but this worked and thats all that mattered really.
#!/bin/bash STRING="Working" RECEVIED="1 received" PINGFILE="./ping.txt" NEXTSCRIPT= #path to the next script echo $STRING #Try DHCP dhclient #ping external address and output to file ping -c 1 www.google.com > /root/Desktop/ping.txt #check for PING reply from file if [[ -n $(grep "$RECEVIED" /root/Desktop/ping.txt) ]]; then $NEXTSCRIPT && exit else echo "shit" && # Set IP address ifconfig eth0 down ifconfig eth0 192.168.1.252 ifconfig eth0 up fi #ping external address and output to file ping -c 1 www.google.com > /root/Desktop/ping.txt #check for PING reply from file if [[ -n $(grep "$RECEVIED" /root/Desktop/ping.txt) ]]; then IPADDRESS="192.168.1.252" && $NEXTSCRIPT && exit else echo "shit" && # Set IP address ifconfig eth0 down ifconfig eth0 192.168.0.252 ifconfig eth0 up fi #ping external address and output to file ping -c 1 www.google.com > /root/Desktop/ping.txt #check for PING reply from file if [[ -n $(grep "$RECEVIED" /root/Desktop/ping.txt) ]]; then IPADDRESS="192.168.0.252" && $NEXTSCRIPT && exit else echo "shit" && # Set IP address ifconfig eth0 down ifconfig eth0 10.0.0.252 ifconfig eth0 up fi #ping external address and output to file ping -c 1 www.google.com > /root/Desktop/ping.txt #check for PING reply from file if [[ -n $(grep "$RECEVIED" /root/Desktop/ping.txt) ]]; then IPADDRESS="10.0.0.252" && $NEXTSCRIPT && exit else echo "shit" && # Set IP address ifconfig eth0 down ifconfig eth0 10.0.1.252 ifconfig eth0 up fi ping -c 1 www.google.com > /root/Desktop/ping.txt if [[ -n $(grep "$RECEVIED" /root/Desktop/ping.txt) ]]; then IPADDRESS="10.0.1.252" && $NEXTSCRIPT && exit else echo "shite, its no working. you suck" && exit
a quick way to user NC's port scanning (if you're retarded like me and can never remember the syntax without checking it a few times)
#!/bin/bash echo "host" read host echo "ports # - #" read ports nc -vv -z -w2 $host $ports -o nc.txt & cat nc.txt
ip forwarding and start wireshark
#!/bin/bash echo 1 > /proc/sys/net/ipv4/ip_forward cat /proc/sys/net/ipv4/ip_forward wireshark -i eth0 -w /root/Desktop/capture.cap -k
There is nothing special about these at all, they have just been usefull to me from time to time so thought they may come in handy to someone else












