Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit66;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TForm1 = class(TForm)
- Memo1: TMemo;
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- procedure ParseString(const AString:string);
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- Uses
- DBXJSON;
- {$R *.dfm}
- const
- JsonStr=
- '{ "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'+
- '}';
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- ParseString(JsonStr);
- end;
- procedure TForm1.ParseString(const AString: string);
- var
- json : TJSONObject;
- jPair : TJSONPair;
- jValue : TJSONValue;
- jcValue : TJSONValue;
- l,i : Integer;
- begin
- json := TJSONObject.ParseJSONValue(TEncoding.ASCII.GetBytes(AString),0) as TJSONObject;
- try
- jPair := json.Get(1);
- jValue := TJSONArray(jPair.JsonValue).Get(1);
- l:=TJSONArray(jValue).Size;
- for i:=0 to l-1 do
- begin
- jcValue := TJSONArray(jValue).Get(i);
- jPair := TJSONPair(jcValue);
- Memo1.Lines.Add(Format('Antivirus %s Result %s',[jPair.JsonString.Value,jPair.JsonValue.Value]));
- end;
- finally
- json.Free;
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement