(self, report)
return status
Process private sample report information focused on virustotal's
        metadata. This includes the section:
            - VirusTotal Metadata (times seen)
            - VirusTotal Reputation
        Args:
            report (dict): unprocessed main json report information from VT.

        Return: dict with keys:
            'success' (boolean),
            'message' (str),
Process private sample report information focused on virustotal's
        metadata. This includes the section:
            - VirusTotal Metadata (times seen)
            - VirusTotal Reputation
        Args:
            report (dict): unprocessed main json report information from VT.
Process private sample report information focused on virustotal s metadata . This includes the section : - VirusTotal Metadata ( times seen ) - VirusTotal Reputation Args : report ( dict ) : unprocessed main json report information from VT .
def _process_private_sample_vtmetadata(self, report):
        """
        Process private sample report information focused on virustotal's
        metadata. This includes the section:
            - VirusTotal Metadata (times seen)
            - VirusTotal Reputation
        Args:
            report (dict): unprocessed main json report information from VT.

        Return: dict with keys:
            'success' (boolean),
            'message' (str),
        """
        status = {
            'success':  False,
            'message':  []
        }

        additional_info_dict = report.get('additional_info', {})

        # VirusTotal Metadata
        if additional_info_dict:
            vt_metadata = {
                'First Seen': report.get('first_seen', ''),
                'Last Seen': report.get('last_seen', ''),
                'Times Submitted': report.get('times_submitted', ''),
                'Unique Sources': report.get('unique_sources', '')
            }
            self._add_result('VirusTotal Timestamps', report.get('scan_id', ''), vt_metadata)
            for item in report.get('submission_names', []):
                self._add_result('VirusTotal Submission Names', item)

            # VirusTotal Reputation
            vt_reputation = {
                'Community Reputation': report.get('community_reputation', 0),
                'Harmless Votes':       report.get('harmless_votes', 0),
                'Malicious Votes':      report.get('malicious_votes', 0)
            }
            vt_reputation_string =  "%d / %d" % (report.get('malicious_votes', 0), report.get('harmless_votes', 0))
            self._add_result('VirusTotal Reputation', vt_reputation_string, vt_reputation)
        else:
            status['message'].append("Additional information not included in VT response.")


        # Updating status information and returning
        if not status['message']:
            status['success'] =  True
            status['message'] = "Processed private sample vtmetadata."
        else:
            status['message'] = "\n".join(status['message'])

        return status
def _process_private_sample_vtmetadata ( self , report ) : status = { 'success' : False , 'message' : [ ] } additional_info_dict = report . get ( 'additional_info' , { } ) # VirusTotal Metadata if additional_info_dict : vt_metadata = { 'First Seen' : report . get ( 'first_seen' , '' ) , 'Last Seen' : report . get ( 'last_seen' , '' ) , 'Times Submitted' : report . get ( 'times_submitted' , '' ) , 'Unique Sources' : report . get ( 'unique_sources' , '' ) } self . _add_result ( 'VirusTotal Timestamps' , report . get ( 'scan_id' , '' ) , vt_metadata ) for item in report . get ( 'submission_names' , [ ] ) : self . _add_result ( 'VirusTotal Submission Names' , item ) # VirusTotal Reputation vt_reputation = { 'Community Reputation' : report . get ( 'community_reputation' , 0 ) , 'Harmless Votes' : report . get ( 'harmless_votes' , 0 ) , 'Malicious Votes' : report . get ( 'malicious_votes' , 0 ) } vt_reputation_string = "%d / %d" % ( report . get ( 'malicious_votes' , 0 ) , report . get ( 'harmless_votes' , 0 ) ) self . _add_result ( 'VirusTotal Reputation' , vt_reputation_string , vt_reputation ) else : status [ 'message' ] . append ( "Additional information not included in VT response." ) # Updating status information and returning if not status [ 'message' ] : status [ 'success' ] = True status [ 'message' ] = "Processed private sample vtmetadata." else : status [ 'message' ] = "\n" . join ( status [ 'message' ] ) return status