<s> from src . platform . jboss . interfaces import JINTERFACES <EOL> from cprint import FingerPrint <EOL> from log import LOG <EOL> import state <EOL> import utility <EOL> import socket <EOL> class FPrint ( FingerPrint ) : <EOL> def __init__ ( self ) : <EOL> self . platform = "<STR_LIT>" <EOL> self . version = "<STR_LIT>" <EOL> self . title = JINTERFACES . RMI <EOL> self . uri = None <EOL> self . port = <NUM_LIT> <EOL> self . hash = None <EOL> def check ( self , ip , port = None ) : <EOL> """<STR_LIT:U+0020>""" <EOL> try : <EOL> sock = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <EOL> sock . settimeout ( state . timeout ) <EOL> res = sock . connect_ex ( ( ip , self . port ) ) <EOL> if res == <NUM_LIT:0> : <EOL> return True <EOL> except Exception , e : <EOL> utility . Msg ( e , LOG . ERROR ) <EOL> return False </s>
