dod-cyber-crime-center / DC3-MWCP

DC3 Malware Configuration Parser (DC3-MWCP) is a framework for parsing configuration information from malware. The information extracted from malware includes items such as addresses, passwords, filenames, and mutex names.
Other
300 stars 59 forks source link

"unhashable type 'list'" when adding a list to reporter metadata #1

Closed agrajag9 closed 5 years ago

agrajag9 commented 8 years ago

Is it possible to add a list to reporter metadata? I would expect this to be as simple as outlined below, but apparently it is not.

  30         self.nodes = list()
  31         if self.results:
  32             for r in self.results:
  33                 self.nodes.append({"ipv4": str.split(r, '\x00')[0],
  34                                    "pub_key": binascii.hexlify(r[34:])})
  35             self.reporter.add_metadata("other", {"nodes": self.nodes})

Error:

Could not add object of <type 'list'> to metadata under other using key nodes
dc3-tsd commented 8 years ago

At present DC3-MWCP does not support adding metadata in this manner. However, we plan on adding this functionality in the next version of DC3-MWCP.

dc3-tsd commented 5 years ago

For the time being, this ability will not be supported. As a workaround you can add the elements one at a time.