parameters: ()
docstring: Perform of lookup in Team Cymru\'s MHR
docstring_summary: Perform of lookup in Team Cymru\'s MHR
docstring_tokens: Perform of lookup in Team Cymru \ s MHR
function: def MHRLookup():
      ''' Perform of lookup in Team Cymru\'s MHR '''
  
      PrintAndLog(u'Team Cymru MHR lookup', 'SECTION')
      PrintAndLog(u'Got %s hashes to verify' % len(HASHES), 'DEBUG')
  
      Query = 'begin\r\n'
      for Hash in HASHES:
          Query += Hash + '\r\n'
      Query += 'end\r\n'
  
      S = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      S.connect((MRH_HOST, MRH_PORT))
      S.sendall(Query)
  
      Response = u''
      while True:
          Data = S.recv(4096)
          Response += Data
          if not Data: break
      S.close()
  
      Lines = Response.split('\n')
      Lines = Lines[2:-1]
  
      for line in Lines:
          Status = line.split(' ')
          if Status[2] == 'NO_DATA':
              PrintAndLog(line.decode('utf-8'), 'INFO')
          else:
              PrintAndLog(line.decode('utf-8'), 'WARNING')
function_tokens: def MHRLookup ( ) : PrintAndLog ( u'Team Cymru MHR lookup' , 'SECTION' ) PrintAndLog ( u'Got %s hashes to verify' % len ( HASHES ) , 'DEBUG' ) Query = 'begin\r\n' for Hash in HASHES : Query += Hash + '\r\n' Query += 'end\r\n' S = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) S . connect ( ( MRH_HOST , MRH_PORT ) ) S . sendall ( Query ) Response = u'' while True : Data = S . recv ( 4096 ) Response += Data if not Data : break S . close ( ) Lines = Response . split ( '\n' ) Lines = Lines [ 2 : - 1 ] for line in Lines : Status = line . split ( ' ' ) if Status [ 2 ] == 'NO_DATA' : PrintAndLog ( line . decode ( 'utf-8' ) , 'INFO' ) else : PrintAndLog ( line . decode ( 'utf-8' ) , 'WARNING' )