clamscan | robust ClamAV virus scanning library supporting scanning | TCP library
kandi X-RAY | clamscan Summary
kandi X-RAY | clamscan Summary
As of version v1.0.0, this module supports communication with a local or remote ClamAV daemon through Unix Domain sockets or a TCP host/port combo. If you supply both in your configuration object, the UNIX Domain socket option will be used. The module will not not fallback to using the alternative Host/Port method. If you wish to connect via Host/Port and not a Socket, please either omit the socket property in the config object or use socket: null. If you specify a valid clamscan/clamdscan binary in your config and you set clamdscan.localFallback: true in your config, this module will fallback to the traditional way this module has worked--using a binary directly/locally.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of clamscan
clamscan Key Features
clamscan Examples and Code Snippets
Community Discussions
Trending Discussions on clamscan
QUESTION
I have a simple python3 script running on ubuntu server 20.04 that tries to call clamd (clamav-daemon process) library to scan a file. The scan ping() and version() function all work correctly. However when I actually do a test write and scan, i get the following error:
...ANSWER
Answered 2021-Mar-24 at 17:18I believe the solution to the problem here is that AppArmour is blocking clamd for that particular directory. I would look at the AppArmour profile for clamd. It should be called something like /etc/apparmor.d/clamav or similar. You can adjust that profile or alternatively disable it (according to Ubuntu):
QUESTION
When I tried to Scan the /home directory I got this error.
...ANSWER
Answered 2021-Jan-18 at 10:14You will need to use the command:
QUESTION
How can i perform the scan for the files that comes as a request payload that if it is a potential virus or not? For ex. if some body saves a EICAR signature as a txt file and tries to upload it , i want to scan and reject it if in case it is a virus file.
I have checked clamscan but unable to understand what to specify in path here:-
...ANSWER
Answered 2020-Jul-24 at 17:47The clamscan library available via NPM is a wrapper around the real clamscan program which is part of ClamAV.
You need to install ClamAV. That will include a program in a file named clamscan. You put the path to that program in that string.
QUESTION
I'm living my worse nightmare. I have an CentOS server, that is hosting 10s of WordPress website.
My clients notice that their websites are opening and after loading it is redirected to (fast.destinyfernandi.com) <---- Malware website.
I used ClamAV to detect the malware and clean them manually, without any success.
Here is the example of the Clamscan command result of one of the website:
...ANSWER
Answered 2020-Feb-25 at 11:08There are several ways how your web resource could be redirected to destinyfernandi.
- database could be patched and your own ligitimate code does redirect
- some injected code in php or JS or html templates does redirect either via window.location or meta or headers of response.
First discover what address you gets redirected to , whether it is destinyfernandi or some other URL. I mean you could be redirected to some "invisible" URL1 and server which servicing URL1 would redirect browser further to destinyfernandi.
Once you discover what is the first hop (URL) in redirects you can search for bad URL in source code and database dump.
There is also a chance that first hop URL ( most likely destinyfernandi) is obfuscated in your code but lets hope it is not the case.
You can also add break point which fires on redirects which could help you to identify obfuscated piece of JS code:
QUESTION
I'd like to use notify-send from within a bash script that is running in the background to inform the user about the progress of the script. More specifically this is a script that automagically runs when a USB flash drive is inserted and runs a scan with ClamAV.
Specifically at line 30 and line 66. So far, I'm not having any luck. Can someone give me some advice/help? Thanks.
...ANSWER
Answered 2017-Oct-16 at 22:19Depending on how you are running the script it may not have access to the display variable. Try running export DISPLAY=:0.0
prior to the command.
If you are running the script as a different user, ie root, then you may also need to run it as su - -c notify-send ...
(I usually don't need to do this, but I remember having to at one point - but I cant recall which distro or version I was on at the time.)
QUESTION
My OS: Centos 7, using laravel 5.8, php 7.1:
I using Clamav.php at: https://github.com/kissit/php-clamav-scan to scan virus of a file:
Changed setting of socket file:
...ANSWER
Answered 2019-Sep-19 at 23:08Try this solution, it works for me
QUESTION
I am currently having an issue with ClamAV and freshclam on Centos 6.9.
I have the last Clam engine 0.99.2, and a working internet connection.
Even if I run the # freshclam -v
command ( it only returns a security warning about unsecure permission of freshclam.conf) before a # clamscan
, clamAV return me this warning :
LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days. ***
LibClamAV Warning: *** Please update it IMMEDIATELY! ***
LibClamAV Warning: **************************************************
So my questions are : how can I know when the last update was done ? Or make sure the virus database is up-to-date ?
PS : I've tested the clamscan with eicar test file and it detects it.
...ANSWER
Answered 2017-Apr-20 at 09:43You have 2 questions:
- How can I know when the last update was done ?
host -t txt current.cvd.clamav.net; perl -e 'printf "%d\n", time;'
This will tell you when clamav made available the last update.
- Make sure the virus database is up-to-date ?
First you need to understand why you get the security warning. If you post the warning here maybe we'd have a better chance to help you.
Then I recommend you look in the log at /var/log/clamav/freshclam.log
Also, if you have selinux enabled, you'd have to run this: setsebool -P antivirus_can_scan_system 1
. If by any chance the error is something like this During database load : LibClamAV Warning: RWX mapping denied: Can't allocate RWX Memory: Permission denied
then clearly your solution is the command I mentioned above.
QUESTION
I'm using Python to run a subprocess of a command that scans a USB drive for viruses using ClamScan, the command works perfectly when executed in the terminal but when I run it within my Python script it creates the temporary output file but the file does not contain the expected results, where as running it directly gives the expected result.
...ANSWER
Answered 2019-Sep-16 at 09:30I'm not sure if redirection works using '>' inside python. You can use the subprocess.Popen() function, which allows more control over the input/output. The output from stdout can be redirected to a file for instance:
QUESTION
I'm writing a shell script that builds and edits an html file whose main content is basically clamscan's (ClamAV) output. So, the script's mission is : translating the output, removing unhelpful stuff, adding html tags and so on. Though, i'm stuck with the last modification i want.
One part of the edited output from clamscan looks like this :
...ANSWER
Answered 2018-Jul-19 at 23:21$ sed -E 's#[^:]+/([^:!]+).*: #\1: #' file
infected-file: Eicar-Test-Signature FOUND
infected-zipfile: Eicar-Test-Signature FOUND
infected-zipfilewithinzipfile: Eicar-Test-Signature FOUND
QUESTION
Working on a React/Django app. I have files being uploaded by users through the React front-end that end up in the Django/DRF back-end. We have antivirus (AV) running on the server constantly, but we want to add stream scanning before it is written to disk.
It is a bit over my head as how to set it up. Here are a few sources I am looking at.
How do you virus scan a file being uploaded to your java webapp as it streams?
Although accepted best answer describes it being "... quite easy" to setup, I'm struggling.
I apparently need to cat testfile | clamscan -
per the post and the corresponding documentation:
How do you virus scan a file being uploaded to your java webapp as it streams?
So if my back-end looks like the following:
...ANSWER
Answered 2018-May-24 at 19:06Ok, got this working with clamd. I modified my SaveDocumentAPIView
to the following. This scans the files before they are written to disk and prevents them from being written if they infected. Still allows uninfected files through, so the user doesn't have to re-upload them.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install clamscan
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page