I was playing around with the virustotal api today while becoming back the result in this form:
{ "permalink" : "http://www.virustotal.com/file-scan/report.html?id=7b6b268cbca9d421aabba5f08533d3dcaba50e0f7887b07ef2bd66bf218b35ff-1304089592",
"report" : [ "2011-04-29 15:06:32",
{ "AVG" : "Exploit_c.TVH",
"AhnLab-V3" : "PDF/Exploit",
"AntiVir" : "EXP/Pidief.UK",
"Antiy-AVL" : "Trojan/win32.agent",
"Avast" : "JS:Pdfka-gen",
"Avast5" : "JS:Pdfka-gen",
"BitDefender" : "Exploit.PDF-JS.Gen",
"CAT-QuickHeal" : "",
"ClamAV" : "",
"Comodo" : "Exploit.JS.Pidief.~AWQ",
"DrWeb" : "",
"Emsisoft" : "Exploit.JS.Pdfka!IK",
"F-Prot" : "",
"F-Secure" : "Exploit:W32/Pidief.DEE",
"Fortinet" : "",
"GData" : "",
"Ikarus" : "Exploit.JS.Pdfka",
"Jiangmin" : "",
"K7AntiVirus" : "",
"Kaspersky" : "Exploit.JS.Pdfka.dnc",
"McAfee" : "",
"McAfee-GW-Edition" : "",
"Microsoft" : "Exploit:Win32/Pdfjsc.NJ",
"NOD32" : "PDF/Exploit.Pidief.PGD",
"Norman" : "",
"PCTools" : "Trojan.Pidief",
"Panda" : "",
"Prevx" : "",
"Rising" : "",
"SUPERAntiSpyware" : "",
"Sophos" : "Troj/PDFJs-RD",
"Symantec" : "Trojan.Pidief",
"TheHacker" : "",
"TrendMicro" : "TROJ_PIDIEF.VTG",
"TrendMicro-HouseCall" : "TROJ_PIDIEF.VTG",
"VBA32" : "",
"VIPRE" : "Exploit.PDF-JS.Gen (v)",
"ViRobot" : "PDF.S.Exploit.74634",
"VirusBuster" : "",
"eSafe" : "",
"eTrust-Vet" : ""
}
],
"result" : 1
}
I would like to know how one can parse this result to fill a memo like:
Memo1.Lines.Add(Format('Antivirus: %0s Result: %1s', [...]));
Well, I really have no clue about all the JSon components which might be around to maybe someone can direct me to the right direction here?
Kindest regards,
H.Meiser
Parsing Json string is not difficult, you can use the
DBXJSONunit included since delphi 2010.check this sample code
As additional recommendation you must read a Json tutorial to learn how interpret the Json format and in this way you must be preparated to use any library available.