Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
avast-client
Advanced tools
Connects to Avast scanner daemon and scans files for viruses.
const AvastClient = require('avast-client');
const scanner = new AvastClient();
scanner.scan('virus.exe', fs.readFileSync('virus.exe'), (err, response)=>{
console.log(err || response);
// you can keep using the same scanner instance until you call quit()
scanner.quit();
});
Return current flags as an object with key:value pairs where key is a flag and value is a boolean indicating if the flag is set or not
scanner.getFlags((err, flags) => {
console.log(flags);
});
Example response
{ fullfiles: false, allfiles: true, scandevices: false }
Allows to change flags. Returns current flags as an object with key:value pairs where key is a flag and value is a boolean indicating if the flag is set or not
scanner.setFlags({ allfiles: false, fullfiles: true }, (err, flags) => {
console.log(flags);
});
Example response
{ fullfiles: true, allfiles: false, scandevices: false }
Return current sensitvity as an object with key:value pairs where key is an option and value is a boolean indicating if the sensitivity option is set or not
scanner.getSensitivity((err, opts) => {
console.log(opts);
});
Example response
{ worm: true,
trojan: true,
adware: true,
spyware: true,
dropper: true,
kit: true,
joke: true,
dangerous: true,
dialer: true,
rootkit: true,
exploit: true,
pup: true,
suspicious: true,
pube: true }
Allows to change sensitvity options. Return current sensitvity as an object with key:value pairs where key is an option and value is a boolean indicating if the sensitivity option is set or no
scanner.setSensitivity({ dialer: false }, (err, opts) => {
console.log(opts);
});
Example response
{ worm: true,
trojan: true,
adware: true,
spyware: true,
dropper: true,
kit: true,
joke: true,
dangerous: true,
dialer: false,
rootkit: true,
exploit: true,
pup: true,
suspicious: true,
pube: true }
Return current packer settings as an object with key:value pairs where key is an option and value is a boolean indicating if the packer option is set or not
scanner.getPack((err, opts) => {
console.log(opts);
});
Example response
{ mime: true,
zip: true,
arj: true,
rar: true,
cab: true,
tar: true,
gz: true,
bzip2: true,
ace: true,
arc: true,
zoo: true,
lharc: true,
chm: true,
cpio: true,
rpm: true,
'7zip': true,
iso: true,
tnef: true,
dbx: true,
sys: true,
ole: true,
exec: true,
winexec: true,
install: true,
dmg: true }
Allows to change packer options. Return current packer settings as an object with key:value pairs where key is an option and value is a boolean indicating if the packer option is set or not
scanner.setPack({ mime: false }, (err, opts) => {
console.log(opts);
});
Example response
{ mime: false,
zip: true,
arj: true,
rar: true,
cab: true,
tar: true,
gz: true,
bzip2: true,
ace: true,
arc: true,
zoo: true,
lharc: true,
chm: true,
cpio: true,
rpm: true,
'7zip': true,
iso: true,
tnef: true,
dbx: true,
sys: true,
ole: true,
exec: true,
winexec: true,
install: true,
dmg: true }
Allows to check if an url is blacklisted or not
scanner.checkUrl('http://www.google.com/', (err, status) => {
if (status) {
console.log('URL is OK');
} else {
console.log('URL is blacklisted');
}
});
Get current virus definitions version. Return the version number as a string.
scanner.getVPS((err, version) => {
console.log(version);
});
Scans a buffer or a stream and returns scan result
scanner.scan(filename, data, callback)
Where
scanner.scan('message.eml', fs.readFileSync('/var/mail/message.eml'), (err, result) => {
console.log(result);
});
Example response
{ status: 'infected', message: 'Win32:Malware-gen' }
Closes the socket to the daemon and does not allow to use this instance anymore.
MIT
FAQs
Client for Avast scanner
We found that avast-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.