https://github.com/widdix/attachmentav-sdk-js
A virus scan SDK for JavaScript. Scan files for viruses, trojans, and other kinds of malware with attachmentAV.
https://github.com/widdix/attachmentav-sdk-js
api javascript js malware virus virusscan
Last synced: 3 months ago
JSON representation
A virus scan SDK for JavaScript. Scan files for viruses, trojans, and other kinds of malware with attachmentAV.
- Host: GitHub
- URL: https://github.com/widdix/attachmentav-sdk-js
- Owner: widdix
- License: mit
- Created: 2025-07-10T09:42:55.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-11T07:32:49.000Z (3 months ago)
- Last Synced: 2025-07-11T10:53:16.788Z (3 months ago)
- Topics: api, javascript, js, malware, virus, virusscan
- Language: JavaScript
- Homepage: https://attachmentav.com
- Size: 78.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# attachmentav-sdk-js
A virus scan SDK for JavaScript. Scan files for viruses, trojans, and other kinds of malware with [attachmentAV](https://attachmentav.com).
## Getting started
First, install the module.
```sh
npm i @widdix/attachmentav-sdk-js
```Second, [subscribe to the attachmentAV API (SaaS)](https://attachmentav.com/subscribe/api/) or [install attachmentAV API (Self-hosted on AWS)](https://attachmentav.com/help/virus-malware-scan-api-aws/setup-guide/#installation).
Third, send scan request. Make sure, to
```js
const attachmentav = require('@widdix/attachmentav-sdk-js');
const fs = require('fs');const ATTACHMENTAV_API_KEY = 'your api key';
var defaultClient = attachmentav.ApiClient.instance;
var apiKeyAuth = defaultClient.authentications['apiKeyAuth'];
apiKeyAuth.apiKey = ATTACHMENTAV_API_KEY;var api = new attachmentav.AttachmentAVApi()
api.scanSyncBinaryPost(fs.readFileSync('/path/to/file'), function(err, data, response) {
if (err) {
console.log(err);
} else {
console.log(JSON.stringify(data));
}
});
```The request returns a scan result similar to the following example.
```
{"status":"clean","size":"1024","realfiletype":"..."}
```