New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket support #7
Comments
I'm open to any ideas! Could you elaborate on exactly what you're looking for? |
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. |
I've made a new branch called |
18 Commits in. Almost there. Just need to tweak a few things and write some tests. |
Nice job Kyle! |
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. |
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. |
There is no problem about it Kyle. Where did you stop? Could i help you? |
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 If you could do that, I'd be incredibly grateful. Don't test it on live stuff! :D |
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 |
Version 1.0.0 is out and supports this feature. Finally. |
What do you think about support scan using tcp socket?
The text was updated successfully, but these errors were encountered: