Page 1 of 1

Problems using external filters

Posted: Sun Sep 16, 2012 4:19 pm
by cyber345
I have made a custom external filter for Noscript using Sophos command line scanner and a custom script to scan plugin content before they are displayed by Firefox. The problem is that the scan completes successfully (takes about 13 seconds) but the plugin does not load.

The source of the script which works as the interface between the scanner and Noscript is as below:

Code: Select all

::pluginfilter.cmd
@echo off

::Check if both parameters are present
if "%~1"=="" (
	exit /B 1
)
if "%~2"=="" (
	exit /B 1
)

::Append current directory to path variable
set path=%~dp0;%path%

::Start scanner
sav32cli.exe "%1"

::Copy the file if file is clean
if %errorlevel%==0 (
	copy "%1" "%2"
	if not %errorlevel%==0 (
		exit /B 1
	)
	exit /B 0
)
MIMEtypes to be filtered are:

Code: Select all

shockwave|futuresplash|java
No exceptions are present.

Please help me with this issue.

Thanks in advance.

Re: Problems using external filters

Posted: Mon Sep 17, 2012 3:07 pm
by cyber345
Noscript seems to be ignoring the file that is returned. BUG CONFIRMED.

Re: Problems using external filters

Posted: Tue Sep 18, 2012 12:29 pm
by Thrawn
External filters are a little-used feature of NoScript, so there may well be bugs. However, are you sure that the scanner is working in the way that NoScript expects for an external filter?

The only known (built-in) filter is Blitzableiter, which doesn't just scan content, but actually deconstructs and recreates it, ensuring that the end product has no buffer overflows etc. Are you sure that the Sophos scanner is actually *returning* the contents of the file, not just reporting 'clean' vs 'infected'?