<s> from templates import Plugin <EOL> class Sandrorat ( Plugin ) : <EOL> NAME = '<STR_LIT>' <EOL> def recon ( self ) : <EOL> d = self . dvm <EOL> for s in d . get_strings ( ) : <EOL> if '<STR_LIT>' in s . lower ( ) or '<STR_LIT>' in s . lower ( ) : <EOL> return True <EOL> return False <EOL> def extract ( self ) : <EOL> d = self . dvm <EOL> c2 = [ ] <EOL> port = [ ] <EOL> for cls in d . get_classes ( ) : <EOL> if len ( cls . get_fields ( ) ) == <NUM_LIT:3> and set ( [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' ] ) == set ( map ( lambda x : x . name , cls . get_fields ( ) ) ) and len ( cls . get_methods ( ) ) == <NUM_LIT:1> and cls . get_methods ( ) [ <NUM_LIT:0> ] . name . endswith ( '<STR_LIT>' ) : <EOL> clinit = cls . get_methods ( ) [ <NUM_LIT:0> ] <EOL> cc = [ ] <EOL> for inst in clinit . get_instructions ( ) : <EOL> if inst . get_name ( ) == '<STR_LIT>' : <EOL> c2 . append ( inst . get_output ( ) . split ( '<STR_LIT:U+002C>' ) [ - <NUM_LIT:1> ] . strip ( "<STR_LIT>" ) ) <EOL> elif inst . get_name ( ) == '<STR_LIT>' : <EOL> port . append ( int ( inst . get_output ( ) . split ( '<STR_LIT:U+002C>' ) [ - <NUM_LIT:1> ] . strip ( "<STR_LIT>" ) ) ) <EOL> servers = [ ] <EOL> for i , server in enumerate ( c2 ) : <EOL> if len ( port ) > i : <EOL> servers . append ( server + '<STR_LIT::>' + str ( port [ i ] ) ) <EOL> else : <EOL> servers . append ( server ) <EOL> return { '<STR_LIT>' : servers } </s>
