Closed aetnaeus closed 1 month ago
Are you using CDRM or your own Wildvine keys?
im having the same problem and im using the cdrm
Same issue here, i don't know if it is related but chrome started blocking the Cookies yesterday. So they probs have clued onto how to block the downloader. Chrome Notification below
Reading cookie in cross-site context will be blocked in future Chrome versions Cookies with the SameSite=None; Secure and not Partitioned attributes that operate in cross-site contexts are third-party cookies. In future Chrome versions, reading third-party cookies will be blocked. This behavior protects user data from cross-site tracking. Please refer to the article linked to learn more about preparing your site to avoid potential breakage.
I don't think that's related at all. Try the browser extension for auth.json. and try to get your own keys if you're using CDRM.
cdrm-project has changed the site so I need to adjust the code to work with the new site which I will do later today
already fixed problem with cdrm-project, here modified function, already tested;)
public async Task<string> GetDecryptionKey(Dictionary<string, string> drmHeaders, string licenceURL, string pssh, Auth auth)
{
try
{
string dcValue = string.Empty;
StringBuilder sb = new();
sb.Append("{\n");
sb.AppendFormat(" \"License URL\": \"{0}\",\n", licenceURL);
sb.Append(" \"Headers\": \"{");
foreach (KeyValuePair<string, string> header in drmHeaders)
{
if (header.Key == "time" || header.Key == "user-id")
{
sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value);
}
else
{
sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value);
}
}
sb.Remove(sb.Length - 1, 1);
sb.Append("}\",\n");
sb.AppendFormat(" \"PSSH\": \"{0}\"\n", pssh);
sb.Append(",\"JSON\":\"\",\"Cookies\":\"\",\"Data\":\"\"");
sb.Append('}');
string json = sb.ToString();
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Post, "https://cdrm-project.com/")
{
Content = new StringContent(json, Encoding.UTF8, "application/json")
};
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
var doc = JsonDocument.Parse(body);
dcValue = doc.RootElement.GetProperty("Message").GetString().Trim();
return dcValue;
}
catch (Exception ex)
{
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
Log.Error("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
if (ex.InnerException != null)
{
Console.WriteLine("\nInner Exception:");
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
Log.Error("Inner Exception: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
}
}
return null;
}
ok i dont know how to add this code, is it in the updated file of something ?
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
Seems like this only works if run with docker, but not the .exe? any idea to solve this for .exe runs?
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
Seems like this only works if run with docker, but not the .exe? any idea to solve this for .exe runs?
windows search -> type "PowerShell" -> in results you should see app "Windows PowerShell" -> open context menu on this app and choose "Run as administrator"
in PowerShell paste a command dotnet build "[path on your machine to source code]\OF-DL-master\OF DL.sln"
newly compiled OF DL.exe appear in OF-DL-master\OF DL\bin\ subfolder Debug or Release
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
Seems like this only works if run with docker, but not the .exe? any idea to solve this for .exe runs?
windows search -> type "PowerShell" -> in results you should see app "Windows PowerShell" -> open context menu on this app and choose "Run as administrator"
in PowerShell paste a command dotnet build "[path on your machine to source code]\OF-DL-master\OF DL.sln"
newly compiled OF DL.exe appear in OF-DL-master\OF DL\bin\ subfolder Debug or Release
How would you find the path to source code?
:) download this project as zip file and unpack it - directory with unpacked files will be [path on your machine to source code]
:) download this project as zip file and unpack it - directory with unpacked files will be [path on your machine to source code]
When building I get this error
\OF-DL-OFDLV1.7.56\OF DL\Helpers\APIHelper.cs(25,26): error CS0738: 'APIHelper' does not implement interface member 'IAPIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)'. 'APIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)' cannot implement 'IAPIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)' beca
use it does not have the matching return type of 'Task
:) download this project as zip file and unpack it - directory with unpacked files will be [path on your machine to source code]
When building I get this error
\OF-DL-OFDLV1.7.56\OF DL\Helpers\APIHelper.cs(25,26): error CS0738: 'APIHelper' does not implement interface member 'IAPIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)'. 'APIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)' cannot implement 'IAPIHelper.GetDecryptionKey(Dictionary<string, string>, string, string, Auth)' beca use it does not have the matching return type of 'Task'
probably you edited file APIHelper.cs but copied only the part of function, i updated comment - now it's markup is correct, replace function code in original APIHelper.cs again
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
Seems like this only works if run with docker, but not the .exe? any idea to solve this for .exe runs?
windows search -> type "PowerShell" -> in results you should see app "Windows PowerShell" -> open context menu on this app and choose "Run as administrator"
in PowerShell paste a command dotnet build "[path on your machine to source code]\OF-DL-master\OF DL.sln"
newly compiled OF DL.exe appear in OF-DL-master\OF DL\bin\ subfolder Debug or Release
When building I get this error
path on your machine to source code\OF DL\Helpers\APIHelper.cs(2384,23): error CS0103: The name 'JsonDocument' does not exist in the current context. [path on your machine to source code\OF-DL-master\OF DL\OF DL.csproj] 803 warnings 1 error
ok i dont know how to add this code, is it in the updated file of something ?
file \OF-DL-master\OF DL\Helpers\APIHelper.cs find function GetDecryptionKey and replace it with modified one i posted previously
Seems like this only works if run with docker, but not the .exe? any idea to solve this for .exe runs?
windows search -> type "PowerShell" -> in results you should see app "Windows PowerShell" -> open context menu on this app and choose "Run as administrator" in PowerShell paste a command dotnet build "[path on your machine to source code]\OF-DL-master\OF DL.sln" newly compiled OF DL.exe appear in OF-DL-master\OF DL\bin\ subfolder Debug or Release
When building I get this error
path on your machine to source code\OF DL\Helpers\APIHelper.cs(2384,23): error CS0103: The name 'JsonDocument' does not exist in the current context. [path on your machine to source code\OF-DL-master\OF DL\OF DL.csproj] 803 warnings 1 error
same
I could build it adding System.Text.Json. to the line with the name JsonDocument:
var doc = System.Text.Json.JsonDocument.Parse(body);
But I still get an error when it tries to download a DRM video:
Exception caught: Response status code does not indicate success: 500 (INTERNAL SERVER ERROR). StackTrace: at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
sorry, code that use JsonDocument will not build without using System.Text.Json;
today something changed again on "https://cdrm-project.com/ i also geting 500 (INTERNAL SERVER ERROR). working on it
function that work today)
add on top of the file APIHelper.cs using System.Text.Json;
and replace function GetDecryptionKey
public async Task<string> GetDecryptionKey(Dictionary<string, string> drmHeaders, string licenceURL, string pssh, Auth auth)
{
try
{
string dcValue = string.Empty;
StringBuilder sb = new();
sb.Append("{\n");
sb.AppendFormat(" \"License URL\": \"{0}\",\n", licenceURL);
sb.Append(" \"Headers\": \"{");
foreach (KeyValuePair<string, string> header in drmHeaders)
{
if (header.Key == "time" || header.Key == "user-id")
{
sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value);
}
else
{
sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value);
}
}
sb.Remove(sb.Length - 1, 1);
sb.Append("}\",\n");
sb.AppendFormat(" \"PSSH\": \"{0}\"\n", pssh);
sb.Append(",\"JSON\":\"\",\"Cookies\":\"\",\"Data\":\"\",\"Proxy\":\"\"");
sb.Append('}');
string json = sb.ToString();
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Post, "https://cdrm-project.com/")
{
Content = new StringContent(json, Encoding.UTF8, "application/json")
};
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
var doc = JsonDocument.Parse(body);
dcValue = doc.RootElement.GetProperty("Message").GetString().Trim();
return dcValue;
}
catch (Exception ex)
{
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
Log.Error("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
if (ex.InnerException != null)
{
Console.WriteLine("\nInner Exception:");
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
Log.Error("Inner Exception: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
}
}
return null;
}
you can simply use exe that i build now OF DL.zip
function that work today)
add on top of the file APIHelper.cs using System.Text.Json;
and replace function GetDecryptionKey
public async Task<string> GetDecryptionKey(Dictionary<string, string> drmHeaders, string licenceURL, string pssh, Auth auth) { try { string dcValue = string.Empty; StringBuilder sb = new(); sb.Append("{\n"); sb.AppendFormat(" \"License URL\": \"{0}\",\n", licenceURL); sb.Append(" \"Headers\": \"{"); foreach (KeyValuePair<string, string> header in drmHeaders) { if (header.Key == "time" || header.Key == "user-id") { sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value); } else { sb.AppendFormat("\\\"{0}\\\": \\\"{1}\\\",", header.Key, header.Value); } } sb.Remove(sb.Length - 1, 1); sb.Append("}\",\n"); sb.AppendFormat(" \"PSSH\": \"{0}\"\n", pssh); sb.Append(",\"JSON\":\"\",\"Cookies\":\"\",\"Data\":\"\",\"Proxy\":\"\""); sb.Append('}'); string json = sb.ToString(); HttpClient client = new(); HttpRequestMessage request = new(HttpMethod.Post, "https://cdrm-project.com/") { Content = new StringContent(json, Encoding.UTF8, "application/json") }; using var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); var doc = JsonDocument.Parse(body); dcValue = doc.RootElement.GetProperty("Message").GetString().Trim(); return dcValue; } catch (Exception ex) { Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace); Log.Error("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace); if (ex.InnerException != null) { Console.WriteLine("\nInner Exception:"); Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace); Log.Error("Inner Exception: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace); } } return null; }
you can simply use exe that i build now OF DL.zip
Where to put this exe file?
also added some tweaks for myself:
if you consider this features useful please let me know - i'll create pr for this
OF DL.zip can be used to fix already installed app, or you can get official release and replace 'OF DL.exe'
also added some tweaks for myself:
- filter for Posts, you can download only those you added to bookmarks. for this add parameter to config.json "DownloadOnlyAddedToBookmarks": true,
- download only short videos (like tiktoks) for example Asian_sexdoll have awesome short videos, but not so awesome long. for this add parameter to config.json "DownloadOnlyVideosShorterThan": 100,
if you consider this features useful please let me know - i'll create pr for this
OF DL.zip can be used to fix already installed app, or you can get official release and replace 'OF DL.exe'
I cannot run exe when using one i compiled or one from your zip, it doesnt open
build finished successfully? what error you get when open my exe?
If it's the same as me - nothing. I acquired the newest version and replaced the exe with yours. No error, no window popup, nada - nothing happens.
yes nothing happens, when i use the compiled exe or you exe.
the compiled exe is only 156 KB, the original exe is 67 000KB
you can see why app fail here eventvwr.exe (windows) i tried to reproduce your case and found log event
Description: A .NET application failed. Application: OF DL.exe Path: C:\Users\38050\Downloads\OF.DL.V1.7.56\OF DL.exe Message: The application to execute does not exist: 'C:\Users\38050\Downloads\OF.DL.V1.7.56\OF DL.dll'.
now I see - published app is just one big exe file 65 mb without dll files when you build locally you get small 'OF DL.exe' and bunch of dll so you need to put all those files to your working directory
still dont work
have you tried to run app from build directory?
yes, also doesnt open
send screen of your build directory
run eventvwr.exe from cmd to view log find last error event after you try to run app (windows logs -> application) looks like this https://cdn.mos.cms.futurecdn.net/YzCNiF9cxQEbHRCsExioW8-1200-80.jpg
ah ty, it works now. I did not have .net7, only .net8. I installed 7 and now its ok.
Aye, cheers kibitzz. Followed your instructions to create my own exe file, slapped it with the rest of the build files, and now everything is groovy.
I get this same exception every time i try to download a DRM protected post/content.