kylefarris / clamscan

A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
MIT License
236 stars 69 forks source link

API to scan a byte stream #20

Closed adisrika closed 5 years ago

adisrika commented 6 years ago

I don't see an API mentioned in documentation that will allow me to pass the byte stream. Only option seems to be file location. Just want to know if there is any way to pass the full byte stream of the file to the scan API.

Note: We don't want to store the file on local before calling scan due to limited size of disk space.

kylefarris commented 6 years ago

I started a branch called 'sockets' a while back. It's not fully tested/complete but it may get you what you need. Try it out. If there are any bugs (probably are), please feel free to commit the fixes to that branch.

I still need to write some unit tests for it too.

Been really busy with everything. Sorry for the late response.

kylefarris commented 5 years ago

Version 1.0.0 is out and supports this feature.