Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
skydevil88 committed Jul 26, 2024
1 parent 58b2109 commit cbf438f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 743 deletions.
36 changes: 1 addition & 35 deletions XboxDownload/ClassWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace XboxDownload
{
internal class ClassWeb
{
public static string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
public static string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36";
private static IHttpClientFactory? httpClientFactory;

public static void HttpClientFactory()
Expand Down Expand Up @@ -474,40 +474,6 @@ public static Byte[] DeCompress(Byte[] buffer, String contentencoding)
return buffer;
}
}

internal static Object docLock = new();
internal static WebBrowser? webb = null;
internal static HtmlDocument? doc = null;

public static void SetHtmlDocument(string strHtml, bool executeScript)
{
if (Application.OpenForms[0].InvokeRequired)
{
Application.OpenForms[0].Invoke(new MethodInvoker(() => { SetHtmlDocument(strHtml, executeScript); }));
return;
}
if (!executeScript)
{
strHtml = Regex.Replace(strHtml, "<script", "<!--<script", RegexOptions.IgnoreCase);
strHtml = Regex.Replace(strHtml, "</script>", "</script>!-->", RegexOptions.IgnoreCase);
}
webb = new WebBrowser() { ScriptErrorsSuppressed = true };
webb.Navigate("about:blank");
doc = webb.Document.OpenNew(true);
doc.Write(strHtml);
}

public static void ObjectDisposed()
{
if (Application.OpenForms[0].InvokeRequired)
{
Application.OpenForms[0].Invoke(new MethodInvoker(() => { ObjectDisposed(); }));
return;
}
doc = null;
webb?.Dispose();
webb = null;
}
}

internal class SocketPackage
Expand Down
125 changes: 7 additions & 118 deletions XboxDownload/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cbf438f

Please sign in to comment.