예제 #1
0
파일: w3af_agent.py 프로젝트: weisst/w3af
    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)
예제 #2
0
 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)