Jump to content

Get eset odscan return code


Go to solution Solved by Marcos,

Recommended Posts

Can i get eset odscan command line return value in php script? 

We are using Eset File Security v4 command line scaner in php script to get scan result at the moment:

exec("/opt/eset/esets/sbin/esets_scan --clean-mode=none " . $fileToScan . " 2>&1", $output, $scanReturnCode);

at it saves output in $scanReturnCode variable.

By the way, if we try to use odscan from eset file security v8:

exec("/opt/eset/efs/bin/odscan --scan --profile=\"@Smart scan\" --readonly /var/www/shared/cpprod.error.log 2>&1", $output, $scanReturnCode);

It does not save output in $scanReturnCode variable.

Link to comment
Share on other sites

Sorry, help is not longer needed. I just needed to use @In-depth scan profile to scan for eicar test file in archives.  So:

exec("/opt/eset/efs/bin/odscan --scan --profile=\"@In-depth scan\" --readonly /var/www/test/eicarcom2.zip 2>&1", $output, $scanReturnCode);

is working like a charm!

Maybe this will help someone🙂

Archive that I've tested can be found in attachments.

 

Link to comment
Share on other sites

  • Administrators
  • Solution

Ok, so the problem was that that scan profile you used (Smart scan) had scanning of archives disabled.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...