def _serve_oneshot(self): t = OneShotServer(SlaveService, hostname=self.host, port=self.port, reuse_addr=True, ipv6=self.ipv6, authenticator=self.authenticator, registrar=self.registrar, auto_register=self.auto_register) t._listen() sys.stdout.write("rpyc-oneshot\n") sys.stdout.write(f"{t.host}\t{t.port}\n") sys.stdout.flush() t.start()
def _serve_oneshot(self): t = OneShotServer(SlaveService, hostname = self.host, port = self.port, reuse_addr = True, ipv6 = self.ipv6, authenticator = self.authenticator, registrar = self.registrar, auto_register = self.auto_register) t._listen() sys.stdout.write("rpyc-oneshot\n") sys.stdout.write("%s\t%s\n" % (t.host, t.port)) sys.stdout.flush() t.start()
def main(): port = int(idc.ARGV[1]) if idc.ARGV[1:] else 18861 thread_mode = idc.ARGV[2] == 'threaded' if idc.ARGV[2:] else False print('Received arguments: port=%s, thread_mode=%s' % (port, thread_mode)) # :note: For speed, we don't want to idc.Wait() here, # but you might want to call it in your code # to make sure that autoanalysis has finished. if thread_mode: thread = threading.Thread(target=main_thread, args=(port, thread_mode)) thread.daemon = True thread.start() else: srv = OneShotServer(SlaveService, port=port) # OneShotServer is a LIE so we have to do some shit # this is copied from https://github.com/tomerfiliba/rpyc/blob/master/rpyc/utils/server.py # specifically, the start method. if stuff breaks look here! srv._listen() srv._register() srv.accept() idc.Exit(0)
def main(): port = int(idc.ARGV[1]) if idc.ARGV[1:] else 18861 thread_mode = idc.ARGV[2] == 'threaded' if idc.ARGV[2:] else False print('Received arguments: port=%s, thread_mode=%s' % (port, thread_mode)) # :note: For speed, we don't want to idc.Wait() here, # but you might want to call it in your code # to make sure that autoanalysis has finished. if thread_mode: thread = threading.Thread(target=main_thread, args=(port, thread_mode)) thread.daemon = True thread.start() else: srv = OneShotServer(SlaveService, port=port) # OneShotServer is a LIE so we have to do some shit # this is copied from https://github.com/tomerfiliba/rpyc/blob/master/rpyc/utils/server.py # specifically, the start method. if stuff breaks look here! srv._listen() srv._register() srv.accept() idc.Exit(0)