-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvtdemo.dpr
51 lines (46 loc) · 1.1 KB
/
vtdemo.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
program vtdemo;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
vcl.forms,
System.Generics.Collections,
VirusTotal in 'VirusTotal.pas',
config in 'config.pas';
Var
VT: TVirusTotalAPI;
i : Integer;
j : Integer;
ResultScan: TObjectList<TvtURLReport>;
urls : TArray<String>;
fileResult : TvtFileSend;
begin
VT := TVirusTotalAPI.Create;
VT.ApiKey := ConfigAPIKey;
try
try
setlength(urls, 2);
urls[0] := 'https://codmasters.ru/';
urls[1] := 'https://www.tysontechnology.com.au';
ResultScan := VT.reportURL(urls, True);
for i := 0 to length(urls) - 1 do
begin
for j := 0 to ResultScan[i].scans.Count - 1 do
begin
Writeln(ResultScan[i].scans[j].scanner);
Writeln(ResultScan[i].scans[j].detected);
Writeln(ResultScan[i].scans[j].result);
end;
end;
fileResult := VT.ScanFile('vtdemo.exe');
Writeln('sha256: ', fileResult.sha256);
Writeln('permalink:'+ fileResult.permalink);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
finally
FreeAndNil(VT);
end;
Readln;
end.