Bypass Cloudflare with Firefox Cookies

Dedicated board for extension releases/support threads

Moderators: FranklinDM, Lootyhoof

Forum rules
Please do not create new topics here unless you are an extension author in need of a dedicated releases&support thread!
User avatar
andyprough
Board Warrior
Board Warrior
Posts: 1039
Joined: 2020-05-31, 04:33

Re: Bypass Cloudflare with Firefox Cookies

Unread post by andyprough » 2025-03-04, 19:29

Sorry to be duplicate posting on multiple threads today, but this is some news and an opportunity to raise awareness of what Cloudflare is doing -

Anyone reading this, if you haven't read and left a comment on the article on Cloudflare's bad behavior against Pale Moon and other non-Chrome browsers yet today, please do so if you can: https://www.theregister.com/2025/03/04/ ... _browsers/

It would be good to get more comments on that article and for it to go a bit "viral", if you see what I mean. Also, if you have a twitter or mastodon or facebook or bluesky or truth social account, it would be good to post a comment linking to this article if possible.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-05, 16:25

back2themoon wrote :
@tellu-white: This seems like a left-over from previous versions. Perhaps there are more?
https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=80#p260381

Thanks back2themoon for the observation. I made version 7.1 of this add-on in which I fixed three such left-overs from previous versions.

***

In this version I've added a POSSIBLE error message after clicking on the option 'Get Cookies From "Backup Browser" + Set Cookies in Pale Moon':

There are no Cookies saved for "drunkenslug.com" Top-Level Domain.

This error may occur if during the initialization phase of the add-on was selected a Cookies file that belongs to a different version of "Backup Browser" than the one previously selected during the add-on initialization phase.

TEST: In the Linux version where I did the test there was "Firefox 71.0" installed. This version had a specific path for the "cookies.sqlite" file. I have installed "Firefox 136.0" which has a different path to its "cookies.sqlite" file. To illustrate the above error, when initializing the add-on I selected the path to the "Firefox 136.0" app and (INITIALLY) selected the cookies path of the "Firefox 71.0" version. This setting produced the above error message. Next I re-initialized the path to the cookies file, this time selecting the file belonging to "Firefox 136.0". After this change the add-on worked without errors.

I have made some screenshots in Linux to illustrate this test (I cannot post them all because it is possible to upload only 9 images in one post):

Path to the "cookies.sqlite" file of "Firefox 71.0":
01.png
Error message:
02.png
Path to the "cookies.sqlite" file of "Firefox 136.0":
03.png
OK message:
04.png
***

In this version I've also added the option to delete the entries from the "prefs.js" file ("cookies" and "general.useragent.override.XXX"). There is the possibility to delete the entries for a single "Top-Level Domain" or to delete all entries.

This new add-on option can also be used just to see for which "Top-Level Domain" there are cookies saved in the "prefs.js" file.

Screenshots:
05.png
06.png
Delete the entries ("cookies" and "general.useragent.override.XXX") for a single "Top-Level Domain" ("romhacking.net"):
07.png
I've deleted the entries for "romhacking.net". Next I will delete all remaining entries:
08.png
If I click again the option "Delete Entries for Top-Level Domain(s)", the message "There are no Cookies saved in prefs.js" will be displayed:
09.png
*****

Download link ( Bypass Cloudflare with Firefox Cookies 7.1 ):

https://www.mediafire.com/file/xbwlwhhj9p195jx/bypass_cloudflare_with_firefox_cookies_7_1.zip/file
You do not have the required permissions to view the files attached to this post.

Sessh
Fanatic
Fanatic
Posts: 194
Joined: 2018-01-11, 18:43

Re: Bypass Cloudflare with Firefox Cookies

Unread post by Sessh » 2025-03-05, 18:41

So I was able to figure out the issue. It seems that the combination of VPN + Pale Moon made my experience differ from yours with Cloudflare. I made Pale Moon tunnel under the VPN connection and then tried accessing romhacking.net and it worked. The cf_clearance cookie worked as soon as I did that. I then removed that tunneling exception putting PM back through the VPN as normal and it still works now even with Pale Moon going through the VPN. It seems that toggle / access RH / toggle again fixed it.

I really appreciate the help. All of this did help me to narrow that down because it didn't really make sense to me that I was the only one having this weird problem. My Linux laptop however is a different problem which I don't think is VPN related that being that clicking "Get Cookies From Selected Browser + Set Cookies in Pale Moon" does nothing at all. Why would that happen?

Edit: Upon browser restart, the problem is back and now the above issue is happening in Windows. lol So annoying.
Last edited by Sessh on 2025-03-05, 18:53, edited 1 time in total.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2759
Joined: 2012-08-19, 20:32

Re: Bypass Cloudflare with Firefox Cookies

Unread post by back2themoon » 2025-03-05, 18:50

Thanks for the excellent update, tellu-white. I don't know if you can still edit your first post (if not, you can ask a moderator) but it's hinted there that the extension is Windows-only. Since some people are unable or unwilling to see past that, perhaps you should edit it.
Sessh wrote:
2025-03-05, 18:41
My Linux laptop however is a different problem which I don't think is VPN related that being that clicking "Get Cookies From Selected Browser + Set Cookies in Pale Moon" does nothing at all.
Are you opening the problem URL using the extension on Pale Moon, or you are simply passing the check on FF and then go back to PM to get the cookies? Make sure to first open the URL via the extension, pass the check on FF and immediately go back to PM after that. If it's a Linux-specific issue however, I can't help.

Sessh
Fanatic
Fanatic
Posts: 194
Joined: 2018-01-11, 18:43

Re: Bypass Cloudflare with Firefox Cookies

Unread post by Sessh » 2025-03-05, 19:01

Ok so I reinstalled v7.1, configured it again and went through all the steps, tunneled PM under the VPN and it worked again even if I put PM back through the VPN. Seems like this is something I'll have to do every time I restart the browser or maybe I just have to access RH the first time while tunneled under the VPN. Will have to experiment. I just wish I knew why the addon will stop working when trying to Get Cookies From Selected Browser + Set Cookies in Pale Moon. Seems if I restart PM, that will fail to work upon restart unless I reinstall the addon or (sometimes) going into about:config and resetting the cookies field.

Edit: Ok, that VPN trick doesn't work for long. It's back to not working again. I guess that's the issue then. CF does not like the VPN + Pale Moon combination at all.

So if I just close FF and then reopen it to try to reimport cookies, "Get Cookies From Selected Browser + Set Cookies in Pale Moon" stops working in Pale Moon. If I reset all configuration settings for the addon and try to Get Cookies, it says I haven't selected a cookies file and to do that. I do that and try Get Cookies again and it doesn't do anything. Sorry for all the edits, just trying to give as much info as I can.

Sessh
Fanatic
Fanatic
Posts: 194
Joined: 2018-01-11, 18:43

Re: Bypass Cloudflare with Firefox Cookies

Unread post by Sessh » 2025-03-05, 19:35

Ok, so I had to uninstall/reinstall the bypass addon twice to get the "Get Cookies..." command to work right again. Building off what I just learned, I removed Firefox from the VPN tunneling list and then performed all these actions so now both browsers are going through the VPN. I hit CF in Firefox just trying to access the homepage like in PM. Did everything and it now works again. I'm hoping this is what it wanted; two browsers working under similar circumstances.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-05, 19:51

back2themoon wrote:
2025-03-05, 18:50
Thanks for the excellent update, tellu-white. I don't know if you can still edit your first post (if not, you can ask a moderator) but it's hinted there that the extension is Windows-only. Since some people are unable or unwilling to see past that, perhaps you should edit it.
Thanks, back2themoon. I can't edit my first post.
Sessh wrote:
2025-03-05, 19:35
Did everything and it now works again. I'm hoping this is what it wanted; two browsers working under similar circumstances.
Let's hope that this is the solution and that there will be no problems anymore.

User avatar
Figueroa
Moon lover
Moon lover
Posts: 78
Joined: 2021-04-06, 18:32

Re: Bypass Cloudflare with Firefox Cookies

Unread post by Figueroa » 2025-03-08, 23:26

Thanks to tellu-white for the useful add-on (v7.1) and to back2themoon for the very helpful guide. The freezing problem was really bad with imginn.com (a front end to Instagram). All better now. :)

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-09, 12:48

My pleasure Figueroa, and I also thank back2themoon for the very useful guide.

dinosaur
Fanatic
Fanatic
Posts: 185
Joined: 2014-06-03, 09:26
Location: France

Re: Bypass Cloudflare with Firefox Cookies

Unread post by dinosaur » 2025-03-09, 13:40

Since this extension now works with other forks of Firefox, what about changing its icon for something more generic ?

Also, the extension current button icon is a bit too large to perfectly fit the status bar without causing it to get taller (ideal size for Linux/GTK2 and Windows seems to be is 17x17 pixels).

Here are the icons I am using for my personal fork of your excellent extension:
bypass_cloudflare_with_firefox_cookies_LOGO.png
bypass_cloudflare_with_firefox_cookies_BUTTON.png
The original source for this icon is here and the icon is "free for personal and commercial purpose with attribution".
You do not have the required permissions to view the files attached to this post.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-09, 14:24

dinosaur wrote:
2025-03-09, 13:40
Since this extension now works with other forks of Firefox, what about changing its icon for something more generic ?
In essence you're right, but I also have to take into account the fact that add-on users are already used to make an association between Firefox icon and this add-on. I don't know if there won't be a discomfort for a segment of users who value more predictability.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-10, 20:39

dinosaur wrote:
2025-03-09, 13:40
Since this extension now works with other forks of Firefox, what about changing its icon for something more generic ?
Also, the extension current button icon is a bit too large to perfectly fit the status bar without causing it to get taller (ideal size for Linux/GTK2 and Windows seems to be is 17x17 pixels).
Here are the icons I am using for my personal fork of your excellent extension:
https://forum.palemoon.org/download/file.php?id=19652
https://forum.palemoon.org/download/file.php?id=19653
The button icon is easy to change. You need to copy the chosen image file (with the name "bypass_cloudflare_with_firefox_cookies_BUTTON.png") to "chrome" folder and add the following CSS code to the "userChrome.css" file in "chrome" folder:

Code: Select all

#btn_bypass_cloudflare_with_firefox_cookies{
	list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
	-moz-box-orient: horizontal !important;
}
In this test I used the two image files posted by dinosaur.

bypass_cloudflare_with_firefox_cookies_BUTTON.png
17x17 pixels

https://forum.palemoon.org/download/file.php?id=19653

bypass_cloudflare_with_firefox_cookies_LOGO.png
32x32 pixels

https://forum.palemoon.org/download/file.php?id=19652

File names must be exactly as above, including the extension (png).
Screenshots (in Windows and Linux) with the path to the "userChrome.css" file:
01.png
02.png
This is how the button looks before the above settings:
03.png
This is how the "chrome" folder looks after the above settings:
04.png
This is how the button looks after the above settings:
05.png
***

Changing the image of the add-on in the "about:addons" window is a bit more complicated and requires Javascript code. Here are the required steps:

1. Copy also the "bypass_cloudflare_with_firefox_cookies_LOGO.png" file in the "chrome" folder.

2. The following code must be added to file "userChrome.css":

Code: Select all

hbox {
	-moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0gQ29weXJpZ2h0IChjKSAyMDE3IEhhZ2dhaSBOdWNoaQpBdmFpbGFibGUgZm9yIHVzZSB1bmRlciB0aGUgTUlUIExpY2Vuc2U6Cmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUCiAtLT4KCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIj4KICAgIDxiaW5kaW5nIGlkPSJqcyI+CiAgICAgICAgPGltcGxlbWVudGF0aW9uPgogICAgICAgICAgICA8Y29uc3RydWN0b3I+PCFbQ0RBVEFbCiAgICAgICAgICAgICAgICBpZih3aW5kb3cudXNlckNocm9tZUpzTW9kKSByZXR1cm47CiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB2YXIgY2hyb21lRmlsZXMgPSBGaWxlVXRpbHMuZ2V0RGlyKCJVQ2hybSIsIFtdKS5kaXJlY3RvcnlFbnRyaWVzOwogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107CiAgICAgICAgICAgICAgICB2YXIgc3NzID0gQ2NbJ0Btb3ppbGxhLm9yZy9jb250ZW50L3N0eWxlLXNoZWV0LXNlcnZpY2U7MSddLmdldFNlcnZpY2UoQ2kubnNJU3R5bGVTaGVldFNlcnZpY2UpOwoKICAgICAgICAgICAgICAgIHdoaWxlKGNocm9tZUZpbGVzLmhhc01vcmVFbGVtZW50cygpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBjaHJvbWVGaWxlcy5nZXROZXh0KCkuUXVlcnlJbnRlcmZhY2UoQ2kubnNJRmlsZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVVUkkgPSBTZXJ2aWNlcy5pby5uZXdGaWxlVVJJKGZpbGUpOwoKICAgICAgICAgICAgICAgICAgICBpZihmaWxlLmlzRmlsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAibm9uZSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC8oXnVzZXJDaHJvbWV8LnVjKS5qcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUvanMiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoLyhedXNlckNocm9tZXwudWMpLnh1bCQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUveHVsIjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC8uYXMuY3NzJC9pLnRlc3QoZmlsZS5sZWFmTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiYWdlbnRzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXig/ISh1c2VyQ2hyb21lfHVzZXJDb250ZW50KS5jc3MkKS4rLmNzcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAhPSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCItLS0tLS0tLS0tXCAiICsgZmlsZS5sZWFmTmFtZSArICIgKCIgKyB0eXBlICsgIikiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAidXNlcmNocm9tZS9qcyIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmljZXMuc2NyaXB0bG9hZGVyLmxvYWRTdWJTY3JpcHRXaXRoT3B0aW9ucyhmaWxlVVJJLnNwZWMsIHt0YXJnZXQ6IHdpbmRvdywgaWdub3JlQ2FjaGU6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2VyY2hyb21lL3h1bCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeHVsRmlsZXMucHVzaChmaWxlVVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGUgPT0gImFnZW50c2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5BR0VOVF9TSEVFVCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3MubG9hZEFuZFJlZ2lzdGVyU2hlZXQoZmlsZVVSSSwgc3NzLkFHRU5UX1NIRUVUKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2Vyc2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5VU0VSX1NIRUVUKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcy5sb2FkQW5kUmVnaXN0ZXJTaGVldChmaWxlVVJJLCBzc3MuVVNFUl9TSEVFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIiMjIyMjIyMjIyMgRVJST1I6ICIgKyBlICsgIiBhdCAiICsgZS5saW5lTnVtYmVyICsgIjoiICsgZS5jb2x1bW5OdW1iZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIi0tLS0tLS0tLS0vICIgKyBmaWxlLmxlYWZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIGxvYWRYVUwoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYoeHVsRmlsZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5sb2FkT3ZlcmxheSh4dWxGaWxlcy5zaGlmdCgpLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb2FkWFVMLCA1KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgXV0+PC9jb25zdHJ1Y3Rvcj4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPg==);
}
After this addition, "userChrome.css" file will look like this:
06.png
3. Create the Javascript file with the name "change__bypass_cloudflare_with_firefox_cookies__addon_icon.uc.js" and the following content:

Code: Select all

function get_Operating_System__change__bypass_cloudflare_with_firefox_cookies__addon_LOGO_icon() {
    var os = Services.appinfo.OS.toLowerCase();
	
	if (os.startsWith("win")) {
		return "Windows";
		
	} else if (os == "linux") {
		return "Linux";
		
	} else{
		return "";
	}
}

var change__bypass_cloudflare_with_firefox_cookies__addon_LOGO_icon = {
    init: function() {
        gBrowser.addProgressListener(this);
    },
	
	onPageLoad: function(aEvent) {
        setTimeout(function() {
		    var arr_addons = content.document.getElementsByClassName("addon addon-view");

		    if(arr_addons){
			    for(var i=0; i<arr_addons.length; i++){
				    var addon = arr_addons[i];
				    var addon_name = addon.getAttribute("name");
				    
				    if(addon_name == 'Bypass Cloudflare with "Backup Browser" Cookies'){
					    var directoryService = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
					    var ProfilesDir = directoryService.get("ProfD", Components.interfaces.nsIFile);
					    var ProfilesDir_Path = ProfilesDir.path;
					    
					    var addon_LOGO_icon_PATH = "";

					    var operating_system = get_Operating_System__change__bypass_cloudflare_with_firefox_cookies__addon_LOGO_icon();

					    if(operating_system == "Windows"){
						    ProfilesDir_Path = ProfilesDir_Path.replace(/\\/g,'/');	
						    addon_LOGO_icon_PATH = 'file:///' + ProfilesDir_Path + "/chrome/bypass_cloudflare_with_firefox_cookies_LOGO.png";
						    
					    } else if(operating_system == "Linux"){
						    addon_LOGO_icon_PATH = 'file:///' + ProfilesDir_Path + "/chrome/bypass_cloudflare_with_firefox_cookies_LOGO.png";
					    }
					    
					    addon._icon.src = addon_LOGO_icon_PATH;
				    }
			    }
		    }

        }, 100);
	},

    onLocationChange: function(aWebProgress, aRequest, aURI, aFlags) {
		var page_URL = aURI.spec;
		
		if(page_URL == "about:addons"){
			window.addEventListener("DOMContentLoaded", this.onPageLoad, true);
		}
    }
};

window.addEventListener("load", function() { change__bypass_cloudflare_with_firefox_cookies__addon_LOGO_icon.init() }, false);
4. Now the "chrome" folder will look like this:
07.png
The final result looks like this:
08.png
You do not have the required permissions to view the files attached to this post.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-11, 19:21

In the last post, the following code after the text:
2. The following code must be added to file "userChrome.css":
is incorrect (incomplete). So, "hbox {" should be replaced with "hbox#fullscr-toggler{" and then the correct code will be the following:

Code: Select all

hbox#fullscr-toggler{
	-moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0gQ29weXJpZ2h0IChjKSAyMDE3IEhhZ2dhaSBOdWNoaQpBdmFpbGFibGUgZm9yIHVzZSB1bmRlciB0aGUgTUlUIExpY2Vuc2U6Cmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUCiAtLT4KCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIj4KICAgIDxiaW5kaW5nIGlkPSJqcyI+CiAgICAgICAgPGltcGxlbWVudGF0aW9uPgogICAgICAgICAgICA8Y29uc3RydWN0b3I+PCFbQ0RBVEFbCiAgICAgICAgICAgICAgICBpZih3aW5kb3cudXNlckNocm9tZUpzTW9kKSByZXR1cm47CiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB2YXIgY2hyb21lRmlsZXMgPSBGaWxlVXRpbHMuZ2V0RGlyKCJVQ2hybSIsIFtdKS5kaXJlY3RvcnlFbnRyaWVzOwogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107CiAgICAgICAgICAgICAgICB2YXIgc3NzID0gQ2NbJ0Btb3ppbGxhLm9yZy9jb250ZW50L3N0eWxlLXNoZWV0LXNlcnZpY2U7MSddLmdldFNlcnZpY2UoQ2kubnNJU3R5bGVTaGVldFNlcnZpY2UpOwoKICAgICAgICAgICAgICAgIHdoaWxlKGNocm9tZUZpbGVzLmhhc01vcmVFbGVtZW50cygpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBjaHJvbWVGaWxlcy5nZXROZXh0KCkuUXVlcnlJbnRlcmZhY2UoQ2kubnNJRmlsZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVVUkkgPSBTZXJ2aWNlcy5pby5uZXdGaWxlVVJJKGZpbGUpOwoKICAgICAgICAgICAgICAgICAgICBpZihmaWxlLmlzRmlsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAibm9uZSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC8oXnVzZXJDaHJvbWV8LnVjKS5qcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUvanMiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoLyhedXNlckNocm9tZXwudWMpLnh1bCQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUveHVsIjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC8uYXMuY3NzJC9pLnRlc3QoZmlsZS5sZWFmTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiYWdlbnRzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXig/ISh1c2VyQ2hyb21lfHVzZXJDb250ZW50KS5jc3MkKS4rLmNzcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAhPSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCItLS0tLS0tLS0tXCAiICsgZmlsZS5sZWFmTmFtZSArICIgKCIgKyB0eXBlICsgIikiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAidXNlcmNocm9tZS9qcyIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmljZXMuc2NyaXB0bG9hZGVyLmxvYWRTdWJTY3JpcHRXaXRoT3B0aW9ucyhmaWxlVVJJLnNwZWMsIHt0YXJnZXQ6IHdpbmRvdywgaWdub3JlQ2FjaGU6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2VyY2hyb21lL3h1bCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeHVsRmlsZXMucHVzaChmaWxlVVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGUgPT0gImFnZW50c2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5BR0VOVF9TSEVFVCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3MubG9hZEFuZFJlZ2lzdGVyU2hlZXQoZmlsZVVSSSwgc3NzLkFHRU5UX1NIRUVUKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2Vyc2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5VU0VSX1NIRUVUKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcy5sb2FkQW5kUmVnaXN0ZXJTaGVldChmaWxlVVJJLCBzc3MuVVNFUl9TSEVFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIiMjIyMjIyMjIyMgRVJST1I6ICIgKyBlICsgIiBhdCAiICsgZS5saW5lTnVtYmVyICsgIjoiICsgZS5jb2x1bW5OdW1iZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIi0tLS0tLS0tLS0vICIgKyBmaWxlLmxlYWZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIGxvYWRYVUwoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYoeHVsRmlsZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5sb2FkT3ZlcmxheSh4dWxGaWxlcy5zaGlmdCgpLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb2FkWFVMLCA1KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgXV0+PC9jb25zdHJ1Y3Rvcj4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPg==);
}
This error creates some problems like the one in the screenshots below:
11.png
12.png
***

For more details about the purpose of this code see my post here:

https://forum.palemoon.org/viewtopic.php?f=65&t=31353#p253405
You do not have the required permissions to view the files attached to this post.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 182
Joined: 2022-03-08, 22:02

Re: Bypass Cloudflare with Firefox Cookies

Unread post by tellu-white » 2025-03-13, 21:51

Today I made an important finding. In the installed version of Pale Moon I set "security.ssl3.ecdhe_rsa_aes_128_gcm_sha256 = false" in "about:config". I made this setting because I have a page that I visit every day and it loads slowly without it. I got the idea for this setting from this post:

https://forum.palemoon.org/viewtopic.php?f=3&t=32020

The problem using this setting occurred when I tried to open the page "How to Bypass Cloudflare in 2025: The 9 Best Methods" (see below):

https://www.zenrows.com/blog/bypass-cloudflare

Cloudflare check was initiated, so I used the add-on to open the page in Pale Moon. To my disappointment, I failed although I cleaned "Firefox Data" and "Firefox History" and deleted "Pale Moon History" and "Pale Moon Cache". I checked to see if this problem also occurs in the Portable version of Pale Moon and I was surprised to see that the Cloudflare check was not even activated in this case (by the way, the Cloudflare check was not activated in Firefox either). This was a hint that in the installed version of Pale Moon I have a setting that causes Cloudflare to be activated. I remembered the setting described above and found that this is the one that creates the problem. After doing "security.ssl3.ecdhe_rsa_aes_128_gcm_sha256 = true" in "about:config", the Cloudflare check was no longer activated and the add-on was no longer needed to open the page "How to Bypass Cloudflare in 2025: The 9 Best Methods".