Bypass Cloudflare with Firefox Cookies

Dedicated board for extension releases/support threads

Moderators: Lootyhoof, FranklinDM

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
frostknight
Astronaut
Astronaut
Posts: 594
Joined: 2022-08-10, 02:25

Re: Bypass Cloudflare with Firefox Cookies

Post by frostknight » 2025-03-01, 22:14

Sessh wrote:
2025-03-01, 22:10
Any page does all the time on RH.net.
Such a slow webpage for me. I tried loading it, and though I can load pages in this room which is on the same floor of the router. its a N band one. I am a few rooms away.

Point is, I cannot load that website in here.

Must be a bloated pile of hot garbage.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

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

Re: Bypass Cloudflare with Firefox Cookies

Post by back2themoon » 2025-03-01, 22:20

You could also try "clearing up" the extension. Go to about:config, enter:

extensions.bypass_cloudflare

...and right-click/Reset those entries related with stored cookies. No need to reset the initial setup settings. Restart PM.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-01, 22:21

Not sure. It loads up at the snap of my fingers in FF Nightly. Greased lightning. Was always fast on PM too when it worked.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-01, 22:31

back2themoon wrote:
2025-03-01, 22:20
You could also try "clearing up" the extension. Go to about:config, enter:

extensions.bypass_cloudflare

...and right-click/Reset those entries related with stored cookies. No need to reset the initial setup settings. Restart PM.
Did that. It allowed me to import the cookies again. I directly loaded a page that went right to a CF wall in FFN, passed it, copied cookies over to PM, tried to load the same page in PM and it hits CF. I don't get it. It's like the site is treating my browser different than yours OR the older FFN version's cookies just aren't going to get the job done. It's still odd that I can't even access the site's homepage whereas all you guys can without hitting CF. Strange. It's also possible that whatever difference in our browsers is causing that is also causing the cookies to not work. It's only copying over the cf_clearance cookie now though. No others.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-01, 23:04

So I tried messing with this on my Linux laptop. Using FFN, it did make me pass the CF check just to access the homepage there too. Interestingly, it doesn't make me do that on the older Win7 version. However, the bypass-cloudflare plugin refuses to copy cookies from Firefox Nightly at all there. Not even once. It just does nothing. I didn't even try to load RH on that PM because it's too old and can't upgrade to the most modern version of PM and the one it's using has no update yet (it says one is available, but it's not compatible with what I have), so it will probably wig out and crash if I hit a CF prompt on there.

(BTW, to whoever was asking, your Firefox profile data is in ~/.mozilla/firefox on Linux. It's a hidden folder.)

User avatar
frostknight
Astronaut
Astronaut
Posts: 594
Joined: 2022-08-10, 02:25

Re: Bypass Cloudflare with Firefox Cookies

Post by frostknight » 2025-03-02, 01:22

Sessh wrote:
2025-03-01, 23:04

(BTW, to whoever was asking, your Firefox profile data is in ~/.mozilla/firefox on Linux. It's a hidden folder.)
I am aware of the .mozilla/firefox folder's existence, I just didn't know where the firefox cookies were.

Thanks tho.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-02, 01:37

frostknight wrote:
2025-03-02, 01:22
Sessh wrote:
2025-03-01, 23:04

(BTW, to whoever was asking, your Firefox profile data is in ~/.mozilla/firefox on Linux. It's a hidden folder.)
I am aware of the .mozilla/firefox folder's existence, I just didn't know where the firefox cookies were.

Thanks tho.
Did you end up finding them? I don't have my laptop in front of me anymore, but I believe it's in the Profiles/Your-Firefox-Profile folder. You could do a file search in ~/.mozilla/firefox for "cookies.sqlite" and it should find it's location for you if you haven't already.

User avatar
frostknight
Astronaut
Astronaut
Posts: 594
Joined: 2022-08-10, 02:25

Re: Bypass Cloudflare with Firefox Cookies

Post by frostknight » 2025-03-02, 02:01

Sessh wrote:
2025-03-02, 01:37
Did you end up finding them? I don't have my laptop in front of me anymore, but I believe it's in the Profiles/Your-Firefox-Profile folder. You could do a file search in ~/.mozilla/firefox for "cookies.sqlite" and it should find it's location for you if you haven't already.
I did, but I am not 100% sure where I am supposed to put that file once I move it.

Like where in .moonchild productions folder do I put it?
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

nikola_ss
Moongazer
Moongazer
Posts: 11
Joined: 2016-11-26, 04:43

Re: Bypass Cloudflare with Firefox Cookies

Post by nikola_ss » 2025-03-02, 06:53

Bypass Cloudflare with Firefox Cookies Linux

https://youtu.be/Pr2wla6YElo

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5606
Joined: 2015-12-09, 15:45

Re: Bypass Cloudflare with Firefox Cookies

Post by moonbat » 2025-03-02, 07:59

frostknight wrote:
2025-03-02, 02:01
where in .moonchild productions folder do I put it?
In your profile folder, which can be directly launched in your file manager from about:profiles.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
ag0044
Moonbather
Moonbather
Posts: 73
Joined: 2012-04-28, 16:29
Location: Australia

Re: Bypass Cloudflare with Firefox Cookies

Post by ag0044 » 2025-03-02, 12:46

Request: would it be possible to have the text on the toolbar reduced, please? Or, an option to do so?

I like to have both icons and text for items on my toolbar. With Bypass Cloudflare with Firefox Cookies, that single icon's text takes up a lot of space, especially compared to others:
Screenshot - 02-Mar-25 , 11_34_48 PM.png
Perhaps "Bypass CF"?

Apart from that small quibble, it is pleasing to use something that just works. Thank you.
You do not have the required permissions to view the files attached to this post.
Usually, I'm wrong. But, sometimes, I'm right.
Usually, I'm Left. But, sometimes, I'm Right.
Usually, I'm left-handed. But, sometimes, I'm right-handed.

User avatar
gepus
Board Warrior
Board Warrior
Posts: 1006
Joined: 2017-12-14, 12:59

Re: Bypass Cloudflare with Firefox Cookies

Post by gepus » 2025-03-02, 14:05

@ag0044

Customize Toolbar
Show: Icons and text, Icons, Text

Of course you could also edit the extension yourself in case you don't mind meeting some small challenges. ;)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37778
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Bypass Cloudflare with Firefox Cookies

Post by Moonchild » 2025-03-02, 14:57

gepus wrote:
2025-03-02, 14:05
Customize Toolbar
Show: Icons and text, Icons, Text
Not very useful, considering:
ag0044 wrote:
2025-03-02, 12:46
I like to have both icons and text for items on my toolbar.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-02, 15:20

nikola_ss wrote:
2025-03-02, 06:53
Bypass Cloudflare with Firefox Cookies Linux

https://youtu.be/Pr2wla6YElo
Yep. It's frustrating because I do what you do and one of two things happen. Either romhacking.net hits CF when I do the last step anyway or when I click "Get Cookies From Selected Browser + Set Cookies in Pale Moon", nothing happens. When I tried in Linux (Mint 22.1), that's what it does. Nothing. Intermittently, it does nothing on Win7 but even when copying is successful, it still has no effect. I don't get it.

Only differences I can see is that I use FF Nightly for my FF needs (I really just like the Nightly FF logo better) and I am only putting "romhacking.net" to load the page instead of "https://www.romhacking.net" which I don't know if it makes a difference? It loads the page in Firefox just fine when I do that. I will try again later in Windows and I will reset all the addon settings and start from scratch using the full address next time and see if that makes a difference.

However, when I click "Get Cookies From Selected Browser + Set Cookies in Pale Moon" and it does absolutely nothing, I don't know how to fix that or why that would happen.

User avatar
gepus
Board Warrior
Board Warrior
Posts: 1006
Joined: 2017-12-14, 12:59

Re: Bypass Cloudflare with Firefox Cookies

Post by gepus » 2025-03-02, 15:42

Moonchild wrote:
2025-03-02, 14:57
Not very useful, considering:
ag0044 wrote:
2025-03-02, 12:46
I like to have both icons and text for items on my toolbar.
My reply implied the possibility to renounce for the text.
Icons are self-explanatory and if one forgets their meaning he/she can still hover over them.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2025-03-02, 18:25

ag0044 wrote:
2025-03-02, 12:46
Request: would it be possible to have the text on the toolbar reduced, please? Or, an option to do so?
I like to have both icons and text for items on my toolbar. With Bypass Cloudflare with Firefox Cookies, that single icon's text takes up a lot of space, especially compared to other.
Perhaps "Bypass CF"?
I will not reduce the "toolbar text" because it makes it easier to recognize the add-on. However, you can achieve this with the following CSS code copied to the "userChrome.css" file in the "chrome" folder.

Code: Select all

#btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-text{
	display: none !important;
}

#btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-button::after {
	display: block !important;
	content: "Bypass CF" !important;
}
Screenshots:

CSS code:
01.png
Path to "userChrome.css" file - in Windows:
02.png
Path to "userChrome.css" file - in Linux:
03.png
Result:
04.png
Right-Click on Button:
05.png
Click on Button:
06.png
You do not have the required permissions to view the files attached to this post.

User avatar
ag0044
Moonbather
Moonbather
Posts: 73
Joined: 2012-04-28, 16:29
Location: Australia

Re: Bypass Cloudflare with Firefox Cookies

Post by ag0044 » 2025-03-02, 21:50

Gepus, thanks for your suggestions
gepus wrote:
2025-03-02, 14:05
Customize Toolbar
Show: Icons and text, Icons, Text
I like text and icons. Sometimes, the icons do not - to me - accurately reflect what they do. For example, this particular icon suggests - again, to me - that the current page will be opened in Firefox.
Of course you could also edit the extension yourself in case you don't mind meeting some small challenges. ;)
A fair and reasonable suggestion. However, I learnt a few years ago that I am not definitely NOT a programmer/coder. Even at this supposedly simple level. (BAT files are my limit. BASIC was beyond me.)

Tellu-white,
tellu-white wrote:
2025-03-02, 18:25
you can achieve this with the following CSS code copied to the "userChrome.css" file in the "chrome" folder.
Thank you. Just my level.<g> And works perfectly.


Moonchild, thank you for your note.
Usually, I'm wrong. But, sometimes, I'm right.
Usually, I'm Left. But, sometimes, I'm Right.
Usually, I'm left-handed. But, sometimes, I'm right-handed.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by Sessh » 2025-03-03, 00:51

Yeah I dunno. I do the exact steps in the video and get all the "success" messages. Everything is successful (I also deleted all romhacking.net cookies from both browsers before doing this) except the cf_clearance cookie that gets imported into Pale Moon does not work. So I give up. lol It works for everyone else here, so it must work. I just have not the slightest idea why it won't for me on two different computers running two different operating systems although i can't technically really try it on the Linux PC because it won't even copy cookies to Pale Moon at all.

Anyway thanks everyone for trying. :)

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

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2025-03-03, 15:25

Sessh wrote :
... it does nothing on Win7 ...
https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=80#p260295

I had installed on a PC with "Windows 7 - 32-bit" the following browsers:

• Pale Moon 33.6.0
• Pale Moon Portable 33.6.0
• Firefox 115.20.0 ESR
• Firefox Portable 115.20.0 ESR

My add-on worked in all possible combinations (including in Linux tests).

To try to see if I can reproduce your problem, I did the following steps (in Windows):

1. I created on Desktop the folder:

Code: Select all

PaleMoonPortable
2. I downloaded "Pale Moon Portable 33.6.0.1" in that folder:

https://www.palemoon.org/download.shtml
01.png
3. I extracted Pale Moon Portable with double-click on the file (in that folder):
02.png
4. I downloaded "Firefox Portable (Legacy) 115.20.0 ESR" for Windows directly to the Desktop:

https://www.majorgeeks.com/files/details/firefox_esr_portable.html

5. I extracted "Firefox Portable (Legacy) 115.20.0 ESR" directly to the Desktop:
03.png
6. I installed and initialized the add-on with the Firefox paths on the desktop:

Firefox Portable app Path:

C:\Users\XXX\Desktop\FirefoxPortableLegacy115\FirefoxPortable.exe

"cookies.sqlite" file Path:

C:\Users\XXX\Desktop\FirefoxPortableLegacy115\Data\profile\cookies.sqlite

"User Agent" "Firefox Portabl 115.20.0" :

Mozilla/5.0 (Windows NT 6.1; rv:109.0) Gecko/20100101 Firefox/115.0

NOTE: I have "Windows 7 - 32bit" so "Firefox 115.20.0" is the latest version available. If Firefox happens to update (as it happened to me in Linux), then you have to get the "User Agent" from that version after the update, otherwise the add-on won't work.

7. I opened (with copy-paste in "URL bar") the page "romhacking.net". It opened without Cloudflare intervention.

8. I clicked on the "COMMENTS" link on the page. The "COMMENTS" page activated Cloudflare, so I followed the necessary procedures in the add-on.

9. After I completed all the necessary steps, I found (to my disapointment) that the "COMMENTS" page activated Cloudflare again.

10 Trying to understand the reason why the add-on did not work in this case, I did the following actions:

A. I noticed a lot of folders in the folder:

C:\Users\XXX\AppData\Local\Mozilla\Firefox\Profiles

I deleted all these folders:
04.png
B. I deleted all Firefox cache folders (on the desktop):
05.png
C. I cleared "Firefox Data" and "Firefox History" (in Firefox):
06.png
07.png
08.png
D. I deleted all Pale Moon cache files (on the desktop).

E. I cleared "Pale Moon History" and "Pale Moon Cache" (in Pale Moon).

F. I uninstalled the add-on, reinstalled it and initialized it again.

G. I went through all the procedures again to open the "romhacking.net / COMMENTS" page and this time it worked without problems:

09.png
***

I don't know if the steps I did could work for you but I think it's worth trying.

The links for "Pale Moon Portable 33.6.0.1" and "Firefox Portable (Legacy) 115.20.0 ESR" are the ones listed above.
You do not have the required permissions to view the files attached to this post.

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

Re: Bypass Cloudflare with Firefox Cookies

Post by back2themoon » 2025-03-04, 17:29

@tellu-white: This seems like a left-over from previous versions. Perhaps there are more?
Cookies click.png
Made a small update to the extension guide, for logins of the below type. Looks like it's best to log in to the website, too:
Login after CF.png
Extension guide, written for v.6.1:

1. Install the "Bypass Cloudflare with "Backup Browser" Cookies" extension.
2. RIGHT-click the extension's icon (it looks like the Firefox icon), select the first option: Get the Path to the Backup Browser path
3. Point it to "firefox.exe" (or "FirefoxPortable.exe" etc.) in your Firefox installation folder.
4. Right-click the icon again, select the second option: Get the Path to the Cookies file of Backup Browser.
5. Point it to the "cookies.sqlite" file. This is located in your Firefox profile folder.

Now open Firefox and create a new bookmark in Firefox:

6. Set its Name as: Get user agent string (or whatever you prefer)
7. Set its URL as: javascript:void(prompt('navigator.userAgent',navigator.userAgent))
8. Save the Bookmark and click it. It will show you the browser's user agent string. Copy it.

Back on Pale Moon:

9. Right-click the extension's icon and select the third option: Get INSTALLED Backup Browser user agent
10. Paste the string you copied in step 8 above.

The initial, one-time extension setup is complete. Now let's deal with a problem website.

11. Copy the problem website home page URL. If you have to open a browser to copy it, use Firefox.
12. Do NOT visit the website on Pale Moon yet. If you are logged in the problem website on Firefox, then LOG OUT.
13. On Pale Moon: LEFT-click the extension's icon, select the second option: Open Custom URL in Selected Browser.
14. Paste the problem home page URL you copied in step 11 above. The website will now open in Firefox.

PAY ATTENTION TO STEP 15 BELOW

15. You must now pass the malicious Cloudflare check on Firefox.

a) If logging in to the website is needed to make the Cloudflare check appear: log in first, pass the CF check and stop browsing.
b) If the Cloudflare check comes BEFORE the login: pass the CF check first, log in to the website and stop browsing.
c) If there is no logging in involved, then just pass the check and stop browsing.
d) If the Cloudflare check only appears at some specific section of the website then visit that section, pass the check and stop browsing. If it's a website that requires a log in, then log in (and again, stop browsing).

The point of step 15 is to pass the CF check and log in. Nothing else. Log in may come first on some websites.

When the check is passed and the website appears after you successfully logged in (if there is a log in), do not resume browsing in Firefox. Go to Pale Moon now.

Back on Pale Moon:

16. LEFT-click the extension's icon, select the third option: Get Cookies from Selected Browser + Set Cookies in Pale Moon.
17. You should get the successful "Cookies were copied in Pale Moon" prompt. If so, you can now visit the website in Pale Moon.

If you don't see this prompt on step 16, then something went wrong on step 15. Troubleshooting:
On both browsers, press CTRL-H. The history Sidebar will appear. Locate the problem website, right-click it and "Forget About This Site". Make sure there are no entries of this website left there. Do this on both browsers and try again from step 11.
Repeat steps 11-17 for each new problem website.

About the Optional Settings (right-click the icon, Register/Unregister HTTP Observer):

Connections to Cloudflare (specifically: challenges.cloudflare.com) need to be blocked in Pale Moon because they are known to cause stability problems, by courtesy of Cloudflare. The extension can do it for you ("Register" enabled). If you are blocking Cloudflare via other means (uBO, ηMatrix, hosts file etc.) then select "Unregister". Note that the extension's blocking is currently a bit aggressive: it blocks more than just challenges.cloudflare.com. As a result, some pages that don't need a CF check may not display correctly (check... https://www.cloudflare.com/ for example). In such cases, select "Unregister" and only block challenges.cloudflare.com via other means.
You do not have the required permissions to view the files attached to this post.