logo       

Re: Why not Javascript ? WAS: Python FILTER "PLUGIN"?: msg#00026

web.privoxy.user

Subject: Re: Why not Javascript ? WAS: Python FILTER "PLUGIN"?

"Andreas M." <sfamix@xxxxxxxxxxxxxxxxxxxxx> wrote:

> I used Junkbuster already in my old Amiga days and my ultimate dream for
> Privoxy would be a scripting-engine, that allows for complete rewrite of
> content as well as a "hot-updates" network, that distributes filters,
> that get automatically deployed to subscribed sites, of course, ran by
> the Privoxy team or persons, they trust. System administration (in this
> case reading html-sources and writing filters) really takes a lot of
> time, with some collaborative efforts, this could be shortened.

You can already create your own deployment tool with a cron job
that regularly fetches standard.action, default.action.master
and default.filter from CVS.

http://ijbswa.cvs.sourceforge.net/ijbswa/current/

I don't think such a feature belongs into Privoxy itself,
but of course it wouldn't hurt to put an update shell script
into the packages.

> On 09.11.2006 11:37 Aleksandar Lazic wrote
>
> > On Don 09.11.2006 10:06, ibsen ige ooisen wrote:
> >> Is there any way to do some filtering in Python?
> >>
> >> That is, instead of doing the s/foo/bar/g in PCRE, I want to do it in
> >> Python, which is more powerful, because I can also do some code (some
> >> of my substitutions need functions).
> >
> > This would also be very nice for some other langugages:
> >
> > perl
> > ruby
> > lua
> > haxe
> > neko
>
> What about Javascript ? Not, that I would oppose Python possibilities in
> Privoxy, but I think, that Javascript would be even cooler, since it is
> the native scripting language for HTML, and that is, what we are in need
> to filter.

In the patch section there is already a patch that adds a pretty
simple way to run documents through a virus scanner. It works
(or is supposed to work, I didn't test it) by saving the document,
starting the virus scanner and checking for the return code afterwards.

I plan to integrate a more generic version of this patch
after the 3.0.6 release is out. Instead of just using virus
scanners one should be able to specify an arbitrary command
to filter the content. This way every user could use the
language of his choice, as long as there is a command line
interpreter available.

> I may be technically too illiterate to comment on this, but to me there
> seems to be a possibility to run the javascript on the DOM (or
> elsewhere) even /before/ it reaches the browser. Since Privoxy now could
> interpret the Javascript on behalf of the browser, it could react
> similare to the browser, but do some "rewrites" according to JS-filters,
> so, that the browser still gets the Javascript needed in order for the
> page to function correctly while the special javascript-filter
> anonymizes and/or rewrites privacy problematic stuff/annoyances.

I don't think this could work reliable enough to be trustworthy
and I doubt that there is an easy way to separate needed JavaScript
from the rest.

Fabian
--
http://www.fabiankeil.de/




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise