Ejemplo n.º 1
0
 def _probe(self):
     if not self.args['just_run']:
         try:
             Phpproxy._probe(self)
         except ProbeSucceed:
             pass
         
     if not self.args['just_install']:
         self.pid = Popen([executable, self._get_local_proxy_path(), self.args['lhost'], str(self.args['lport']), self.args['url'], agent]).pid
Ejemplo n.º 2
0
 def _probe(self):
     if not self.args['just_run']:
         try:
             Phpproxy._probe(self)
         except ProbeSucceed:
             pass
         
     if not self.args['just_install']:
         start_new_thread(self._run_proxy_server, (self.args['url'], self.args['lport'], self.args['lhost']))
Ejemplo n.º 3
0
 def _prepare(self):
     
     if not self.args['just_run']:
         Phpproxy._prepare(self)
     else:
         if not url_validator.match(self.args['just_run']):
             raise ProbeException(self.name, '\'%s\': %s' % (self.args['just_run'], WARN_NOT_URL) )
         
         self.args['url'] = self.args['just_run']
         self.args['rpath'] = ''
Ejemplo n.º 4
0
    def _probe(self):
        if not self.args['just_run']:
            try:
                Phpproxy._probe(self)
            except ProbeSucceed:
                pass

        if not self.args['just_install']:
            self.pid = Popen([executable, self._get_local_proxy_path(), self.args[
                             'lhost'], str(self.args['lport']), self.args['url'], agent]).pid
Ejemplo n.º 5
0
    def _prepare(self):

        if not self.args['just_run']:
            Phpproxy._prepare(self)
        else:
            if not url_validator.match(self.args['just_run']):
                raise ProbeException(
                    self.name, '\'%s\': %s' % (self.args['just_run'], WARN_NOT_URL))

            self.args['url'] = self.args['just_run']
            self.args['rpath'] = ''
Ejemplo n.º 6
0
    def _stringify_result(self):

        Phpproxy._stringify_result(self)

        rpath = ' '
        if self.args['rpath']:
            rpath = '\'%s\' ' % self.args['rpath']

        self._result.append(self.pid)

        self._output = """Proxy daemon spawned, set \'http://%s:%i\' as HTTP proxy to start browsing anonymously through target.
Run ":net.proxy -just-run '%s'" to respawn local proxy daemon without reinstalling remote agent.
When not needed anymore, remove remote file with ":file.rm %s" and run locally 'kill -9 %i' to stop proxy.""" % (self.args['lhost'], self.args['lport'], self.args['url'], rpath, self.pid)
Ejemplo n.º 7
0
    def _output_result(self):
    
        Phpproxy._output_result(self)
        
        rpath = ' '
        if self.args['rpath']:
            rpath = '\'%s\' ' % self.args['rpath']
        
        self._output = """Proxy daemon spawned, set \'http://%s:%i\' as HTTP proxy to start browsing anonymously through target.
Run ":net.proxy -just-run '%s'" to respawn local proxy daemon without reinstalling remote agent.
When not needed anymore, remove%sremote agent.""" % (self.args['lhost'], self.args['lport'], self.args['url'], rpath)

        
        
            
        
Ejemplo n.º 8
0
 def _verify(self):
     if not self.args['just_run']:
         Phpproxy._verify(self)   
     else:
         # With just_run, suppose good result to correctly print output
         self._result = True
Ejemplo n.º 9
0
 def _verify(self):
     if not self.args['just_run']:
         Phpproxy._verify(self)
     else:
         # With just_run, suppose good result to correctly print output
         self._result = True