Page 1 of 2
Viewing and logging blocked items
Posted: Wed Aug 18, 2010 9:38 pm
by jimoe
NoScript indicates that scripts or objects are blocked, and provides a count of each type.
How do I find out which scripts or objects are blocked?
Is it possible to log NoScript's activities?
Re: Viewing and logging blocked items
Posted: Thu Aug 19, 2010 4:31 am
by Alan Baxter
jimoe wrote:How do I find out which scripts or objects are blocked?
I use the NoScript menu's Blocked Objects flyout to see what objects are blocked. For scripts I use the JSView extension. It adds a
Scripts pane to the Page Info window. Each of the scripts can be viewed from there with the right-click context menu.
Is it possible to log NoScript's activities?
I don't know. There may be a Firefox command line option which would turn it on. Giorgio would know.
Re: Viewing and logging blocked items
Posted: Sat Aug 21, 2010 9:57 pm
by jimoe
I use the NoScript menu's Blocked Objects flyout to see what objects are blocked.
Yes, I use that as well. My difficulty is this. I have the web server (apache) redirecting certain URL patterns to a neverland site. This has reduced a lot of unnecessary traffic and error logging.
I recently added a new application that triggers one (or more?) of those redirections. I can see the blockage of the redirected site but not the original URL that caused the redirection.
Re: Viewing and logging blocked items
Posted: Sat Aug 21, 2010 10:04 pm
by Giorgio Maone
You can set the
noscript.consoleDump about:config preference to
true and start Firefox from a terminal with the -Console command line option.
Re: Viewing and logging blocked items
Posted: Sun Aug 22, 2010 9:22 pm
by tim
Alan Baxter wrote:I use the NoScript menu's Blocked Objects flyout to see what objects are blocked.
Where is it? The only flyouts I have are "Recently blocked sites" and "Untrusted". I see no place to view blocked objects...what am I missing here?
Alan Baxter wrote:For scripts I use the JSView extension.
Where is this? I too would like to see what scripts are being blocked.
Forgive my lack of understanding...I like to think I know what I'm doing but it's obvious I don't!
Tim
Re: Viewing and logging blocked items
Posted: Sun Aug 22, 2010 9:49 pm
by Alan Baxter
tim wrote:Alan Baxter wrote:I use the NoScript menu's Blocked Objects flyout to see what objects are blocked.
Where is it? The only flyouts I have are "Recently blocked sites" and "Untrusted". I see no place to view blocked objects...what am I missing here?
The Blocked Objects selection is displayed only if some objects are blocked. Assuming that
NoScript Options > Appearance > Blocked Objects is checked. It's checked by default.
Alan Baxter wrote:For scripts I use the JSView extension.
Where is this? I too would like to see what scripts are being blocked.
JSView :: Add-ons for Firefox
Download Philip Chee's improved version of JSView linked from
http://forums.mozillazine.org/viewtopic ... &t=1704235 (
http://downloads.mozdev.org/xsidebar/mo ... .5-mod.xpi).
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 2:06 am
by GµårÐïåñ
Giorgio Maone wrote:You can set the
noscript.consoleDump about:config preference to
true and start Firefox from a terminal with the -Console command line option.
When you say set to true, the default value is 0, so true as in 1 or true as in "true" or either? Since the value is integer, you can only put 0 or 1, right? So true as in 1 right? like the old 0/1 false/true state?
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 10:32 am
by dhouwn
GµårÐïåñ wrote:Since the value is integer, you can only put 0 or 1, right?
Nope, but probably any value other than 0 activates this (or maybe just every values above 0), it could be also the other way round though.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 6:58 pm
by GµårÐïåñ
Well he might have put the default error trap of accepting any integer other than 0 as true, but in a formal programming condition, a true/false is represented as 1/0 respectively and I would be inclined to think that Giorgio would be sticking to the formal programming constraints, although for the sake of covering more error conditions, he might have a default catch for anything non-zero to signal true. But strictly speaking from a programming convention and common standard, it would only be a 1/0 combination, regardless of what additional error trapping leeway the programmer includes to prevent the widest possible range of possible human errors to not cause the program to crash or malfunction.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 7:05 pm
by therube
I saw no default value, so added the Preference as Boolean.
Not sure it's doing anything just yet though?
LOL: Nevermind. It will help once I install NoScript into the Profile!
Heh. That's better.
So not Boolean, but Integer.
Then I would suspect any value NOT 0.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 7:10 pm
by dhouwn
GµårÐïåñ wrote:But strictly speaking from a programming convention and common standard, it would only be a 1/0 combination,
Could be also 0 and -1 because these two values can be toggled with a simple bitwise NOT (for signed integers on common architectures).

Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 8:13 pm
by GµårÐïåñ
Actually when using boolean values IN THE PROGRAM, you can toggle true/false by doing NOT on 0/1 to achieve true/false (aka. 1/0) and yes by default many uninitiated variables will have -1 as their initially constructed value but often need to be given something valid to process since -1 (to the best of my knowledge) doesn't compute in a boolean evaluation of an integer. In fact, anything outside of 0/1 are defaulted to 0 when boolean evaluated from an integer form.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 8:14 pm
by Giorgio Maone
Sorry for the confusion, it was just a typo of mine.
noscript.consoleDump is a bitmask.
If you want to log content blocking, you need to set its rightmost bit.
In other words, you need to set it to 1, unless you're interested in other kinds of activities -- e.g., XSS filter activity gets logged by setting bit 4 (16) and optionally bit 5 (32) for deeper detail, so if you want to log content blocking + verbose XSS activity you need to set to 49.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 8:46 pm
by GµårÐïåñ
Gotcha, it has a multi mask/variable scope, got it. Thank you for the explanation. If we had the database with all the variables, when they were introduced or retired and what they do and what their possible values are and all that, it would make these kind of things easier and also less work for you to have to explain it. I started a similar project on my own a while back until we can integrate it and then my health tanked and it became for all intents and purposes abandoned. If you have an idea how and to what extent you want to do this, I would volunteer to do the grunt work or even the coding if you want and just give me a plan as to how you want it started and moved forward and I will be glad to do the work that needs to be done, no problem. Thanks.
Re: Viewing and logging blocked items
Posted: Mon Aug 23, 2010 8:50 pm
by Giorgio Maone
Code: Select all
const LOG_CONTENT_BLOCK = 1;
const LOG_CONTENT_CALL = 2;
const LOG_CONTENT_INTERCEPT = 4;
const LOG_CHROME_WIN = 8;
const LOG_XSS_FILTER = 16;
const LOG_INJECTION_CHECK = 32;
const LOG_DOM = 64;
const LOG_JS = 128;
const LOG_LEAKS = 1024;
const LOG_SNIFF = 2048;
const LOG_CLEARCLICK = 4096;
const LOG_ABE = 8192;