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
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']))
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'] = ''
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
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'] = ''
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)
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)
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