Test 2 : io stream clamav analyse
This commit is contained in:
parent
1a3c19f48c
commit
d01b3356c6
3 changed files with 13 additions and 5 deletions
|
@ -1,6 +1,12 @@
|
|||
class ClamavService
|
||||
def self.safe_file? path
|
||||
def self.safe_io_data? io_data
|
||||
client = ClamAV::Client.new
|
||||
|
||||
io = StringIO.new(io_data)
|
||||
|
||||
response = client.execute(ClamAV::Commands::InstreamCommand.new(io))
|
||||
|
||||
puts response
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue