clamscan | robust ClamAV virus scanning library supporting scanning | TCP library

 by   kylefarris JavaScript Version: v2.1.2 License: MIT

kandi X-RAY | clamscan Summary

kandi X-RAY | clamscan Summary

clamscan is a JavaScript library typically used in Networking, TCP, Nodejs applications. clamscan has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i clamscan' or download it from GitHub, npm.

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

            kandi-support Support

              clamscan has a low active ecosystem.
              It has 155 star(s) with 55 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 49 have been closed. On average issues are closed in 146 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of clamscan is v2.1.2

            kandi-Quality Quality

              clamscan has 0 bugs and 0 code smells.

            kandi-Security Security

              clamscan has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              clamscan code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              clamscan is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              clamscan releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of clamscan
            Get all kandi verified functions for this library.

            clamscan Key Features

            No Key Features are available at this moment for clamscan.

            clamscan Examples and Code Snippets

            No Code Snippets are available at this moment for clamscan.

            Community Discussions

            QUESTION

            Strange Behavior with clamd scan function
            Asked 2021-Mar-24 at 17:18

            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:18

            I 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):

            Source https://stackoverflow.com/questions/66785507

            QUESTION

            LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
            Asked 2021-Jan-18 at 11:05

            When I tried to Scan the /home directory I got this error.

            ...

            ANSWER

            Answered 2021-Jan-18 at 10:14

            You will need to use the command:

            Source https://stackoverflow.com/questions/65763994

            QUESTION

            Anti virus scan for the files to be uploaded to the server - Node.js
            Asked 2020-Jul-24 at 17:47

            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:47

            The 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.

            Source https://stackoverflow.com/questions/63078831

            QUESTION

            WordPress Malware - Redirect to (fast.destinyfernandi.com) - even after scan and clean
            Asked 2020-Feb-26 at 15:19

            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:08

            There are several ways how your web resource could be redirected to destinyfernandi.

            1. database could be patched and your own ligitimate code does redirect
            2. 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:

            Source https://stackoverflow.com/questions/60392846

            QUESTION

            notify-send from within a bash script
            Asked 2020-Jan-22 at 11:30

            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:19

            Depending 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.)

            Source https://stackoverflow.com/questions/46777581

            QUESTION

            ClamAV occur error socket_connect(): unable to connect [13]: Permission denied?
            Asked 2019-Nov-14 at 04:01

            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:08

            Try this solution, it works for me

            Source https://stackoverflow.com/questions/57855237

            QUESTION

            How to be sure ClamAV database is up to date?
            Asked 2019-Oct-25 at 17:16

            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:43

            You have 2 questions:

            1. 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.

            1. 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.

            Source https://stackoverflow.com/questions/43514853

            QUESTION

            Running Bash commands in Python causing incorrect results due to new line
            Asked 2019-Sep-16 at 09:30

            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:30

            I'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:

            Source https://stackoverflow.com/questions/57953478

            QUESTION

            sed -i '/$(command 1)/$(command 2)/' myHtmlFile ? Inline editing with sed and awk
            Asked 2018-Jul-22 at 11:11

            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
            

            Source https://stackoverflow.com/questions/51432386

            QUESTION

            Setting up a file upload stream scan using Clamav in a Django back-end
            Asked 2018-May-24 at 19:06

            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:06

            Ok, 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.

            Source https://stackoverflow.com/questions/50499161

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install clamscan

            All of the values listed in the example below represent the default values for their respective configuration item.

            Support

            Got a missing feature you'd like to use? Found a bug? Go ahead and fork this repo, build the feature and issue a pull request.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kylefarris/clamscan.git

          • CLI

            gh repo clone kylefarris/clamscan

          • sshUrl

            git@github.com:kylefarris/clamscan.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TCP Libraries

            masscan

            by robertdavidgraham

            wait-for-it

            by vishnubob

            gnet

            by panjf2000

            Quasar

            by quasar

            mumble

            by mumble-voip

            Try Top Libraries by kylefarris

            shredder

            by kylefarrisJavaScript

            ampersand-multiselect-view

            by kylefarrisJavaScript

            rethink2csv

            by kylefarrisJavaScript