sim0n00ps / OF-DL

C# console app to download all of the media from Onlyfans accounts with DRM video downloading support
846 stars 70 forks source link

Unable to correctly configure auth.json after browser clearing #412

Closed ikuiku992 closed 5 months ago

ikuiku992 commented 5 months ago

1) after browser clearing i have proceeded to do the same steps for auth.json Screenshot: fail auth

2) secondly, i can only find "list?r[]" instead of "list?r2[]"

sim0n00ps commented 5 months ago

Are you on the latest version? You don't actually need to look for that specific endpoint, you can look at any request to the API and you should be able to get the required information, if you're struggling as always you can use the browser extension

peddanet commented 5 months ago

My system: Ubuntu 22.04, Firefox , Cyberghost VPN (have tried switching off as well) I downloaded the sorce code tarball and run:

dotnet publish -c release -r linux-x64 --self-contained false

That worked fine, until Wednesday I guess...Thanks to the auth extension it is really easy to get the auth.json.

Since at least today I have issues with the browser extension as well, It did not work. I cleared cache, use v1.7.60 instead of 59. The new version also demands a rules.json, but authentication always fail in APIHelper.cs:213... What can I do?

# linux-x64/publish$ ./OF\ DL 
 __        __         _                                       _             
 \ \      / /   ___  | |   ___    ___    _ __ ___     ___    | |_    ___    
  \ \ /\ / /   / _ \ | |  / __|  / _ \  | '_ ` _ \   / _ \   | __|  / _ \   
   \ V  V /   |  __/ | | | (__  | (_) | | | | | | | |  __/   | |_  | (_) |  
    \_/\_/     \___| |_|  \___|  \___/  |_| |_| |_|  \___|    \__|  \___/   

   ___    _____           ____    _     
  / _ \  |  ___|         |  _ \  | |    
 | | | | | |_     _____  | | | | | |    
 | |_| | |  _|   |_____| | |_| | | |___ 
  \___/  |_|             |____/  |_____|

auth.json located successfully!
config.json located successfully!
FFmpeg located successfully
device_client_id_blob and/or device_private_key missing, 
https://cdrm-project.com/ will be used instead for DRM protected videos
Exception caught: Could not find file '/home//Projects/OF-DL-OFDLV1.7.60/OF DL/bin/Release/net7.0/linux-x64/publish/rules.json'.

StackTrace:    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.ReadAllText(String path, Encoding encoding)
   at OF_DL.Helpers.APIHelper.GetDynamicHeaders(String path, String queryParams) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 51
   at OF_DL.Helpers.APIHelper.BuildHttpRequestMessage(Dictionary`2 getParams, String endpoint) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 93
   at OF_DL.Helpers.APIHelper.GetUserInfo(String endpoint) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 203

Auth failed, please check the values in auth.json are correct.

If you have previously been able to auth successfully, the most likely cause of 
this is that your browser has updated, which will change the values of the 
USER_AGENT string. The version change to this string is usually very minor and 
easy to overlook, but even a slight difference will cause an authentication 
failure.

If you are struggling to authenticate, you may want to try the browser extension
which is documented here:

https://of-dl.gitbook.io/of-dl/auth#browser-extension

Press any key to exit
sim0n00ps commented 5 months ago

My system: Ubuntu 22.04, Firefox , Cyberghost VPN (have tried switching off as well) I downloaded the sorce code tarball and run:

dotnet publish -c release -r linux-x64 --self-contained false

That worked fine, until Wednesday I guess...Thanks to the auth extension it is really easy to get the auth.json.

Since at least today I have issues with the browser extension as well, It did not work. I cleared cache, use v1.7.60 instead of 59. The new version also demands a rules.json, but authentication always fail in APIHelper.cs:213... What can I do?

# linux-x64/publish$ ./OF\ DL 
 __        __         _                                       _             
 \ \      / /   ___  | |   ___    ___    _ __ ___     ___    | |_    ___    
  \ \ /\ / /   / _ \ | |  / __|  / _ \  | '_ ` _ \   / _ \   | __|  / _ \   
   \ V  V /   |  __/ | | | (__  | (_) | | | | | | | |  __/   | |_  | (_) |  
    \_/\_/     \___| |_|  \___|  \___/  |_| |_| |_|  \___|    \__|  \___/   

   ___    _____           ____    _     
  / _ \  |  ___|         |  _ \  | |    
 | | | | | |_     _____  | | | | | |    
 | |_| | |  _|   |_____| | |_| | | |___ 
  \___/  |_|             |____/  |_____|

auth.json located successfully!
config.json located successfully!
FFmpeg located successfully
device_client_id_blob and/or device_private_key missing, 
https://cdrm-project.com/ will be used instead for DRM protected videos
Exception caught: Could not find file '/home//Projects/OF-DL-OFDLV1.7.60/OF DL/bin/Release/net7.0/linux-x64/publish/rules.json'.

StackTrace:    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.ReadAllText(String path, Encoding encoding)
   at OF_DL.Helpers.APIHelper.GetDynamicHeaders(String path, String queryParams) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 51
   at OF_DL.Helpers.APIHelper.BuildHttpRequestMessage(Dictionary`2 getParams, String endpoint) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 93
   at OF_DL.Helpers.APIHelper.GetUserInfo(String endpoint) in /home//Projects/OF-DL-OFDLV1.7.60/OF DL/Helpers/APIHelper.cs:line 203

Auth failed, please check the values in auth.json are correct.

If you have previously been able to auth successfully, the most likely cause of 
this is that your browser has updated, which will change the values of the 
USER_AGENT string. The version change to this string is usually very minor and 
easy to overlook, but even a slight difference will cause an authentication 
failure.

If you are struggling to authenticate, you may want to try the browser extension
which is documented here:

https://of-dl.gitbook.io/of-dl/auth#browser-extension

Press any key to exit

The latest release uses a local copy of the dynamic rules as the repos have been deleted, you need to make sure that rules.json has been copied from the latest release and is in the correct directory

peddanet commented 5 months ago

https://github.com/sim0n00ps/OF-DL/issues/397#issuecomment-2168204418

Thanks @sim0n00ps ! I found the other thread! And copied the json from wayback machine! But I guess iit is not in the source tarball of the latest release 1.7.60?

sim0n00ps commented 5 months ago

The JSON file is in the latest release zip file

peddanet commented 5 months ago

Ah there is no rule to automatically copy it to publish! THanks!

ikuiku992 commented 5 months ago

Are you on the latest version? You don't actually need to look for that specific endpoint, you can look at any request to the API and you should be able to get the required information, if you're struggling as always you can use the browser extension

Cleared the browser once more and started with the new version now is fine!