how to disable NoScript via user.js or prefs.js?

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

how to disable NoScript via user.js or prefs.js?

Post by guesterwoman »

i wish to disable noscript for a few tests and i want to do so before opening the browser. i have looked and looked through about:config, prefs.js and noscript.js, but i cannot find the correct user_pref setting; can someone please help me?

TIA!
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: how to disable NoScript via user.js or prefs.js?

Post by therube »

Brute force?

Go into your Profile directory/extensions.
Rename the directory/xpi named {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi to something like {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi.X.

Don't know if that could break things, but should work.

When done, exit, rename back & restart FF.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; rv:2.0b13pre) Gecko/20110305 Firefox/4.0b13pre SeaMonkey/2.1b3pre
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: how to disable NoScript via user.js or prefs.js?

Post by GµårÐïåñ »

The more important question is why are you trying to do this in this manner? The fact is that you can disable NoScript through the interface and THEN run the browser and do whatever test you want, you don't need to hack the settings the way you are describing. Additionally, this seems like a dry run for subverting NoScript functionality on someone's machine which makes me very uncomfortable to help you do that not knowing your motives and justified reasons for doing so. At this point I would suggest you either do it the right way or figure it out on your own as we can't be responsible in helping you do something that might not be on the level.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (en-US; rv:6.9.6.9) Gecko/66666666 Firefox/6.6.6
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: how to disable NoScript via user.js or prefs.js?

Post by therube »

For some (especially those who have a LARGE sessionstore.json) & can be quite time consuming to ... open browser, disable, shutdown, restart.

So if the browser is already shutdown, & you can disable an extension without starting the browser first, you're ahead of the game.

I was often late on updating extensions for that reason. Once the BarTab extension was available for SeaMonkey, shutting down, restarting became a non-issue. (Things are worse on the current trunk though. BarTab does not work, & Mozilla's delayed load scheme does not work as well.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110416 SeaMonkey/2.0.14
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: how to disable NoScript via user.js or prefs.js?

Post by GµårÐïåñ »

I understand where you are coming from but that doesn't necessarily mean that the intention of the OP is the same. I would like to hear what their reason is and if you could stop providing reasons that can be used to mask their original intent, that would be great.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (en-US; rv:6.9.6.9) Gecko/66666666 Firefox/6.6.6
guesterwoman

Re: how to disable NoScript via user.js or prefs.js?

Post by guesterwoman »

GµårÐïåñ wrote:The more important question is why are you trying to do this in this manner? The fact is that you can disable NoScript through the interface and THEN run the browser and do whatever test you want, you don't need to hack the settings the way you are describing. Additionally, this seems like a dry run for subverting NoScript functionality on someone's machine which makes me very uncomfortable to help you do that not knowing your motives and justified reasons for doing so. At this point I would suggest you either do it the right way or figure it out on your own as we can't be responsible in helping you do something that might not be on the level.
See what therube wrote below:
For some (especially those who have a LARGE sessionstore.json) & can be quite time consuming to ... open browser, disable, shutdown, restart.

So if the browser is already shutdown, & you can disable an extension without starting the browser first, you're ahead of the game.

I was often late on updating extensions for that reason. Once the BarTab extension was available for SeaMonkey, shutting down, restarting became a non-issue. (Things are worse on the current trunk though. BarTab does not work, & Mozilla's delayed load scheme does not work as well.)
Those are valid reasons for my thread, that and I am testing add-on load time on Firefox via 'about startup' add-on. I am testing a add-on that comes pre-installed along with Noscript and other add-ons, in a project with which I am fiddling. Further, I like to use prefs.js instead of a large and time consuming UI (re all settings of Noscripot and some other add-ons).

I do have to say, you are quite paranoid/suspicious; that is not meant to be an insult, it just seems to be the truth. If I was good enough to crack someone's browser on a remote machine (assuming you meant a remote and not local machine) I doubt I would be as ignorant of the setting(s) I asked about. As per therube's first response, I could simply wirte a batch file to rename or move the installed add-on, but I would prefer a 'safer' and more elegant solution.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 (.NET CLR 3.5.30729)
Guest

Re: how to disable NoScript via user.js or prefs.js?

Post by Guest »

guesterwoman wrote:
Those are valid reasons for my thread, that and I am testing add-on load time on Firefox via 'about startup' add-on. I am testing a add-on that comes pre-installed along with Noscript and other add-ons, in a project with which I am fiddling. Further, I like to use prefs.js instead of a large and time consuming UI (re all settings of Noscripot and some other add-ons).
Of course, I meant to write:
guesterwoman wrote:
Those are valid reasons for my thread, those and I am testing add-on load time for Firefox via 'about startup' add-on. I am testing a add-on that comes pre-installed along with Noscript and other add-ons, in a project with which I am fiddling. Further, I like to use user.js instead of a large and time consuming UI (re all settings of Noscript and some other add-ons too).
P.S. I do not use Firefox UI (i.e., GUI) to configure Firefox, instead I have a large user.js file.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 (.NET CLR 3.5.30729)
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: how to disable NoScript via user.js or prefs.js?

Post by al_9x »

Fx does not use the prefs to toggle the extension enabled state, but extensions.rdf in 3.6 and extensions.sqlite in 4.0. To disable an extension in 3.6:
  1. locate the "RDF:Description" element for the extension in "extensions.rdf"
    for NS its "RDF:about" attribute will have the value "urn:mozilla:item:{73a6fe31-595d-460b-a920-fcc0f8843232}"
  2. add the following attribute to the element:

    Code: Select all

    NS1:userDisabled="needs-disable"
    
  3. delete "extensions.ini" and "extensions.cache"
  4. when you start Fx the extension will be disabled
to re-enable, follow the above directions, but step 2 becomes:
change the value of "NS1:userDisabled" attribute (it will already exist, with a value "true") to "needs-enable"
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: how to disable NoScript via user.js or prefs.js?

Post by therube »

(Brute force sounds easier ;-).)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110416 SeaMonkey/2.0.14
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: how to disable NoScript via user.js or prefs.js?

Post by GµårÐïåñ »

guesterwoman wrote:I do have to say, you are quite paranoid/suspicious; that is not meant to be an insult, it just seems to be the truth. If I was good enough to crack someone's browser on a remote machine (assuming you meant a remote and not local machine) I doubt I would be as ignorant of the setting(s) I asked about. As per therube's first response, I could simply wirte a batch file to rename or move the installed add-on, but I would prefer a 'safer' and more elegant solution.
You are in a security forum and any time someone wants to "fiddle" with a security solution, its a legitimate concern, call it whatever you want, it makes no difference to me. And if you are using your lack of knowledge on something to justify that you are harmless, that's an asinine argument. Everyone has to start somewhere and remote/local you can still screw with people's machines, as I have seen it on more occasions than I care to recite. The fact is that just because you don't see the relevance of our "paranoia" as you so ineptly put it, doesn't mean the concern is any less valid. If you are in a position to "fiddle" with something and test startup times and benchmarks and so on, then you can't argue that you are too incompetent to potentially cause a security violation. You shot yourself in foot with that argument and you don't know me, so don't even assume to make any presumptions about me.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (en-US; rv:6.9.6.9) Gecko/66666666 Firefox/6.6.6
hassanselim0

Re: how to disable NoScript via user.js or prefs.js?

Post by hassanselim0 »

@al_9x: Can I just set the userDisabled attribute to "true" right away ? ot does Firefox has to do vertain operations (when loading) do disable the extension ?

@GuarDian: You're just anoyying :D
Instead of being helpful to non-evil majority who are searching google on how to programatically disable extensions (not just NoScript), you're being overly suspicious !
I'm making a simple tool that can help you disable or uninstall Firefox extensions without having to launch Firefox (along with other features) just for fun and learning.

@therube: Next time ask these questions on Mozilla's Forum, you'll find much less paraoid people than on a security software's forum ;-)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: how to disable NoScript via user.js or prefs.js?

Post by therube »

I had to occasion to enable a disabled extension & I believe what I did was:
  • Edited extensions.ini, incremented the Extensionxx count, then appended the wanted path/extension/GUID
Pretty sure that worked. (I'm not keen on editing rdf files.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110416 SeaMonkey/2.0.14
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: how to disable NoScript via user.js or prefs.js?

Post by GµårÐïåñ »

hassanselim0 wrote:@GuarDian: You're just anoyying :D
Instead of being helpful to non-evil majority who are searching google on how to programatically disable extensions (not just NoScript), you're being overly suspicious !
I'm making a simple tool that can help you disable or uninstall Firefox extensions without having to launch Firefox (along with other features) just for fun and learning
You are welcome to your opinion and I believe you are a charlatan, so we are even, at least I am not hiding behind anonymity and stick by what I say, you are just passing through. The fact is that if you are trying to do something harmless (which programaticaly disabling ANYTHING is never considered harmless in of itself, specially when security measures can be disabled the same way, intent matters) then why not ask Mozilla about doing it and learn by going through the process of development and inquiry from them? Why ask here, and why ask about a security addon? You can have all the fun you want and learn, I encourage that but don't be flip about it because that just further makes my point. I am done with you and if anyone else wants to help you do something shady, its on them.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (en-US; rv:6.9.6.9) Gecko/66666666 Firefox/6.6.6
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: how to disable NoScript via user.js or prefs.js?

Post by dhouwn »

GµårÐïåñ wrote:The more important question is why are you trying to do this in this manner?
IMHO, it's not. And even if it was the Web wouldn't be made a securer place if we didn't help the thread create in this case. NoScript can be disabled on a machine someone has the appropriate access to and there is nothing that can be done about it. This is nothing that should be kept secret, quite on the contrary IMHO.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: how to disable NoScript via user.js or prefs.js?

Post by GµårÐïåñ »

No body said it should be a secret, but in MY humble opinion, we should not be facilitating it either, specially not knowing the intent. If someone has the motivation to do it, then let them learn it and earn it, giving them the solution is not wise in the long run. I have nothing against learning to do something but handing it on a silver platter is not wise and certainly not something that should be taken lightly. Remember the ABP/NS issue? It was legitimate and see the storm it caused, now imagine if you did it lightly and without thought to consequences?
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (en-US; rv:6.9.6.9) Gecko/66666666 Firefox/6.6.6
Post Reply