예제 #1
0
파일: proxy.py 프로젝트: Gwill/Weevely
 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
예제 #2
0
파일: proxy.py 프로젝트: TheDice/Weevely
 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']))
예제 #3
0
파일: proxy.py 프로젝트: Gwill/Weevely
 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'] = ''
예제 #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
예제 #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'] = ''
예제 #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)
예제 #7
0
파일: proxy.py 프로젝트: TheDice/Weevely
    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)

        
        
            
        
예제 #8
0
파일: proxy.py 프로젝트: Gwill/Weevely
 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
예제 #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