Asyncio library for Avast antivirus
Project description
asyncio (PEP 3156) Avast Linux support
Features
Scanning files and/or directories.
Checking URLs.
Exclude files from the scanning.
Get and set the list of enabled or disabled pack and flags.
Requirements
Python >= 3.3
License
aioavast is offered under the MIT license.
Source code
The latest developer version is available in a github repository: https://github.com/earada/aioavast
Getting started
Scanning
Scan a file and prints its output:
import asyncio
from aioavast import Avast
@asyncio.coroutine
def scan(item):
av = Avast()
yield from av.connect()
return (yield from av.scan(item))
if __name__ == '__main__':
loop = asyncio.get_event_loop()
results = loop.run_until_complete(scan('/bin/ls'))
print(results)
You can check an url too:
return (yield from av.checkurl('http://python.org'))
Exclude items
There is also a possibility to exclude certain files from being scanned.
import asyncio
from aioavast import Avast
@asyncio.coroutine
def dont_scan(item):
av = Avast()
yield from av.connect()
yield from av.exclude(item)
return (yield from av.scan(item))
if __name__ == '__main__':
loop = asyncio.get_event_loop()
results = loop.run_until_complete(scan('/bin/ls'))
print(results)
You can retrieve excluded items by:
excluded = yield from av.exclude()
Other methods
You could modify Flags and Packs too.
flags = yield from av.flags()
yield from av.flags("-allfiles")
packs = yield from av.pack()
yield from av.flags("-ole")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioavast-1.0.0.tar.gz
(2.9 kB
view details)
File details
Details for the file aioavast-1.0.0.tar.gz
.
File metadata
- Download URL: aioavast-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf68973fdcb87e32d465205341956b9aba015ad7c5a6c7684feb93fe6ccfa928 |
|
MD5 | 8fda96227ee5196183ef2d8453d20d78 |
|
BLAKE2b-256 | 2f357c134de84c4dae084e4aff4ac94e8919c7912d1f69fed9a44fe4afadbf40 |