def api_execute(self, ip_address): ''' Start a w3afAgent, to do this, I must transfer the agent client to the remote end and start the w3afServer in this local machine all this work is done by the w3afAgentManager, I just need to called start and thats it. ''' if not is_ip_address(ip_address): ValueError('Invalid IP address: "%s"' % ip_address) try: agentManager = w3afAgentManager(self.shell.execute, ip_address) except w3afException, w3: return 'Error' + str(w3)
def api_execute(self, parameters): ''' Start a w3afAgent, to do this, I must transfer the agent client to the remote end and start the w3afServer in this local machine all this work is done by the w3afAgentManager, I just need to called start and thats it. ''' usage = 'Usage: w3af_agent <your ip address>' if len(parameters) != 1: return usage ip_address = parameters[0] if not is_ip_address( ip_address ): return usage try: agentManager = w3afAgentManager(self.shell.execute, ip_address) except w3afException, w3: return 'Error' + str(w3)