def run(ip, port, new_key, sleep_time): # 获取当前使用的rc4加密key rc4_key = get_rc4_key(new_key) Log.log_message( '[*]server cipher key: {}'.format(BOLD(rc4_key)), log_type=Log.SERVER) # 启动http监听服务 session = Session() shell = Shell(session) httpd = Server(ip, port, JSCatServer, session, shell, rc4_key, sleep_time) httpd.start() Log.log_message( '[*]server running in {}:{}...'.format(BOLD('0.0.0.0'), BOLD(port)), log_type=Log.SERVER) Log.log_message( '[*]host connect ip is {}:{}...'.format(BOLD(ip), BOLD(port)), log_type=Log.SERVER) print_online_cmd(ip, port) # 控制台命令输入 try: while True: if not httpd.shell.get_command(): httpd.shutdown() exit() except KeyboardInterrupt: httpd.shutdown() Log.log_message('server shutdown', log_type=Log.SERVER)
def run(cmdArguments): # 获取当前使用的rc4加密key rc4_key = get_rc4_key(cmdArguments.get('new_key')) Log.log_message( '[*]server cipher key: {}'.format(BOLD(rc4_key)), log_type=Log.SERVER) cmdArguments['new_key'] = rc4_key # 启动http监听服务 host = cmdArguments['host'] port = int(cmdArguments['port']) httpd = Server(cmdArguments) httpd.start() Log.log_message( '[*]host connect ip is {}:{}...'.format(BOLD(host), BOLD(port)), log_type=Log.SERVER) print_online_cmd(host, port) # 控制台命令输入 try: while True: if not httpd.shell.get_command(): httpd.shutdown() exit() except KeyboardInterrupt: httpd.shutdown() Log.log_message('server shutdown', log_type=Log.SERVER)
def run(ip, port, new_key, sleep_time): # 获取当前使用的rc4加密key rc4_key = get_rc4_key(new_key) print('[*]server encrypt key is {}'.format(BOLD(rc4_key))) # 启动http监听服务 session = Session() shell = Shell(session) httpd = Server(ip, port, JSCatServer, session, shell, rc4_key, sleep_time) httpd.start() print('[*]server running in {}:{}...'.format(BOLD(ip), BOLD(port))) print_online_cmd(ip, port) # 控制台命令输入 try: while True: if not httpd.shell.get_command(): httpd.shutdown() exit() except KeyboardInterrupt: httpd.shutdown() print('server shutdown')