@@ -0,0 +1,1200 @@
+#!/usr/bin/env python%0A# Name:     nmapme%0A# Purpose:  Python to scan your public IP wihth NMAP (Top 100 ports, Service ID,  Open)%0A# By:       Jerry Gamblin%0A# Date:     13.05.15%0A# Modified  13.05.15%0A# Rev Level 0.1%0A# -----------------------------------------------%0A%0Aimport urllib2%0Aimport subprocess%0Aimport sys%0Aimport socket%0Afrom urllib2 import urlopen%0A%0Adef color(text, color_code):%0A    if sys.platform == %22win32%22 and os.getenv(%22TERM%22) != %22xterm%22:%0A        return text%0A%0A    return '%5Cx1b%5B%25dm%25s%5Cx1b%5B0m' %25 (color_code, text)%0A%0A%0Adef red(text):%0A    return color(text, 31)%0A%0Adef blue(text):%0A    return color(text, 34)%0A%0A%0Amy_ip = urlopen('http://ip.42.pl/raw').read()%0AHOST=%22root@cloud.yoursite.com%22%0A%0Aprint '%5Cn'%0Aprint (red('This is probally illegal. Dont Be Stupid.'))%0Aprint '%5Cn'%0Aprint 'Scanning ' + my_ip  + ' with namp from ' + HOST%0Aprint '%5Cn'%0A%0ACOMMAND=%22nmap -F -sV --open %25s%22 %25 my_ip %0A%0A%0Assh = subprocess.Popen(%5B%22ssh%22, %22%25s%22 %25 HOST, COMMAND%5D,%0A                       shell=False,%0A                       stdout=subprocess.PIPE,%0A                       stderr=subprocess.PIPE)%0Aresult = ssh.stdout.read()%0Aif result == %5B%5D:%0A    error = ssh.stderr.read()%0A    print %3E%3Esys.stderr, %22ERROR: %25s%22 %25 error%0Aelse:%0A    print result%0A

Create nmapme.py