病毒检测率

  1. response = requests.get( strURL , headers = headers )
  2. nStatus = response.status_code
  3. if nStatus == 200:
  4. dataTEXT = response.text
  5. dataJSON = json.loads( dataTEXT )
  6. dataAnalysis = dataJSON["data"]["attributes"]["last_analysis_stats"]
  7. nMalicious = dataAnalysis["malicious"]
  8. nUndetected = dataAnalysis["undetected"]
  9. nTotal = nMalicious + nUndetected
  10. strDetected = "%d/%d" % (nMalicious , nTotal)
  11. listDetection.append( [strDetected , iHash] )