The official unscan library and CLI for Node.js
For programmatic use, install unscan as a project dependency.
npm i unscanNote: Unscan doesn't require an API key.
The following code shows how the library can be used to scan for nsfw content in a file. Check the examples folder for more examples.
const unscan = require('unscan')
// Check a file location
unscan.nsfw.file('./localFile.png')
// Check a stream
unscan.nsfw.stream(streamHere)The following code shows how the library can be used to scan for malware content in a file. Check the examples folder for more examples.
const unscan = require('unscan')
// Check a file location
unscan.malware.file('./localFile.exe')
// Check a stream
unscan.malware.stream(streamHere)The following code shows how the library can be used to scan links and give them a tag. This allows you to check if a website is, for example,a dating site or an adult themed site. Check the examples folder for more examples.
const unscan = require('unscan')
// Check a link
unscan.link.scan('lngzl.nl')Run the following command to install unscan globally.
npm i -g unscanAfter installing the unscan globally, you can scan for files and links using the unscan command.
unscan nsfw ../acid-burn.pngExample result:
The file has been scanned
{
"success": true,
"nsfw": false,
"scores": {
"safe": 59,
"nsfw": 0
},
"guess": {
"safe": true,
"nsfw": false
},
"argumentation": {
"neutral": 59,
"drawing": 40,
"hentai": 0,
"sexy": 0,
"porn": 0
}
}
unscan malware ../crash-override.exeExample result:
The file is infected
{
"success": true,
"infected": true,
"malware": [
"Win.Test.EICAR_HDB-1"
]
}
unscan link http://lord-nikon.onlineExample result:
Link found in database
{
"success": true,
"safe": false,
"tags": [
"PORN",
"PHISHING"
]
}
The code isn't the cleanest and has to be more organized in the future but it does it's thing.
The library is licensed under the MIT license.