Problems using external filters

Ask for help about NoScript, no registration needed to post
cyber345

Problems using external filters

Post 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.
Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
cyber345

Re: Problems using external filters

Post by cyber345 »

Noscript seems to be ignoring the file that is returned. BUG CONFIRMED.
Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Problems using external filters

Post 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'?
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0
Post Reply