当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

dotjs javascript failing

more options

Hello all, my school website is kind of a pain in that you cannot stay logged in between session, so being a CS major I have set out to fix this problem. I found that basically the whole login process sets one cookie in the browser called canvas_session. If you set this cookie (I have done this via an add-on) then the website thinks your logged in. I have already created a program that takes and stores my username and password and returns a valid canvas_session cookie, I just cant figure out how to set it in the browser. I found "dotjs" which is an add-on that runs a javascript file based on your current website that's open. I can set cookies via javascript and have been able to create fake cookies using this add-on. When my schools website first loads up, a canvas_session cookie is set by the website, but it has a value that does not equal a valid login token, so it takes me to the login page. The problem is that whenever I load up my schools website, and MY javascript to set the canvas_session cookie is run, the cookie doesn't change from the default cookie that the site loads up at the beginning. I have read here: http://blog.mozilla.org/addons/2012/04/16/code-review-browser-hacking-with-dotjs/ that this add-on loads up the website first, then runs my javascript so my javascript is being executed after(I think) the website first sets its default canvas_session cookie. Any ideas as to how to set this cookie and why this isn't working?

Thanks a bunch!

Hello all, my school website is kind of a pain in that you cannot stay logged in between session, so being a CS major I have set out to fix this problem. I found that basically the whole login process sets one cookie in the browser called canvas_session. If you set this cookie (I have done this via an add-on) then the website thinks your logged in. I have already created a program that takes and stores my username and password and returns a valid canvas_session cookie, I just cant figure out how to set it in the browser. I found "dotjs" which is an add-on that runs a javascript file based on your current website that's open. I can set cookies via javascript and have been able to create fake cookies using this add-on. When my schools website first loads up, a canvas_session cookie is set by the website, but it has a value that does not equal a valid login token, so it takes me to the login page. The problem is that whenever I load up my schools website, and MY javascript to set the canvas_session cookie is run, the cookie doesn't change from the default cookie that the site loads up at the beginning. I have read here: http://blog.mozilla.org/addons/2012/04/16/code-review-browser-hacking-with-dotjs/ that this add-on loads up the website first, then runs my javascript so my javascript is being executed after(I think) the website first sets its default canvas_session cookie. Any ideas as to how to set this cookie and why this isn't working? Thanks a bunch!

すべての返信 (1)

more options

I think you need to send the cookie to the server when requesting the page. This will admit you to the existing session created by your login program, and the server should echo the cookie back to Firefox. I actually haven't used any extensions that could do that.