API
Barcode API  Currency API  Image Recognition & Processing API  Document & Conversion API  OCR API  Security API  Validate API  Video API  Virus Scan API  NLP API 

Step 1 - Install the Client SDK






Step 2 - Get Started with Example Code

/virus/scan/cloud-storage/aws-s3/single
Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/aws-s3/single/advanced
Advanced Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/azure-blob/single
Scan an Azure Blob for viruses
/virus/scan/cloud-storage/azure-blob/single/advanced
Advanced Scan an Azure Blob for viruses
/virus/scan/cloud-storage/gcp-storage/single
Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/gcp-storage/single/advanced
Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/sharepoint-online/site/advanced
Advanced Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/cloud-storage/sharepoint-online/site/single
Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/file
Scan a file for viruses
/virus/scan/file/advanced
Advanced Scan a file for viruses
/virus/scan/website
Scan a website for malicious content and threats

Scan a file for viruses

Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.

package main

import (
     "fmt"
     "bytes"
     "mime/multipart"
     "os"
     "path/filepath"
     "io"
     "net/http"
     "io/ioutil"
)

func main() {

     url := "https://api.cloudmersive.com/virus/scan/file"
     method := "POST"

     payload := &bytes.Buffer{}
     writer := multipart.NewWriter(payload)
     file, errFile1 := os.Open("/path/to/file")
     defer file.Close()
     part1,
         errFile1 := writer.CreateFormFile("inputFile",filepath.Base("/path/to/file"))
     _, errFile1 = io.Copy(part1, file)
     if errFile1 != nil {
          fmt.Println(errFile1)
          return
     }
     err := writer.Close()
     if err != nil {
          fmt.Println(err)
          return
     }


     client := &http.Client {
     }
     req, err := http.NewRequest(method, url, payload)

     if err != nil {
          fmt.Println(err)
          return
     }
     req.Header.Add("Content-Type", "multipart/form-data")
     req.Header.Add("Apikey", "YOUR-API-KEY-HERE")

     req.Header.Set("Content-Type", writer.FormDataContentType())
     res, err := client.Do(req)
     if err != nil {
          fmt.Println(err)
          return
     }
     defer res.Body.Close()

     body, err := ioutil.ReadAll(res.Body)
     if err != nil {
          fmt.Println(err)
          return
     }
     fmt.Println(string(body))
}