VirusTotal.com Uploader & Buttons

VirusTotal.com is a service i use almost daily, it allows you to upload and scan files for viruses/malware before executing them on your system.

They provide an .exe uploader which allows you to upload, scan files and view the results all with a single click in Opus. So all you need to do once installed, is select a file on your system then click the VirusTotal button in Opus and it will upload it and open your default browser on the results page.

To Install:

The uploader is located here on the VirusTotal.com website, download and install it.

Button Code:

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
   <label>VirusTotal Upload</label>
   <icon1>C:\Program Files\VirusTotalUploader\VirusTotalUpload.exe,0</icon1>
   <function type="normal">
      <instruction>&quot;C:\Program Files\VirusTotalUploader\VirusTotalUpload.exe&quot; {f}</instruction>
   </function>
</button> 

The button uses the default one from the VirusTotal uploader program which is kind of ugly.

.Zip Includes:

  • 20x20 .png
  • 32x32 .png
  • 32x32 .ico
  • Text File with Button Code from above

Just edit the button and use one of the nicer ones in whatever size/format you like. Sorry i'm only a new Opus user, so not sure how to package all this up in a .dop file yet but i hope this is easy enough to understand.

VirusTotal-Buttons.zip (2.23 KB)

1 Like

Handy, thanks!

A small tip: Rather than pasting the button code in a .txt file and putting that in the zip, create a .dcf file file instead and put that in the zip. To create a .dcf file, while in customize mode, drag the button from your toolbar/menu into a folder.

The content of the .dcf file will be almost the same but it'll be possible for people to drag the file back to their toolbars without the open, copy & paste steps.

You can also double-click .dcf files to execute them from outside of Opus. Handy for putting Opus commands in the Quick Launch bar and things like that. (For running Opus commands in scripts there is a better way: Using dopusrt.exe.)

Thanks Leo! Wow that's powerful stuff, i though being able to paste code in to the toolbar was amazing.. I never imagined i could do the reverse and drag it back out. :open_mouth:

I will definitely do it that way from now on, thanks for the tip! I cannot believe how brilliant Opus is, it was expensive for me but worth every penny.

1 Like

Thanks sweetfunny, really handy ! :astonished:

Hey sweetfunny..Tnx..This looks very useful. :smiley:

Thanks for this nice button! :slight_smile:

Little Update, because they added a "2" naming the exe-file:

<?xml version="1.0"?>
<button backcol="none" display="icon" icon_size="large" separate="yes" textcol="none">
	<label>VirusTotal Upload</label>
	<icon1>C:\Program Files\VirusTotalUploader2\VirusTotalUpload2.exe,0</icon1>
	<function type="normal">
		<instruction>&quot;C:\Program Files\VirusTotalUploader2\VirusTotalUpload2.exe&quot; {f}</instruction>
	</function>
</button>

The VirusTotal uploader does not exist anymore: http://www.virustotal.com/metodos.html
Is there any other button to upload a selected file to VirusTotal?

I think it can be done by button with JScript and VirusTotal API key. Unfortunately I'm not a programmer so here's what I done.

  1. Get free personal VirusTotal API key by sign-up free account from VirusTotal web site.
  2. Download and install https://github.com/SamuelTulach/VirusTotalUploader.
  3. Run VirusTotalUploader
  4. Input your VirusTotal API key in setting of VirusTotalUploader.
  5. Use my button and recreated pixel perfect icon for DP.
  6. Select file and click the button.

VirusTotal.dcf (537 Bytes)
VirusTotal_24

3 Likes

This code is a variation. It doesn't need a 3rd party app. I made it to work only if there is 1 file selected. It generates SHA-256, append it to the VirusTotal URL and opens it in your default browser.

function OnClick(clickData)
{
	var cmd = clickData.func.command;
	cmd.deselect = false; // Prevent automatic deselection
	// --------------------------------------------------------
	var dlg = clickData.func.Dlg;
	dlg.title = "VirusTotal";
    dlg.buttons = "OK";
    dlg.icon = "warning";
    
	var sha256;
	if (clickData.func.sourcetab.selected.count == 0) 	{
		dlg.message = "Select 1 file.";
	    dlg.Show;
	}
	else if (clickData.func.sourcetab.selected.count > 1) 	{
		dlg.message = "Select 1 file only.";
	    dlg.Show;
	}
	else {
		for (var eSel = new Enumerator(clickData.func.sourcetab.selected); !eSel.atEnd(); eSel.moveNext()) {
			if (eSel.item().is_dir) {
				dlg.message = "Select 1 file instead of a folder.";
	    		dlg.Show;
			}
			else {
				DOpus.Output("Generating SHA-256 hash for file: " + eSel.item().RealPath);

				// sha256 = DOpus.FSUtil.Hash(eSel.item().RealPath, "sha256");
				// This approach is better to show the progress dialog on big files
				cmd.RunCommand("Clipboard COPYNAMES=hash:sha256,fmt:3");
				sha256 = DOpus.GetClip();
				
				DOpus.Output(sha256 + " : " + eSel.item().RealPath);
				DOpus.Output("");
				
				// DOpus.SetClip(sha256);
				
				cmd.RunCommand("explorer https://www.virustotal.com/gui/file/" + sha256);
			}
		}
	}
	
}

Another option is to remove the if else that limits 1 file and use @disablenosel:numfiles=1 in the Modifiers tab or whatever you prefer.

function OnClick(clickData)
{
	// --------------------------------------------------------
	// DOpus.ClearOutput();
	// --------------------------------------------------------
	var cmd = clickData.func.command;
	cmd.deselect = false; // Prevent automatic deselection
	// --------------------------------------------------------
	var sha256;

	var dlg = clickData.func.Dlg;
	dlg.title = "VirusTotal";
    dlg.buttons = "OK";
    dlg.icon = "warning";
    
	var rp = clickData.func.sourcetab.GetFocusItem().realpath;

	DOpus.Output("Generating SHA-256 hash for the file: " + rp);

	sha256 = DOpus.FSUtil.Hash(rp, "sha256");
	
	DOpus.Output(sha256 + " : " + rp);
	DOpus.Output("");

	cmd.RunCommand("explorer https://www.virustotal.com/gui/file/" + sha256);
}

You can also use the VirusTotal API, so no need to third party apps or a browser

1 Like

That is really nice!