diff --git a/Form1.cs b/Form1.cs index a3aa9b7..66983d2 100644 --- a/Form1.cs +++ b/Form1.cs @@ -253,7 +253,7 @@ private async void btnDownload_ClickAsync(object sender, EventArgs e) string lastURL = ""; List EVs = new List(); - //Get the MEGA link by getting response of download link + //Get the MEGA link by getting response of download link !NOT USED! /* using (var client = new HttpClient(new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip })) { @@ -270,11 +270,19 @@ private async void btnDownload_ClickAsync(object sender, EventArgs e) } */ - //Get MEGA link by decrypting Base64 string in the address + //Check if the MEGA link is encrypted, decrypt Base64 string if it is + //!--- IT LOOKS LIKE THEY ARE NO LONGER ENCRYPTING THE LINKS, BUT KEEPING THIS IN JUST IN CASE ---!// string[] comicLinkArray = comicDLLink.Split('/'); - string comicLinkEnc = comicLinkArray[4]; - byte[] comicLinkConverted = System.Convert.FromBase64String(comicLinkEnc); - megaURL = System.Text.ASCIIEncoding.ASCII.GetString(comicLinkConverted); + if (comicLinkArray[2] != "mega.nz") + { + string comicLinkEnc = comicLinkArray[4]; + byte[] comicLinkConverted = System.Convert.FromBase64String(comicLinkEnc); + megaURL = System.Text.ASCIIEncoding.ASCII.GetString(comicLinkConverted); + } + else + { + megaURL = comicDLLink; + } if (lastURL != megaURL) @@ -593,6 +601,11 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs var htmlNodes = doc.DocumentNode.SelectSingleNode("//a[@title='Mega Link']"); + if (htmlNodes == null) //Check to see if they just renamed the Node + { + htmlNodes = doc.DocumentNode.SelectSingleNode("//a[@title='MEGA']"); + } + if (htmlNodes == null) { foreach (HtmlNode node1 in doc.DocumentNode.SelectNodes("//a")) @@ -616,6 +629,8 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs comicDLLink = htmlNodes.Attributes["href"].Value; } + int didDecrypt = 0; + if (comicDLLink != "") { //string lastEV = ""; @@ -624,11 +639,27 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs //Get MEGA link by decrypting Base64 string in the address string[] comicLinkArray = comicDLLink.Split('/'); - string comicLinkEnc = comicLinkArray[4]; - byte[] comicLinkConverted = System.Convert.FromBase64String(comicLinkEnc); - megaURL = System.Text.ASCIIEncoding.ASCII.GetString(comicLinkConverted); + if (comicLinkArray[2] != "mega.nz") + { + string comicLinkEnc = comicLinkArray[4]; + byte[] comicLinkConverted = System.Convert.FromBase64String(comicLinkEnc); + megaURL = System.Text.ASCIIEncoding.ASCII.GetString(comicLinkConverted); + didDecrypt = 1; + } + else + { + megaURL = comicDLLink; + } - MessageBox.Show("MEGA URL: " + megaURL); + if (didDecrypt == 1) + { + MessageBox.Show("DECRYPTED MEGA URL: " + megaURL); + } + else + { + MessageBox.Show("MEGA URL: " + megaURL); + } + } else diff --git a/bin/Debug/Omnibus.exe b/bin/Debug/Omnibus.exe index 7b30f4a..ef5d526 100644 Binary files a/bin/Debug/Omnibus.exe and b/bin/Debug/Omnibus.exe differ diff --git a/bin/Debug/Omnibus.pdb b/bin/Debug/Omnibus.pdb index f2076a7..973d17a 100644 Binary files a/bin/Debug/Omnibus.pdb and b/bin/Debug/Omnibus.pdb differ diff --git a/obj/Debug/Omnibus.exe b/obj/Debug/Omnibus.exe index 7b30f4a..ef5d526 100644 Binary files a/obj/Debug/Omnibus.exe and b/obj/Debug/Omnibus.exe differ diff --git a/obj/Debug/Omnibus.pdb b/obj/Debug/Omnibus.pdb index f2076a7..973d17a 100644 Binary files a/obj/Debug/Omnibus.pdb and b/obj/Debug/Omnibus.pdb differ diff --git a/obj/Release/Omnibus.csproj.GenerateResource.cache b/obj/Release/Omnibus.csproj.GenerateResource.cache index 92fc884..12c1212 100644 Binary files a/obj/Release/Omnibus.csproj.GenerateResource.cache and b/obj/Release/Omnibus.csproj.GenerateResource.cache differ diff --git a/obj/Release/Omnibus.exe b/obj/Release/Omnibus.exe index 099a5f0..1a52f63 100644 Binary files a/obj/Release/Omnibus.exe and b/obj/Release/Omnibus.exe differ diff --git a/obj/Release/Omnibus.pdb b/obj/Release/Omnibus.pdb index b750159..054681e 100644 Binary files a/obj/Release/Omnibus.pdb and b/obj/Release/Omnibus.pdb differ