Blocking inline scripts

Discussions about the Application Boundaries Enforcer (ABE) module
cebihiya
Posts: 2
Joined: Mon Jul 28, 2014 1:54 pm

Blocking inline scripts

Post by cebihiya »

Hello. I want to create the rule, which will be locking all inline scripts on some site (but external JS must working). How I can do this?
My rule

Code: Select all

# User-defined rules. Feel free to experiment here.
Site example.org
Accept from example.org
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)
doesn't work. :|
Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Blocking inline scripts

Post by barbaz »

I don't think that is possible in ABE.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.30a1
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Blocking inline scripts

Post by Giorgio Maone »

You can try with the following surrogate:

Code: Select all

addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Alternatively, you may want to check whether this add-on works.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
cebihiya
Posts: 2
Joined: Mon Jul 28, 2014 1:54 pm

Re: Blocking inline scripts

Post by cebihiya »

Giorgio Maone wrote:You can try with the following surrogate:

Code: Select all

addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Is it Greasemonkey script?
Giorgio Maone wrote: Alternatively, you may want to check whether this add-on works.
Thanks, I'll try.
Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Blocking inline scripts

Post by Giorgio Maone »

cebihiya wrote:
Giorgio Maone wrote:You can try with the following surrogate:

Code: Select all

addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Is it Greasemonkey script?
more or less :)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
Post Reply