document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. NAVIIP=`which naviip`
  3. NMAP=`which nmap`
  4.  
  5. echo -n "Retrieving your homebox IP through gmail: "
  6. IP=`$NAVIIP`
  7.  
  8. if [ -n "$IP" ] && [ "$IP" != \'\\n\' ]; then
  9.    echo -en "$IP\\nScanning the service behind secret port: "
  10.    SCAN=` $NMAP -sV -p2247 $IP | sed \'/2247/!d\' `
  11.    STATE=` echo $SCAN | awk \'{print $2}\' `
  12.    SERVICE=` echo $SCAN | awk \'{print $4" "$5}\'`
  13.    echo $SERVICE $STATE
  14.  
  15.    if [ "$STATE" = "open" ]; then
  16.       echo "Proceeding with ssh connection: "
  17.       ssh -l zeh -p 2247 $IP
  18.    fi
  19. else
  20.    echo -e "FAILED.\\nSorry, I could not retrieve your IP"
  21.    echo "Exiting..."
  22. fi
  23.  
  24. # EOF #
');