Comments (11)
I'm open to any ideas! Could you elaborate on exactly what you're looking for?
from clamscan.
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.
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.
18 Commits in. Almost there. Just need to tweak a few things and write some tests.
from clamscan.
Nice job Kyle!
do you want help in anything?
from clamscan.
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.
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.
There is no problem about it Kyle. Where did you stop? Could i help you?
from clamscan.
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.
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.
Version 1.0.0 is out and supports this feature. Finally.
from clamscan.
Related Issues (20)
- Frequent failed clamAV scan fails HOT 2
- Premature end of ClamAV socket stream behind telepresence proxy HOT 18
- Clamav file size limit - throw custom error HOT 10
- Socket times out when remote scanning EICAR test file HOT 7
- node-clam: Could not verify the clamdscan binary HOT 2
- scanStream returning isInfected = true even when its not HOT 4
- Receiving null response from ScanFile HOT 2
- Missing error handler for tcp client
- TypeError: clamscan.isInfected is not a function HOT 1
- Retry on ECONNREFUSED for ClamAV using TCP sockets HOT 1
- No/Empty Response HOT 1
- Virus analysis tools should use local heuristical analysis/sandboxes plus artificial CNS HOT 4
- 3.8 GB file gives issue - RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range HOT 2
- node 16 and aws-sdk HOT 2
- Clam API Server HOT 1
- Occasionally getting the 502 Proxy error while running this clamscan service on the Prod server. HOT 3
- scanDir do not return an array of files HOT 10
- Fix code scanning alert - Inefficient regular expression
- execFile & Clamdscan result parsing HOT 4
- Chunked passthrough? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clamscan.