Scan a file for malware
curl --request POST \
--url https://6465762e76312e7363616e.slayers.tech/api/scan \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://6465762e76312e7363616e.slayers.tech/api/scan"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://6465762e76312e7363616e.slayers.tech/api/scan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detections": [
[
"Avast",
"Malware"
],
[
"Kaspersky",
"Trojan"
]
],
"file_hash": {
"md5_hash": "5d41402abc4b2a76b9719d911017c592",
"sha256_hash": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
"has_detections": true,
"metadata": {
"FileSize": "1024 bytes",
"FileType": "PDF"
},
"num_detections": 2
}
API Reference
Scan file
Scan a file for malware and return detection results.
POST
/
api
/
scan
Scan a file for malware
curl --request POST \
--url https://6465762e76312e7363616e.slayers.tech/api/scan \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://6465762e76312e7363616e.slayers.tech/api/scan"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://6465762e76312e7363616e.slayers.tech/api/scan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detections": [
[
"Avast",
"Malware"
],
[
"Kaspersky",
"Trojan"
]
],
"file_hash": {
"md5_hash": "5d41402abc4b2a76b9719d911017c592",
"sha256_hash": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
"has_detections": true,
"metadata": {
"FileSize": "1024 bytes",
"FileType": "PDF"
},
"num_detections": 2
}
Scan file
Uploads a file to be scanned. The request ismultipart/form-data.
Form fields
file(required): the file to scanapikey(optional): alternative to theX-API-Keyheaderdevicename(optional): alternative to theX-Device-Nameheader
Headers
User API key for authentication
Name of the device making the request
Body
multipart/form-data
Response
Scan completed successfully
