Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fanbox now uses Cloudflare #1342

Open
3 tasks done
biggestsonicfan opened this issue Jun 26, 2024 · 72 comments
Open
3 tasks done

Fanbox now uses Cloudflare #1342

biggestsonicfan opened this issue Jun 26, 2024 · 72 comments

Comments

@biggestsonicfan
Copy link
Contributor

Prerequisites

Description

All fanbox functions now create a AttributeError: 'str' object has no attribute 'decode' error due to new protections.

Steps to Reproduce

  1. Use any Fanbox functions

Expected behavior:
Fanbox downloads

Actual behavior:
Fanbox blocked

Log file:
pixivutil.log

Versions

Latest git as of d0bfaae
You can get this information from executing PixivUtil2.py --help.
Latest version available in https://github.com/Nandaka/PixivUtil2/releases

@shinji257
Copy link

I was just about to report this. I noticed this on my phone I think late last night where there was a captcha but wasn't sure why it was there then today discovered the downloader couldn't work because of it.

I enabled http debugging and this might provide more insight. This request gives an indicator that a CloudFlare challenge was given to be handled.

https://gist.github.com/shinji257/f0d3a4defa75037d1c61dd534a628750

(Reposted with new gist -- removed fanbox session id)

@biggestsonicfan
Copy link
Contributor Author

Theoretically, this will probably just be temporary and resolve itself on it's own, going away after "whatever" it is that needed Cloudflare captchas is over.

@shinji257
Copy link

Luckily this only impacts Fanbox. Downloads from Pixiv still work fine.

@Phenrei
Copy link

Phenrei commented Jun 26, 2024

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

@emerladCoder
Copy link

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

@Ouachitajess
Copy link

If you have a VPN you can set it for a Japanese IP and it will bypass Cloudflare captchas. I was able to download with no issues once I changed locations.

@calboi91
Copy link

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

@Phenrei
Copy link

Phenrei commented Jun 27, 2024

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

They're not currently supported/added by main branch, I had to add them in and also edit the cookie loading function to allow adding in a cookie value beyond the session id, as the current method resets the cookie jar on use and only sets that one cookie type. I just knew about these being a thing from my work with gallery-dl code so I knew that as long as you match those and the user-agent you can often bypass those captcha checks at least in the short term.

@usernameisalreadytakendammit

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

They're not currently supported/added by main branch, I had to add them in and also edit the cookie loading function to allow adding in a cookie value beyond the session id, as the current method resets the cookie jar on use and only sets that one cookie type. I just knew about these being a thing from my work with gallery-dl code so I knew that as long as you match those and the user-agent you can often bypass those captcha checks at least in the short term.

how and where did you edit the cookie loading function?

@emerladCoder
Copy link

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

They're not currently supported/added by main branch, I had to add them in and also edit the cookie loading function to allow adding in a cookie value beyond the session id, as the current method resets the cookie jar on use and only sets that one cookie type. I just knew about these being a thing from my work with gallery-dl code so I knew that as long as you match those and the user-agent you can often bypass those captcha checks at least in the short term.

how and where did you edit the cookie loading function?

Is this still needed? I wasn't getting any Cloudflare when accessing from my location anymore.

For reference, the way I did it for my local copy is noted below. Pretty hacky IMO, but it was working when I was still getting Cloudflare for Fanbox. This only adds the cookies for Fanbox, not Pixiv.

  1. Add the below 2 entries under the Authentication header in the config.ini
[Authentication]
cf_clearance = <cf_clearance COOKIE FROM BROWSER>
cf_bm = <__cf_bm COOKIE FROM BROWSER>
  1. Add the below two lines in the class PixivConfig() in the __items array in PixivConfig.py to load those into the _config for use in later
ConfigItem("Authentication", "cf_clearance", ""),
ConfigItem("Authentication", "cf_bm", ""),
  1. Add the below to use these cookies in the fanboxLoginUsingCookie function in PixivBrowserFactory.py
if self._config.cf_clearance != "":
    ck1 = http.cookiejar.Cookie(version=0, name='cf_clearance', value=self._config.cf_clearance, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck1)
if self._config.cf_bm != "":
    ck2 = http.cookiejar.Cookie(version=0, name='__cf_bm', value=self._config.cf_bm, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck2)

@shinji257
Copy link

Yes. I'm still getting the cloudflare challenge here when using the default build. If I VPN to Japan the challenge is subverted.

@calboi91
Copy link

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

They're not currently supported/added by main branch, I had to add them in and also edit the cookie loading function to allow adding in a cookie value beyond the session id, as the current method resets the cookie jar on use and only sets that one cookie type. I just knew about these being a thing from my work with gallery-dl code so I knew that as long as you match those and the user-agent you can often bypass those captcha checks at least in the short term.

how and where did you edit the cookie loading function?

Is this still needed? I wasn't getting any Cloudflare when accessing from my location anymore.

For reference, the way I did it for my local copy is noted below. Pretty hacky IMO, but it was working when I was still getting Cloudflare for Fanbox. This only adds the cookies for Fanbox, not Pixiv.

1. Add the below 2 entries under the Authentication header in the `config.ini`
[Authentication]
cf_clearance = <cf_clearance COOKIE FROM BROWSER>
cf_bm = <__cf_bm COOKIE FROM BROWSER>
2. Add the below two lines in the `class PixivConfig()`  in the `__items` array in `PixivConfig.py` to load those into the _config for use in later
ConfigItem("Authentication", "cf_clearance", ""),
ConfigItem("Authentication", "cf_bm", ""),
3. Add the below to use these cookies in the `fanboxLoginUsingCookie` function in `PixivBrowserFactory.py`
if self._config.cf_clearance != "":
    ck1 = http.cookiejar.Cookie(version=0, name='cf_clearance', value=self._config.cf_clearance, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck1)
if self._config.cf_bm != "":
    ck2 = http.cookiejar.Cookie(version=0, name='__cf_bm', value=self._config.cf_bm, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck2)

Thanks for this. I added this code to my local copy and it works now.

@usernameisalreadytakendammit
Copy link

usernameisalreadytakendammit commented Jun 29, 2024

Sry, I'm new to this
at what line do you have to add code 3? because when I try it, i still get

in fanboxLoginUsingCookie
if '"user":{"isLoggedIn":true' in str(parsed.decode('utf-8')):
^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Unknown Error, please check the log file: (<class 'AttributeError'>, AttributeError("'str' object has no attribute 'decode'"), <traceback object at 0x0000017D42965BC0>)

@calboi91
Copy link

If this doesn't get removed, I have a local version now that is able to load the cf_clearance and __cf_bm cookies copied from a browser that has bypassed the check, which works as long as you mirror the user-agent of that browser in config.ini. I doubt those cookies would stay valid between download sessions for very long but at I was at least able to update rips of all my paid accounts through pixivutil once I copied them over.

Thanks for this work around. I was also able to download my supported fanbox users by adding those two cookies to my config and then using them in the fanboxLoginUsingCookie function in my local copy.

How do you add the other cookies to the config? Right now there is only the cookieFanbox value that is the FANBOXSESSID.

They're not currently supported/added by main branch, I had to add them in and also edit the cookie loading function to allow adding in a cookie value beyond the session id, as the current method resets the cookie jar on use and only sets that one cookie type. I just knew about these being a thing from my work with gallery-dl code so I knew that as long as you match those and the user-agent you can often bypass those captcha checks at least in the short term.

how and where did you edit the cookie loading function?

Is this still needed? I wasn't getting any Cloudflare when accessing from my location anymore.
For reference, the way I did it for my local copy is noted below. Pretty hacky IMO, but it was working when I was still getting Cloudflare for Fanbox. This only adds the cookies for Fanbox, not Pixiv.

  1. Add the below 2 entries under the Authentication header in the config.ini
[Authentication]
cf_clearance = <cf_clearance COOKIE FROM BROWSER>
cf_bm = <__cf_bm COOKIE FROM BROWSER>
  1. Add the below two lines in the class PixivConfig() in the __items array in PixivConfig.py to load those into the _config for use in later
ConfigItem("Authentication", "cf_clearance", ""),
ConfigItem("Authentication", "cf_bm", ""),
  1. Add the below to use these cookies in the fanboxLoginUsingCookie function in PixivBrowserFactory.py
if self._config.cf_clearance != "":
    ck1 = http.cookiejar.Cookie(version=0, name='cf_clearance', value=self._config.cf_clearance, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck1)
if self._config.cf_bm != "":
    ck2 = http.cookiejar.Cookie(version=0, name='__cf_bm', value=self._config.cf_bm, port=None,
                                port_specified=False, domain='fanbox.cc', domain_specified=False,
                                domain_initial_dot=False, path='/', path_specified=True,
                                secure=False, expires=None, discard=True, comment=None,
                                comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
    self.addCookie(ck2)

Sry, I'm new to this at what line do you have to add code 3? because when I try it, i still get

in fanboxLoginUsingCookie if '"user":{"isLoggedIn":true' in str(parsed.decode('utf-8')): ^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? Unknown Error, please check the log file: (<class 'AttributeError'>, AttributeError("'str' object has no attribute 'decode'"), <traceback object at 0x0000017D42965BC0>)

I added it here:

@usernameisalreadytakendammit
Copy link

usernameisalreadytakendammit commented Jun 30, 2024

guess im doing something wrong cuz its not working for me :c

@biggestsonicfan
Copy link
Contributor Author

The above instructions worked for me. Let's try not to flood the issue with overly large quotes.

Someone could make a temporary fork with the code, unless @Nandaka decides to integrate this upstream somehow.

@Nandaka
Copy link
Owner

Nandaka commented Jun 30, 2024

@biggestsonicfan sure, just send me a pull request 😄

@FriedGenera
Copy link

@biggestsonicfan I'm getting the same error as @usernameisalreadytakendammit after pulling the latest commit, I checked the cookies were correct and my useragent is the same as my browser

@HetareKing
Copy link

HetareKing commented Jun 30, 2024

@FriedGenera
@usernameisalreadytakendammit
I had the same problem until I made my user agent more complete. So, for example, not just Mozilla/5.0, but Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

Edit: Also, make sure it's the Fanbox cookies, not the Pixiv cookies.

@Zombie10
Copy link

Zombie10 commented Jun 30, 2024

Mozilla/5.0, but Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

@HetareKing I did what you say, still not working.

image

WhatsApp Image 2024-06-30 at 06 09 52
Screenshot 2024-06-30 at 6 03 58 AM

@usernameisalreadytakendammit
Copy link

usernameisalreadytakendammit commented Jun 30, 2024

Because its the last day of the month and time was running out but i still couldnt get that script to work, as a last ditch effort, i used urban vpn to get a japanese ip for free. That was the only way for me to get it to work :c

@biggestsonicfan
Copy link
Contributor Author

biggestsonicfan commented Jun 30, 2024

I'm thinking the check shouldn't be a string compare anymore but maybe a json decode and checks for keys. Lemme see what I can do. It won't fix the issue, but it won't crash the program anymore and we can properly handle the error.

EDIT: So the error appears to be happening here:

while True:
res = None
try:
res = self.open(url, data, timeout)
return res
except urllib.error.HTTPError:
if res is not None:
print(f"Error Code: {res.code}")
print(f"Response Headers: {res.headers}")
if res.code == '302':
print(f"Redirect to {res.headers['location']}")
raise

self.open ends up with an urllib.error.HTTPError however since res is equal to None type, there's no error to print.

EDIT2: Ah, of course, we're getting a HTTP Error 403: Forbidden, as expected. I think we can handle that.

EDIT3: Graceful handling of the Cloudflare CAPTCHA challenge failures should be handled in #1345.

@fireattack
Copy link
Contributor

fireattack commented Jul 1, 2024

I had the same problem until I made my user agent more complete. So, for example, not just Mozilla/5.0, but Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

People use useragent = Mozilla/5.0 to workaround another block Pixiv has on login.
Indeed, if I change it to my full UA, I failed very early at doLogin() with "Cannot Login!".

Now, keeping it as-is, and added cf_clearance and cf_bm cookies in config, I still can't download fanbox just like @Zombie10

@localappdata
Copy link

localappdata commented Jul 1, 2024

Using @biggestsonicfan's PR:
Failed FANBOX Cloudflare CAPTCHA challenge, please check your cookie and user-agent settings.

cf_clearance and cf_bm both set to cf_clearance and __cf_bm values, checked PHPSESSID, should I change the UA as well? It's still Mozilla/5.0 here.

Edit: Changed the UA to my browser's full UA, Fanbox now works again. Thanks!

(Might want to update the version shown by the way, it's still using 20230105.)

Edit2: Beam resets every hour which triggers the captcha again and both cookie values have to be set again manually or the user will run into the above error.

@MarqFJA87
Copy link

MarqFJA87 commented Jul 1, 2024

I cannot find the cf_clearance cookie at all. Where is it supposed to be found?

EDIT: Found it using the developer tools. Doesn't work, though. And changing my UA results in an immediate failure to login at all.

@gnarf1975
Copy link

gnarf1975 commented Jul 1, 2024

Can you please write occasionally in a way that non-experts can understand?
Or how about a proper update after all this time?
Because not everyone knows about this stuff.

Thanks

@MarqFJA87
Copy link

@localappdata

Edit: Changed the UA to my browser's full UA, Fanbox now works again. Thanks!

How did you avoid having the Pixiv login failure that would result from using the full UA?

@biggestsonicfan
Copy link
Contributor Author

Okay, I'm betting now that you're getting a different type of cloudflare error, which boggles my mind, but let me create a fork that will dump whatever page you are getting so we can see what's happening.

@MarqFJA87
Copy link

MarqFJA87 commented Jul 1, 2024

Oh come on. And I had just been enjoying the sudden vanishing of a wholly different mysterious problem that impeded my ability to download from Fantia, Skeb and other sites - among other kinds of access-related issues - without using a VPN.

I hope that we can get to the bottom of this soon.

@biggestsonicfan
Copy link
Contributor Author

biggestsonicfan commented Jul 1, 2024

Go ahead and try my fork here and see if it spits out a An unknown FANBOX error occured - Cannot login.html file in your PixivUtil2 directory. If it does, maybe that can help us figure out what's going on.

@MarqFJA87
Copy link

It did not spit out any such file, unfortunately.

@biggestsonicfan
Copy link
Contributor Author

Can you move your logs to a different folder (or clear them if you're okay with that) and send me a fresh log of just trying to download one fanbox item? You can remove your id or anything else in the log you don't want others to see but I'm curious if there's anything else in there that will help me figure this out. I cannot reproduce this.

@MarqFJA87
Copy link

Here you go.

pixivutil.log

@biggestsonicfan
Copy link
Contributor Author

biggestsonicfan commented Jul 1, 2024

2024-07-02 02:34:35,640 - PixivUtil20230105 - INFO - Starting with argument: [D:\Programs\Bulk downloaders\PixivUtil2\PixivUtil2.exe].

I think I found the problem. Lol. We are all using the Python interpreter to run PixivUtil2.py. I had no idea running PixivUtil2.exe would attempt to try to execute scripts in the same directory.

Executing PixivUtil2.exe in the same directory as the up-to-date master python scripts does indeed throw the same error you are getting.

@MarqFJA87
Copy link

Wait, what??? Then what am I supposed to execute, then?!

@nomakewan
Copy link

Wait, what??? Then what am I supposed to execute, then?!

Hey there! Remember when I told you...

You are wading into a technical discussion on github regarding python source code, FYI.

I was not joking. You are supposed to be executing PixivUtil2.py directly. As an example, on Windows you could use WinPython to give yourself the appropriate libraries and binaries, and then open PixivUtil2.py using python.exe.

@MarqFJA87
Copy link

MarqFJA87 commented Jul 2, 2024

I got this error when I tried to execute directly from the command prompt UI.

Traceback (most recent call last):
  File "D:\Programs\Python\Python310\lib\site-packages\requests_toolbelt\_compat.py", line 48, in <module>
    from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (D:\Programs\Python\Python310\lib\site-packages\urllib3\contrib\__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Programs\Bulk downloaders\PixivUtil2\PixivUtil2.py", line 19, in <module>
    import PixivArtistHandler
  File "D:\Programs\Bulk downloaders\PixivUtil2\PixivArtistHandler.py", line 8, in <module>
    import PixivBrowserFactory
  File "D:\Programs\Bulk downloaders\PixivUtil2\PixivBrowserFactory.py", line 29, in <module>
    from PixivOAuth import PixivOAuth
  File "D:\Programs\Bulk downloaders\PixivUtil2\PixivOAuth.py", line 14, in <module>
    import cloudscraper
  File "D:\Programs\Python\Python310\lib\site-packages\cloudscraper\__init__.py", line 10, in <module>
    from requests_toolbelt.utils import dump
  File "D:\Programs\Python\Python310\lib\site-packages\requests_toolbelt\__init__.py", line 12, in <module>
    from .adapters import SSLAdapter, SourceAddressAdapter
  File "D:\Programs\Python\Python310\lib\site-packages\requests_toolbelt\adapters\__init__.py", line 12, in <module>
    from .ssl import SSLAdapter
  File "D:\Programs\Python\Python310\lib\site-packages\requests_toolbelt\adapters\ssl.py", line 16, in <module>
    from .._compat import poolmanager
  File "D:\Programs\Python\Python310\lib\site-packages\requests_toolbelt\_compat.py", line 50, in <module>
    from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (D:\Programs\Python\Python310\lib\site-packages\urllib3\contrib\__init__.py)

What do I do now?

@nomakewan
Copy link

You should not be cluttering this issue with basic Python troubleshooting questions that are wholly unrelated to PixivUtil2 and the recent Cloudflare transition.

However, I will be incredibly nice and hold your hand just this once. As indicated by this answer on stackoverflow, you can try to update requests-toolbelt in order to get a version that is compatible with urllib3 2.0.0. You would do this by running the command pip install --upgrade requests-toolbelt.

Considering your inexperience, however, this will likely just result in more errors. For example, did you read the part on the main github readme about installing all of PixivUtil2's dependencies listed in requirements.txt? If not, make sure you install all of those dependencies as well.

Best of luck. And if all this is over your head, just wait until a new version is released.

@MarqFJA87
Copy link

MarqFJA87 commented Jul 2, 2024

It's finally working! Thank you for being patient with me, nomakewan. Those updates were the last pieces missing from the puzzle.

@gnarf1975
Copy link

Best of luck. And if all this is over your head, just wait until a new version is released.

The latest version is from January 2023 and there will probably be no new updates. And I don't know enough about this shit.

Greetings to the developer: I'm waiting!

@cocokakao
Copy link

Last update is over a year old, any hope??

@MarqFJA87
Copy link

The issue is no longer present on my end. Seems like Fanbox has downgraded their Cloudflare security mode?

@Nandaka
Copy link
Owner

Nandaka commented Jul 3, 2024

@gnarf1975 https://github.com/Nandaka/PixivUtil2/releases/tag/v20240703

also backup your old files! Got some issue with compilation to exe file, so I still recommend to run from source code...

@usernameisalreadytakendammit

seems it only works on firefox for me. for Google chrome i still get the error cuz it doesnt accept google chrome user agent x)

@shinji257
Copy link

Pulled down the newest version. As per this issue I logged into Pixiv and Fanbox using Firefox then grabbed both of their session cookies. Updated user agent to match the Firefox browser used. Used CF tokens from Fanbox (they have different tokens). Working like a charm without a VPN. Thanks!

@SSoM
Copy link

SSoM commented Jul 6, 2024

Newest release. UserAgent updated. cookieFanbox and cf_clearance accounted for. Still doesn't work.

"Error processing FANBOX post: ==> (post id) Failed FANBOX Cloudflare CAPTCHA challenge, please check your cookie and user-agent settings."

Works with VPN but I thought the issue was resolved so as to not need that. Readme does not help at all.

@biggestsonicfan
Copy link
Contributor Author

You are missing the __cf_bm cookie then.

The Readme can not help you as this issue is too new and ongoing to document.

If the issue persists, perhaps the user/pass functionality of PixivUtil2 should be removed altogether in favor of parsing cookies from the browser.

@esserius
Copy link

esserius commented Jul 8, 2024

You are missing the __cf_bm cookie then.

The Readme can not help you as this issue is too new and ongoing to document.

If the issue persists, perhaps the user/pass functionality of PixivUtil2 should be removed altogether in favor of parsing cookies from the browser.

Is there an explanation somewhere for how to capture these right now? cf_clearance and cf_bm?

@usernameisalreadytakendammit

You are missing the __cf_bm cookie then.
The Readme can not help you as this issue is too new and ongoing to document.
If the issue persists, perhaps the user/pass functionality of PixivUtil2 should be removed altogether in favor of parsing cookies from the browser.

Is there an explanation somewhere for how to capture these right now? cf_clearance and cf_bm?

use inspect elements

@Uraratan
Copy link

Uraratan commented Jul 10, 2024

1
hello this new update i have a problem,

i redone all cookies and setting but i keep getting

Error getting FANBOX artist by id: ***** ==> Failed FANBOX Cloudflare CAPTCHA challenge, please check your cookie and user-agent settings. i have no clue how tosolve this please help

@usernameisalreadytakendammit

1 hello this new update i have a problem,

i redone all cookies and setting but i keep getting

Error getting FANBOX artist by id: ***** ==> Failed FANBOX Cloudflare CAPTCHA challenge, please check your cookie and user-agent settings. i have no clue how tosolve this please help

Did you also copy paste your user agent in the config file?

@Uraratan
Copy link

useragent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
this ?

@usernameisalreadytakendammit

useragent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0 this ?

If that's the useragent of your firefox browser then yes

@Uraratan
Copy link

Uraratan commented Jul 28, 2024

thats in my config file

@usernameisalreadytakendammit

thats in my config file

Is that the one thats in the config file by default?
cuz you have to go to inspect elements to get your useragent and replace the one in config with yours and dont forget to refresh the fanbox page to make sure your cf_clearance and cf_bm is up to date

@FriedGenera
Copy link

thats in my config file

Is that the one thats in the config file by default? cuz you have to go to inspect elements to get your useragent and replace the one in config with yours and dont forget to refresh the fanbox page to make sure your cf_clearance and cf_bm is up to date

@usernameisalreadytakendammit is this on a completely new profile on Firefox? I keep getting captcha error

@FriedGenera
Copy link

@biggestsonicfan @usernameisalreadytakendammit Yea seems that on a completely freshly built chromium browser it works just fine, I'll check which of the settings in the Firefox menu/about:config is causing the issues with the Cloudflare cookies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests