(self, pcap, scandate)
Add Pcap file to CRITs.

        Args:
            pcap (binary): pcap data
            scandate (str): scan date from when pcap was collected

        TODO:
            Add an error check
Add Pcap file to CRITs.
Add Pcap file to CRITs .
def _process_pcap(self, pcap, scandate):
        """
        Add Pcap file to CRITs.

        Args:
            pcap (binary): pcap data
            scandate (str): scan date from when pcap was collected

        TODO:
            Add an error check
        """
        self._info("Adding PCAP and creating relationship to %s" % (str(self.obj.id)))
        self._notify()
        h = md5(pcap).hexdigest()
        result = handle_pcap_file("%s.pcap" % h,
                                  pcap,
                                  self.obj.source,
                                  user=self.current_task.user,
                                  description='Created %s' % (scandate),
                                  related_id=str(self.obj.id),
                                  related_type="Sample",
                                  method=self.name,
                                  reference=None,
                                  relationship=RelationshipTypes.RELATED_TO)
        self._add_result("pcap added", h, {'md5': h})
def _process_pcap ( self , pcap , scandate ) : self . _info ( "Adding PCAP and creating relationship to %s" % ( str ( self . obj . id ) ) ) self . _notify ( ) h = md5 ( pcap ) . hexdigest ( ) result = handle_pcap_file ( "%s.pcap" % h , pcap , self . obj . source , user = self . current_task . user , description = 'Created %s' % ( scandate ) , related_id = str ( self . obj . id ) , related_type = "Sample" , method = self . name , reference = None , relationship = RelationshipTypes . RELATED_TO ) self . _add_result ( "pcap added" , h , { 'md5' : h } )