[HTTPS-Everywhere] Python interface for the rulesets?

Peter Eckersley pde at eff.org
Sat Dec 29 22:52:43 PST 2012


On Sat, Dec 29, 2012 at 08:59:50PM -0500, Ian Cordasco wrote:
> On second thought, matching rulesets might prove to be the issue.
> 
> I took a cursory look at creating an adapter for requests and we would
> certainly be able to intercept the request before a connection was
> created, but I'm not familiar with a good algorithm to match the hosts
> efficiently.

Just copy the algorithm from HTTPS Everywhere:

It uses the <target host=""> elements of rulesets to build a hash table that
allows for an efficient test of which rulesets might apply to a given host.

https://gitweb.torproject.org/https-everywhere.git/blob/HEAD:/src/chrome/content/code/HTTPSRules.js#l520

> 
> On Wed, Dec 26, 2012 at 12:10 PM, Peter Eckersley <pde at eff.org> wrote:
> > Oh, and there's also https://github.com/hiviah/https-everywhere-checker ,
> > which we need to work on integrating into the ruleset authorship process.
> >
> > On Wed, Dec 26, 2012 at 08:54:48AM -0800, Peter Eckersley wrote:
> >> I'm not aware of anyone having used the rulesets in Python, but
> >> utils/trivial-validate.py does parse them.
> >>
> >> On Wed, Dec 26, 2012 at 12:47:06PM +0300, Osama Khalid wrote:
> >> > Hello,
> >> >
> >> > Has anyone used HTTPSEverywhere rulesets in Python?  I am thinking
> >> > about writing a small script that can use the rulesets.  As far as I
> >> > know, JavaScript and Python regex libraries are pretty much
> >> > compatible, so it should not be too difficult, but it would be easier
> >> > to find something ready.
> >> >
> >> > Regards,
> >> >
> >> >
> >> > _______________________________________________
> >> > HTTPS-everywhere mailing list
> >> > HTTPS-everywhere at mail1.eff.org
> >> > https://mail1.eff.org/mailman/listinfo/https-everywhere
> >>
> >> --
> >> Peter Eckersley                            pde at eff.org
> >> Technology Projects Director      Tel  +1 415 436 9333 x131
> >> Electronic Frontier Foundation    Fax  +1 415 436 9993
> >
> > --
> > Peter Eckersley                            pde at eff.org
> > Technology Projects Director      Tel  +1 415 436 9333 x131
> > Electronic Frontier Foundation    Fax  +1 415 436 9993
> >
> > _______________________________________________
> > HTTPS-everywhere mailing list
> > HTTPS-everywhere at mail1.eff.org
> > https://mail1.eff.org/mailman/listinfo/https-everywhere

-- 
Peter Eckersley                            pde at eff.org
Technology Projects Director      Tel  +1 415 436 9333 x131
Electronic Frontier Foundation    Fax  +1 415 436 9993




More information about the HTTPS-everywhere mailing list