Go Back   CodingForums.com > :: Server side development > Ruby & Ruby On Rails

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-18-2011, 03:26 AM   PM User | #1
talfiq
New to the CF scene

 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
talfiq is an unknown quantity at this point
Ruby + clamAV

Hi,

I am newbie to both programming and Ruby.
But I need to complete this task - analyzing malware using ClamAV gem with Ruby.

I do not understand how to analyze a file, say "abc.exe" based on the documentation here;

http://rubydoc.info/gems/clamav/0.4.1/frames


Let's say I have a code snippet like this:

Code:
require 'rubygems'
require 'clamav'

#what else I have to put here?
#say the file is in /home/test/abc.exe
#and I put my Ruby code, test.rb in /home/test/
I saw this function(?), method(?)

ClamAV#scanfile(filename[, options])

How should I put the function? Is it something like;

Code:
ClamAV#scanfile('/home/test/abc.exe',CL_SCAN_RAW)
If so, how can I print out the result?
talfiq is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:28 PM.


Advertisement
Log in to turn off these ads.