fix looping decrypt key,
This commit is contained in:
parent
ea448c9fe1
commit
68869b9c80
1 changed files with 345 additions and 341 deletions
|
@ -28,7 +28,7 @@ internal class Utils
|
|||
|
||||
private const int SPIF_SENDWININICHANGE = 2;
|
||||
|
||||
private string[] bannedlist = new string[6] { "booru.allthefallen.moe", "mega.nz", "thecontrolapp.co.uk/Pages/ControlPC", "paradroid-gamma.vercel", "imagekit.io/tools/asset-public-link", "paradroid-gamma.web.app" };
|
||||
private string[] bannedlist = new string[1] { "thecontrolapp.co.uk/Pages/ControlPC", };
|
||||
|
||||
private string[] bannedref = new string[2] { "money", "pay" };
|
||||
|
||||
|
@ -36,19 +36,21 @@ internal class Utils
|
|||
|
||||
public void writetolog(string shortvr, string longvr)
|
||||
{
|
||||
shortvr = shortvr + "~~" + Decrypt(shortvr);
|
||||
longvr = longvr + "~~" + Decrypt(longvr);
|
||||
if (ConfigurationManager.AppSettings["Logging"] == "On")
|
||||
writetolog(shortvr, longvr, false);
|
||||
}
|
||||
|
||||
public void writetolog(string shortvr, string longvr, bool isDecrypted)
|
||||
{
|
||||
if (ConfigurationManager.AppSettings["Logging"] == "On")
|
||||
if (!isDecrypted)
|
||||
{
|
||||
shortvr = Decrypt(shortvr);
|
||||
longvr = Decrypt(longvr);
|
||||
}
|
||||
shortvr = shortvr + "\n";
|
||||
longvr = longvr + "\n";
|
||||
File.AppendAllText("log.txt", shortvr);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText("log.txt", longvr);
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"{shortvr}: {longvr}");
|
||||
}
|
||||
|
||||
public string[] GetLatestItem()
|
||||
|
@ -68,7 +70,7 @@ internal class Utils
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
writetolog("Error running process \n\r", ex.Message);
|
||||
writetolog("Error running process", ex.Message);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -206,7 +208,7 @@ internal class Utils
|
|||
{
|
||||
ret = false;
|
||||
new CustomMessage("Sending file to server failed", "", 4, tts: false).ShowDialog();
|
||||
writetolog("Error sending ftp process \n\r", ex.Message);
|
||||
writetolog("Error sending ftp process", ex.Message);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -255,7 +257,7 @@ internal class Utils
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
writetolog("Error getting outstanding \n\r", ex.Message);
|
||||
writetolog("Error getting outstanding", ex.Message);
|
||||
}
|
||||
return returned;
|
||||
}
|
||||
|
@ -314,10 +316,11 @@ internal class Utils
|
|||
ToReturn = ToReturn.Replace("]", "aaa");
|
||||
ToReturn = ToReturn.Replace("G0", "ppp");
|
||||
ToReturn = ToReturn.Replace("0x", "lll");
|
||||
writetolog("Encrypted: " + Line , ToReturn, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
writetolog("Error enrypt " + Line + "\n\r", ex.Message);
|
||||
writetolog("Error enrypt " + Line , ex.Message, true);
|
||||
}
|
||||
return ToReturn;
|
||||
}
|
||||
|
@ -346,10 +349,11 @@ internal class Utils
|
|||
cryptoStream.Write(inputbyteArray, 0, inputbyteArray.Length);
|
||||
cryptoStream.FlushFinalBlock();
|
||||
ToReturn = Encoding.UTF8.GetString(ms.ToArray());
|
||||
writetolog("Decrypted: " + Line , ToReturn, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
writetolog("Decrypt error for : " + Line + "\n\r", ex.Message);
|
||||
writetolog("Decrypt error for : " + Line , ex.Message, true);
|
||||
}
|
||||
return ToReturn;
|
||||
}
|
||||
|
@ -379,7 +383,7 @@ internal class Utils
|
|||
catch (Exception ex)
|
||||
{
|
||||
filename = "FAILED";
|
||||
writetolog("Error getting file for : " + url + "\n\r", ex.Message);
|
||||
writetolog("Error getting file for : " + url , ex.Message);
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
@ -983,7 +987,7 @@ internal class Utils
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
writetolog("Error getting webcam \n\r", ex.Message);
|
||||
writetolog("Error getting webcam", ex.Message);
|
||||
}
|
||||
break;
|
||||
case "7=":
|
||||
|
@ -1027,7 +1031,7 @@ internal class Utils
|
|||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
writetolog("Error proccessing for : " + line + "\n\r", ex2.Message);
|
||||
writetolog("Error proccessing for : " + line , ex2.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue