22-11-2014, 02:27 PM
22-11-2014, 09:36 PM
لاضافته الى Right-Click Menu
![[صورة: AskxwS.png]](http://img673.imageshack.us/img673/8840/AskxwS.png)
الرجستري ( لا تنسوا تغيير مسار البرنامج )
![[صورة: AskxwS.png]](http://img673.imageshack.us/img673/8840/AskxwS.png)
PHP كود :
procedure TForm1.FormShow(Sender: TObject);
begin
if ParamStr(1)<>'' then
if FileExists(ParamStr(1)) then
begin
sTabSheet2.Show;
sEdit1.Text:=ParamStr(1);
sEdit2.Text:=CalcHash(ParamStr(1),haSHA1);
sSpeedButton1Click(Sender);
end;
listP
end;
PHP كود :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\vtuploader]
@="Send to VirusTotal"
"Icon"="C:\VirusTotal Uploader 3.0\Project1.exe,0"
[HKEY_CLASSES_ROOT\*\shell\vtuploader\command]
@="C:\VirusTotal Uploader 3.0\Project1.exe \"%1\""
23-11-2014, 07:08 PM
![[صورة: 41fO2r.png]](http://img746.imageshack.us/img746/9792/41fO2r.png)
PHP كود :
uses SuperObject;
procedure TForm2.sButton2Click(Sender: TObject);
var
FormData: TIdMultiPartFormDataStream;
json: string;
antivirus: string;
i:Word;
begin
if FileExists(sFilenameEdit1.Text) then
begin
try
sMemo1.Clear;
sListView1.Clear;
sStatusBar1.Panels[0].Text := 'Scanning ...';
if CalcHash2('onexite',haSHA1) <> '5afd5d81a23be8aecacca3ed430b0fd2de0e9f90' then Exit;
FormData := TIdMultiPartFormDataStream.Create;
FormData.AddFormField('resource',CalcHash(sFilenameEdit1.Text,haSHA1) ); ;
FormData.AddFormField('apikey','2090ad3f4550faf5350775062baa17f18762494d664f6286df8744ccd22149de');
IdHTTP1.Request.ContentType:='application/json';
json := IdHTTP1.Post('http://www.virustotal.com/vtapi/v2/file/report', FormData);
sMemo1.Lines.Add('PermaLink : ' + so(json)['permalink'].AsString);
sMemo1.Lines.Add('Scan id : ' + so(json)['scan_id'].AsString);
sMemo1.Lines.Add('Scan date : ' + so(json)['scan_date'].AsString);
sMemo1.Lines.Add('Founds : ' + so(json)['positives'].AsString+ '/' + so(json)['total'].AsString);
for i:=0 to (so(json)['total'].AsInteger-1) do
with sListView1.Items.Add do begin
antivirus:= so(json)['scans'].AsObject.getnames.AsArray[i].AsString;
Caption:= antivirus;
SubItems.Add(so(json)['scans'][antivirus]['detected'].AsString) ;
SubItems.Add(so(json)['scans'][antivirus]['version'].AsString) ;
SubItems.Add(so(json)['scans'][antivirus]['result'].AsString) ;
SubItems.Add(so(json)['scans'][antivirus]['update'].AsString) ;
end;
finally
FormData.Free
end;
sStatusBar1.Panels[0].Text :=so(json)['verbose_msg'].AsString;
end
else
sStatusBar1.Panels[0].Text := 'File Not Found';
end;
procedure TForm2.sListView1CustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Item.SubItems.Strings[2]<>'null' then
begin
Sender.Canvas.Brush.Color := sSkinManager1.GetGlobalColor;
Sender.Canvas.FillRect(Item.DisplayRect(drBounds));
end;
end;
//---------------------------------------------------------------------------
procedure SetAssociation;
begin
with TRegistry.Create(KEY_WRITE OR KEY_WOW64_64KEY) do begin
RootKey := HKEY_CLASSES_ROOT;
if KeyExists('\*\shell\vtuploader') then begin Free; Exit; end;
try
OpenKey('\*\shell\vtuploader', True) ;
WriteString('','Send to VirusTotal');
WriteString('Icon', ParamStr(0) + ',0');
CloseKey;
OpenKey('\*\shell\vtuploader\command', True) ;
WriteString('','"' + ParamStr(0) + '" "%1"');
CloseKey;
finally
Free;
end;
end;
end;
end.
02-12-2014, 09:40 PM
ما هى نسخه الدلفى التى يعمل عليها المثال ؟
![[صورة: tl16LW.png]](http://img673.imageshack.us/img673/729/tl16LW.png)