Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Virus scanner for attachments Details »
Virus scanner for attachments
Mod Version: 0.2a, by bahisyeri (Member) bahisyeri is offline
Developer Last Online: Apr 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.0 Rating: (3 votes - 5.00 average) Installs: 41
Released: 15 May 2008 Last Update: 19 May 2008 Downloads: 609
Not Supported Uses Plugins Template Edits Re-usable Code  

Hello guys and gals,
I was seeking for virus scanner addon for vBulletin 3.6.x , i found out one product for 3.5.8 Jafo232's addon but it was using fprot which is needing license and not free. So i decided do make it for 3.6.x and using LibClamAV.
It works fine and it's simple.
Here you go.
Thanks Jafo232 for his addon and idea and cheesegrits for his sample.

What does this plugin do?

This plugin let you have virus scanner for your forum's attachment managing.

Installing
Open your admin control panel and then
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-vscan.xml' from your computer then press 'Import'
This plugin uses ClamAV for scanning files there is two method available for scanning:
First method requires LibClamAV support on your php settings. You can check it on phpinfo. If you do not have ClamAV , You can download it free at here and faster than second method.If you can not find php-clamav due to problems from its publisher server. You can download php-clamavlib-0.13-src.zip which i attached or you can download compiled version clamav.zip or if you are using Debian based system just type apt-get install php5-clamavlib on your shell.
Second method uses clamscan binary of ClamAV does not require LibClamAV just installing ClamAV enough for it but its a bit slower than first method.
Please feel free to ask any questions
This may be copied, reproduced or published anywhere without my permission.

Current version: 0.2a
File name: plugin-vscan2.xml
Change history:
0.2a: Added function for scanning file if php does not have ClamAV support this function uses clamscan and no need libclamav support just installing ClamAV enough for this somehow its a bit slower than php-clamav module, and installing php-clamav strongly suggested.Who is using 0.1a and having php-clamav on their system do not need update because there is no change for php-clamav support but if you want to feel better you can update it.
0.1a: Addon written based from Jafo232's old but changed scanning method for using libclamav

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	scanner.png
Views:	1131
Size:	11.2 KB
ID:	80670  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Miscellaneous Hacks Virus scanner for attachments bahisyeri vBulletin 3.6 Add-ons 52 19 Sep 2008 20:34

Comments
  #2  
Old 15 May 2008, 05:48
Kaycee123 Kaycee123 is offline
 
Join Date: Jun 2007
Thanks - I never thought of a virus scanner for attachments!
__________________
Reply With Quote
  #3  
Old 15 May 2008, 08:03
DubaiHost DubaiHost is offline
 
Join Date: Jun 2007
Real name: Ahmad Mohamed
It's Great ..

I think, it will be better if you add some few things ..

1 - let's say, a note shows that the scanner is runing after the file uploaded ..
2 - send a PM. to the admin that this user tried to attach a virus ..

it will be perfect with these things ..
__________________
I'm IT TECH ..
Reply With Quote
  #4  
Old 15 May 2008, 11:12
stelthius stelthius is offline
 
Join Date: Jan 2008
Originally Posted by DubaiHost View Post
It's Great ..

I think, it will be better if you add some few things ..

1 - let's say, a note shows that the scanner is runing after the file uploaded ..
2 - send a PM. to the admin that this user tried to attach a virus ..

it will be perfect with these things ..
Both very good ideas indeed ! thanks for the mod to much appretiated.


Rick
Reply With Quote
  #5  
Old 15 May 2008, 13:34
spitb19's Avatar
spitb19 spitb19 is offline
 
Join Date: Nov 2007
Hic. Help me. When I attach file, Error: Fatal error: Call to undefined function cl_scanfile_ex() in ..../public_html/diendan/newattachment.php(160) : eval()'d code on line 19.
__________________
www.dancesport.vn

Last edited by spitb19; 15 May 2008 at 15:03.
Reply With Quote
  #6  
Old 15 May 2008, 19:53
bahisyeri's Avatar
bahisyeri bahisyeri is offline
 
Join Date: Sep 2006
Location: TURKEY
Real name: Mutlu DERELİ
Originally Posted by spitb19 View Post
Hic. Help me. When I attach file, Error: Fatal error: Call to undefined function cl_scanfile_ex() in ..../public_html/diendan/newattachment.php(160) : eval()'d code on line 19.
This plugin requires LibClamAV support on your php settings. You can check it on phpinfo. If you do not have ClamAV , You can download it free at here
If its not your machine ask your hosting for it
I will think about that ideas
__________________
Lighttpd 1.4.19 + PHP 5.2.8 + MySQL 5.0.75 + Pound 2.4.2 + Varnish 2.0.1 + XCache 1.2.2 + Memcached 1.2.2 + ClamAV 0.94 + Suhosin 0.9.23 + Linux 2.6.26
130000 users ,1250000 posts
I succeded difficult, forced impossible
Reply With Quote
  #7  
Old 15 May 2008, 22:09
avsunforum avsunforum is offline
 
Join Date: Feb 2008
Help me. Error: Fatal error: Call to undefined function cl_scanfile_ex() in ..../public_html/beyhan/newattachment.php(160) : eval()'d code on line 19.
Reply With Quote
  #8  
Old 16 May 2008, 00:31
bahisyeri's Avatar
bahisyeri bahisyeri is offline
 
Join Date: Sep 2006
Location: TURKEY
Real name: Mutlu DERELİ
Originally Posted by avsunforum View Post
Help me. Error: Fatal error: Call to undefined function cl_scanfile_ex() in ..../public_html/beyhan/newattachment.php(160) : eval()'d code on line 19.
Hello,
avsunforum you need LibClamAv support on your php, you need to install php-clamav module and it requires LibClamav.
If its not your machine and on some host ask your provider for it.
Clamav is free antivir for linux.
Selam,
avsunforum Libclamav desteğini phpnize kurmanız gerekmektedir.php-clamav modülünü kurmalısınız buda libclamav desteği ister.
Eğer kullandığınız sunucu size ait değilse sunucu sağlayıcınızla görüşüp isteğinizi belirtiniz.
__________________
Lighttpd 1.4.19 + PHP 5.2.8 + MySQL 5.0.75 + Pound 2.4.2 + Varnish 2.0.1 + XCache 1.2.2 + Memcached 1.2.2 + ClamAV 0.94 + Suhosin 0.9.23 + Linux 2.6.26
130000 users ,1250000 posts
I succeded difficult, forced impossible
Reply With Quote
  #9  
Old 16 May 2008, 03:32
Floris Floris is offline
 
Join Date: Jan 2002
Is this using the 3.7 hook to allow scanning?
__________________
My community; http://wetalknation.net
Reply With Quote
  #10  
Old 16 May 2008, 05:20
bahisyeri's Avatar
bahisyeri bahisyeri is offline
 
Join Date: Sep 2006
Location: TURKEY
Real name: Mutlu DERELİ
Originally Posted by Floris View Post
Is this using the 3.7 hook to allow scanning?
Yes, its using hook newattachment_start and executing php-clamav's cl_scanfile_ex function on attached file and scanning it and as i know since 3.5 newattachment_start hook didnt change.
__________________
Lighttpd 1.4.19 + PHP 5.2.8 + MySQL 5.0.75 + Pound 2.4.2 + Varnish 2.0.1 + XCache 1.2.2 + Memcached 1.2.2 + ClamAV 0.94 + Suhosin 0.9.23 + Linux 2.6.26
130000 users ,1250000 posts
I succeded difficult, forced impossible
Reply With Quote
  #11  
Old 16 May 2008, 05:56
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Real name: Barakat
installed .,,,, but have no virus file to test it lol <<<<

any way maybe this will help you <<<

To install Clam AntiVirus (ClamAV), we are going to use the precompiled binaries from Dag Wieers RPM packages for Red Hat, RHEL, CentOS and Fedora. To do this, we are going to configure Yum to look for the ClamAV packages in Dag’s repository.

Adding Dag Wieers RPM Repository to Yum
1. Click Applications, select System Tools and click Terminal. This will launch the Terminal window. Type in the command cd /etc/yum.repos.d and press Enter. This will bring us to the Yum repository configuration directory.
2. From this directory download the Yum repository configuration file by typing in the command
wget http://www.linux-mail.info/files/dag-clamav.repo and press Enter. This is what the file dag-clamav.repo looks like.
Installing Clam AntiVirus
3. To install ClamAV AntiVirus, type in the command
yum install clamav clamav-devel clamd and press Enter. When asked to confirm download, type in y and press Enter.
Testing Clam AntiVirus
4. To test ClamAV AntiVirus, type in the command clamscan and press Enter.
__________________
مسلمـ من أمة محمد ...
Reply With Quote
  #12  
Old 16 May 2008, 12:08
bahisyeri's Avatar
bahisyeri bahisyeri is offline
 
Join Date: Sep 2006
Location: TURKEY
Real name: Mutlu DERELİ
You can use eicar test file for tests.
http://www.eicar.org/anti_virus_test_file.htm
__________________
Lighttpd 1.4.19 + PHP 5.2.8 + MySQL 5.0.75 + Pound 2.4.2 + Varnish 2.0.1 + XCache 1.2.2 + Memcached 1.2.2 + ClamAV 0.94 + Suhosin 0.9.23 + Linux 2.6.26
130000 users ,1250000 posts
I succeded difficult, forced impossible
Reply With Quote
  #13  
Old 16 May 2008, 15:54
pedroenf pedroenf is offline
 
Join Date: Jun 2006
Real name: Pedro
Can't have it working. I've installed all 3 packages and keep getting blank page when uploading a file. My server has CentOS 5.1, Apache v2.2.3, PHP 5.1.6, MySQL 5.0.22. Did not install php-clamav cause i do not know how. Some help here would be appreciated, thanks.
Reply With Quote
  #14  
Old 16 May 2008, 16:00
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Real name: Barakat
i try to upload it ,,, but i have an error in attachments , function or hook i believe


what do i miss in installeing the clamav ?
__________________
مسلمـ من أمة محمد ...
Reply With Quote
  #15  
Old 16 May 2008, 23:22
bahisyeri's Avatar
bahisyeri bahisyeri is offline
 
Join Date: Sep 2006
Location: TURKEY
Real name: Mutlu DERELİ
For those who can not find php-clamav i'm uploading compiled version.Because it seems www.phpclamavlib.org having some problems nowadays.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

add this lines to your php.ini and change clamav.dbpath to your clamav database path if it's not /var/lib/clamav

Originally Posted by Barakat View Post
i try to upload it ,,, but i have an error in attachments , function or hook i believe


what do i miss in installeing the clamav ?
If you can check php's error log we can understand whats wrong if you are getting blank page it must be module error or you didnt install php module.
More SS and log can help us find the main reason and if you can send me site address you are trying to use that module via pm i can help you more.
Also added php-clamav's source codes from debian lenny package.
Attached Files
File Type: zip clamav.zip (5.4 KB, 16 views)
File Type: zip php-clamavlib-0.13-src.zip (8.5 KB, 15 views)
__________________
Lighttpd 1.4.19 + PHP 5.2.8 + MySQL 5.0.75 + Pound 2.4.2 + Varnish 2.0.1 + XCache 1.2.2 + Memcached 1.2.2 + ClamAV 0.94 + Suhosin 0.9.23 + Linux 2.6.26
130000 users ,1250000 posts
I succeded difficult, forced impossible

Last edited by bahisyeri; 16 May 2008 at 23:34.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 14:43.

Layout Options | Width: Wide Color: