Skip to content

Commit

Permalink
aaaaaaaaaa
Browse files Browse the repository at this point in the history
  • Loading branch information
harryeffinpotter committed Jul 16, 2022
1 parent 2d8e0d5 commit 276c7ca
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 148 deletions.
2 changes: 1 addition & 1 deletion ALL-LEGIT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
Expand Down
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ static void Main()
{

bool mutexCreated = false;
mutex = new System.Threading.Mutex(false, "All Legit!.exe", out mutexCreated);
mutex = new System.Threading.Mutex(false, "All Legit.exe", out mutexCreated);

if (!mutexCreated)
{
MessageBox.Show(new Form { TopMost = true },"Loader is already running!!! try again!", "Already Runing!", MessageBoxButtons.OK, MessageBoxIcon.Error)
MessageBox.Show(new Form { TopMost = true },"All Legit is already running!!! try again!", "Already Runing!", MessageBoxButtons.OK, MessageBoxIcon.Error)
;
mutex.Close();
Application.Exit();
Expand Down
1 change: 0 additions & 1 deletion Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public static T[] Concatenate<T>(this T[] first, T[] second)
{
return first;
}

return first.Concat(second).ToArray();
}
}
155 changes: 92 additions & 63 deletions WebFormForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,42 @@ public FileInfo DownloadFile(string url, string destinationFullPathWithName)
public static bool mustsignin = false;
private async void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
DownloadedOnce = false;
string text = "";
var links = webBrowser1.Document.GetElementsByTagName("button");
string text = webBrowser1.DocumentText;
if (text.Contains("Security prompt") && !text.Contains("Please confirm that you are no robot"))
foreach (HtmlElement link in links)
{
foreach (HtmlElement link in links)
{

if (link.GetAttribute("className").Contains("dlcdownload") && !DownloadedOnce)
{
DownloadedOnce = true;
string DLCID = link.OuterHtml;
DLCID = Utilities.RemoveEverythingBeforeFirst(DLCID, "(");
DLCID = Utilities.RemoveEverythingAfterFirst(DLCID, ")");
DLCID = DLCID.Replace("('", "");
DLCID = DLCID.Replace("')", "");
if (!File.Exists($"{MainWindow.CurrentDLC}.dlc"))
{
DownloadFile($"https://filecrypt.co/DLC/{DLCID}.dlc", $"_bin\\{MainWindow.CurrentDLC.ToString()}.dlc");
}
this.Hide();
webBrowser1.Stop();
Utilities.DecryptDLC();
MainWindow.fileDownloading = "";
splashCover.Text = "Please wait...";
webBrowser1.Stop();
this.Close();
}
if (link.InnerHtml.Contains("Confirm this code"))
if (link.GetAttribute("className").Contains("dlcdownload") && !DownloadedOnce)
{
DownloadedOnce = true;
string DLCID = link.OuterHtml;
DLCID = Utilities.RemoveEverythingBeforeFirst(DLCID, "(");
DLCID = Utilities.RemoveEverythingAfterFirst(DLCID, ")");
DLCID = DLCID.Replace("('", "");
DLCID = DLCID.Replace("')", "");
if (!File.Exists($"{MainWindow.CurrentDLC}.dlc"))
{
link.InvokeMember("click");
DownloadFile($"https://filecrypt.co/DLC/{DLCID}.dlc", $"_bin\\{MainWindow.CurrentDLC.ToString()}.dlc");
}
this.Hide();
Utilities.DecryptDLC();
MainWindow.fileDownloading = "";
splashCover.Text = "Please wait...";
Program.form.Show();
}

}
if (!webBrowser1.IsDisposed)
{
text = webBrowser1.DocumentText;

}


if (text.Contains("Security prompt") && !text.Contains("Please confirm that you are no robot"))
{

}
else if (text.Contains("Please confirm that you are no robot"))

Expand Down Expand Up @@ -122,14 +126,14 @@ private async void webBrowser1_DocumentCompleted(object sender, WebBrowserDocume
if (dlcfilefound)
{
this.Hide();
webBrowser1.Stop();
Utilities.DecryptDLC();
MainWindow.fileDownloading = "";
splashCover.Text = "Please wait...";
this.Close();

}
});
}

if (text.Contains("Please enter the correct result"))
{
splashCover.Visible = false;
Expand All @@ -139,54 +143,77 @@ private async void webBrowser1_DocumentCompleted(object sender, WebBrowserDocume
});

}
foreach (HtmlElement link in links)
if (!webBrowser1.IsDisposed)
{

if (link.GetAttribute("className").Contains("dlcdownload") && !DownloadedOnce)

links = webBrowser1.Document.GetElementsByTagName("button");
foreach (HtmlElement link in links)
{

DownloadedOnce = true;
string DLCID = link.OuterHtml;
DLCID = Utilities.RemoveEverythingBeforeFirst(DLCID, "(");
DLCID = Utilities.RemoveEverythingAfterFirst(DLCID, ")");
DLCID = DLCID.Replace("('", "");
DLCID = DLCID.Replace("')", "");
if (!File.Exists($"{MainWindow.CurrentDLC}.dlc"))
if (link.GetAttribute("className").Contains("dlcdownload") && !DownloadedOnce)
{
DownloadFile($"https://filecrypt.co/DLC/{DLCID}.dlc", $"_bin\\{MainWindow.CurrentDLC.ToString()}.dlc");

DownloadedOnce = true;
string DLCID = link.OuterHtml;
DLCID = Utilities.RemoveEverythingBeforeFirst(DLCID, "(");
DLCID = Utilities.RemoveEverythingAfterFirst(DLCID, ")");
DLCID = DLCID.Replace("('", "");
DLCID = DLCID.Replace("')", "");
if (!File.Exists($"{MainWindow.CurrentDLC}.dlc"))
{
DownloadFile($"https://filecrypt.co/DLC/{DLCID}.dlc", $"_bin\\{MainWindow.CurrentDLC.ToString()}.dlc");
}
this.Hide();
Utilities.DecryptDLC();
MainWindow.fileDownloading = "";
splashCover.Text = "Please wait...";
}
if (MainWindow.isloggingin)
{
if (!webBrowser1.IsDisposed)
{
if (link.InnerHtml.Contains("Confirm this code"))
{
link.InvokeMember("click");
}
}
}


}
}
if (!webBrowser1.IsDisposed)
{

if (webBrowser1.DocumentText.Contains("The code you have enter"))
{
this.Hide();
webBrowser1.Stop();
Utilities.DecryptDLC();
MainWindow.fileDownloading = "";
splashCover.Text = "Please wait...";
this.Close();
webBrowser1.Stop();
this.Close();

}
if (link.InnerHtml.Contains("Confirm this code"))
if (text.Contains("Please login to use your PIN code") && !mustsignin)
{
link.InvokeMember("click");
MessageBox.Show(new Form { TopMost = true }, "Please sign in your AllDebrid account!");
mustsignin = true;
}
if (text.Contains("Your device have been activated"))
{
this.Hide();
}
}
if (webBrowser1.DocumentText.Contains("The code you have enter"))
{
this.Close();

}
if (text.Contains("Please login to use your PIN code") && !mustsignin)
{
MessageBox.Show(new Form { TopMost = true }, "Please sign in your AllDebrid account!");
mustsignin = true;
}
if (text.Contains("Your device have been activated"))
{
this.Close();
}

}

private void WebFormForm_Load(object sender, EventArgs e)
private async void WebFormForm_Load(object sender, EventArgs e)
{
while (MainWindow.isDownloading)
{
this.Hide();
await Task.Delay(100);
this.Show();
}

webBrowser1.Visible = true;
splashCover.Visible = false;
var appName = System.IO.Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
Expand All @@ -206,12 +233,14 @@ private void WebFormForm_FormClosing(object sender, FormClosingEventArgs e)
dlcGIF.Visible = false;
dlcGIF.Enabled = false;
webBrowser1.Stop();
webBrowser1.Dispose();
splashCover.Text = "Please wait...";
this.Hide();
Program.form.BringToFront();
LoadedOnce = false;
this.Close();
Program.form.TopMost = true;
Program.form.TopMost = true;
Program.form.BringToFront();

}

}
Expand Down
18 changes: 13 additions & 5 deletions mainWindow.Designer.cs

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

Loading

0 comments on commit 276c7ca

Please sign in to comment.