vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Virus scanner for attachments (https://vborg.vbsupport.ru/showthread.php?t=179299)

bahisyeri 05-14-2008 10:00 PM

Virus scanner for attachments
 
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

Kaycee123 05-15-2008 03:48 AM

Thanks - I never thought of a virus scanner for attachments!

DubaiHost 05-15-2008 06:03 AM

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 .. :)

stelthius 05-15-2008 09:12 AM

Quote:

Originally Posted by DubaiHost (Post 1520155)
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

spitb19 05-15-2008 11:34 AM

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.

bahisyeri 05-15-2008 05:53 PM

Quote:

Originally Posted by spitb19 (Post 1520363)
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 :)

avsunforum 05-15-2008 08:09 PM

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.

bahisyeri 05-15-2008 10:31 PM

Quote:

Originally Posted by avsunforum (Post 1520993)
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.

Floris 05-16-2008 01:32 AM

Is this using the 3.7 hook to allow scanning?

bahisyeri 05-16-2008 03:20 AM

Quote:

Originally Posted by Floris (Post 1521215)
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.


All times are GMT. The time now is 06:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01297 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete