예제 #1
0
  def ReceiveFetchedFile(self,
                         stat_entry,
                         hash_obj,
                         request_data=None,
                         is_duplicate=False):
    """See MultiGetFileLogic."""
    del request_data, is_duplicate  # Unused.

    result = rdf_file_finder.CollectSingleFileResult(
        stat=stat_entry, hash=hash_obj)
    self.SendReply(result)
예제 #2
0
 def ReceiveFetchedFile(self,
                        stat_entry,
                        hash_obj,
                        request_data=None,
                        is_duplicate=False):
   """See MultiGetFileLogic."""
   del request_data, is_duplicate  # Unused.
   # TODO(user): If client is Windows and collection failed, retry
   #  with TSK/NTFS.
   result = rdf_file_finder.CollectSingleFileResult(
       stat=stat_entry, hash=hash_obj)
   self.SendReply(result)
예제 #3
0
 def _GenSampleResult(self):
   return rdf_file_finder.CollectSingleFileResult(
       stat=rdf_client_fs.StatEntry(
           pathspec=rdf_paths.PathSpec.OS(path="/etc/hosts"),
           st_mode=33184,
           st_size=4242,
           st_atime=1336469177,
           st_mtime=1336129892,
           st_ctime=1336129892,
       ),
       hash=rdf_crypto.Hash(
           sha256=binascii.unhexlify(
               "9e8dc93e150021bb4752029ebbff51394aa36f069cf19901578e4f06017acdb5"
           ),
           sha1=binascii.unhexlify("6dd6bee591dfcb6d75eb705405302c3eab65e21a"),
           md5=binascii.unhexlify("8b0a15eefe63fd41f8dc9dee01c5cf9a")))