Giter VIP home page Giter VIP logo

Comments (11)

kylefarris avatar kylefarris commented on May 24, 2024

I'm open to any ideas! Could you elaborate on exactly what you're looking for?

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

Ohhh... I think you mean supporting a remote clamscan server via TCP socket. I definitely think this could be possible but it would take a bit of work. Would you like to try and get this to work? If not, I can put this on the backburner as a really good idea that I don't exactly have time to work on at the moment.

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

I've made a new branch called sockets and committed some code to it. The idea was intriguing enough that I think I'll try and get this working sooner rather than later.

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

18 Commits in. Almost there. Just need to tweak a few things and write some tests.

from clamscan.

nicolaspeixoto avatar nicolaspeixoto commented on May 24, 2024

Nice job Kyle!
do you want help in anything?

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

Thanks! I've learned a lot—it's been fun. I think I've got it, though. I'll let you know when I I've lost completed it and you can clone it and test it in your environment to make sure it works as expected. I'll wait for your response before publishing to NPM.

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

I just wanted to say that I haven't given up on this, I've just been busy. They code is more or less done at this point, I'm just still working on the test cases and making sure it will work perfectly for everyone when it gets released.

Thanks for your patience--I'm doing this in between my job and other side projects.

from clamscan.

nicolaspeixoto avatar nicolaspeixoto commented on May 24, 2024

There is no problem about it Kyle. Where did you stop? Could i help you?

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

Hey @nicolaspeixoto. Well, you got me motivated tonight so I finished writing the tests. Everything seems to be working. I haven't run it through any kind of rigorous real-world examples, yet, but, I think it should work just fine.

What you can do to help is checkout the sockets branch of the repository and see if you can run it through some real examples of how you're planning on using it and get back to me with any issues you might come across. I really want to make sure this is working perfectly before I merge back to Master and push out version 0.9.0 on NPM.

If you could do that, I'd be incredibly grateful. Don't test it on live stuff! :D

from clamscan.

nicolaspeixoto avatar nicolaspeixoto commented on May 24, 2024

Hey @kylefarris, i started to test with a simple script:

var clam = require('./')({
    remove_infected: true, // Removes files if they are infected
    quarantine_infected: '~/infected/', // Move file here. remove_infected must be FALSE, though.
    scan_recursively: false, // Choosing false here will save some CPU cycles
    scan_log: '/var/log/node-clam', // You're a detail-oriented security professional.
    debug_mode: true, // This will put some debug info in your js console
    clamdscan: {
        host: '127.0.0.1', // If you want to connect locally but not through socket
        port: 3310, // Because, why not
    },
    preference: 'clamdscan' // If clamscan is found and active, it will be used by default
});

clam.scan_file('/home/nicolas/mytest.pdf', function(){
    console.log("callback");
});

But the scan_file function didn't call the callback function. I think it didn't send the file to the Clamav server too.

This is the log from execution:

node-clam: Initially testing socket/tcp connection to clamscan server.
1: node-clam: Socket connection created: test_availability
node-clam: using remote server: 127.0.0.1:3310
node-clam: Established connection to clamscan server for testing!
2: node-clam: Socket connection created: scan_stream
node-clam: using remote server: 127.0.0.1:3310
node-clam: PING-PONG!
3: node-clam: Socket connection closed: test_availability
4: node-clam: Socket connection closed: scan_stream

from clamscan.

kylefarris avatar kylefarris commented on May 24, 2024

Version 1.0.0 is out and supports this feature. Finally.

from clamscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.