update to v0.1.2

This commit is contained in:
Merith 2025-03-18 18:05:19 -07:00
parent ddd2ea9eb5
commit ea448c9fe1
16 changed files with 1072 additions and 6773 deletions

View file

@ -36,8 +36,8 @@ internal class Utils
public void writetolog(string shortvr, string longvr)
{
shortvr = Decrypt(shortvr);
longvr = Decrypt(longvr);
shortvr = shortvr + "~~" + Decrypt(shortvr);
longvr = longvr + "~~" + Decrypt(longvr);
if (ConfigurationManager.AppSettings["Logging"] == "On")
{
if (ConfigurationManager.AppSettings["Logging"] == "On")
@ -312,6 +312,8 @@ internal class Utils
ToReturn = ToReturn.Replace("&", "yyy");
ToReturn = ToReturn.Replace("/", "zzz");
ToReturn = ToReturn.Replace("]", "aaa");
ToReturn = ToReturn.Replace("G0", "ppp");
ToReturn = ToReturn.Replace("0x", "lll");
}
catch (Exception ex)
{
@ -329,6 +331,8 @@ internal class Utils
Line = Line.Replace("yyy", "&");
Line = Line.Replace("zzz", "/");
Line = Line.Replace("aaa", "]");
Line = Line.Replace("ppp", "G0");
Line = Line.Replace("lll", "0x");
string publickey = "santhosh";
string privatekey = "engineer";
byte[] privatekeyByte = Encoding.UTF8.GetBytes(privatekey);
@ -363,6 +367,7 @@ internal class Utils
using CustomMessage cm = new CustomMessage("Downloading Image please wait", "", 0, tts: false);
cm.Show();
using HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0");
using Task<Stream> s = client.GetStreamAsync(trueuri);
s.Wait();
using (FileStream fs = new FileStream(filename, FileMode.Create))
@ -449,6 +454,14 @@ internal class Utils
found = true;
}
}
array = blist;
foreach (string bref2 in array)
{
if (what.Contains(bref2) && bref2 != "")
{
found = true;
}
}
if (!found)
{
ret.Add(line);
@ -482,17 +495,17 @@ internal class Utils
{
bool found2 = false;
string[] array = bannedref;
foreach (string bref2 in array)
foreach (string bref3 in array)
{
if (what.Contains(bref2))
if (what.Contains(bref3))
{
found2 = true;
}
}
array = blist;
foreach (string bref3 in array)
foreach (string bref4 in array)
{
if (what.Contains(bref3))
if (what.Contains(bref4) && bref4 != "")
{
found2 = true;
}
@ -510,17 +523,17 @@ internal class Utils
{
bool found3 = false;
string[] array = bannedref;
foreach (string bref4 in array)
foreach (string bref5 in array)
{
if (what.Contains(bref4))
if (what.Contains(bref5))
{
found3 = true;
}
}
array = blist;
foreach (string bref5 in array)
foreach (string bref6 in array)
{
if (what.Contains(bref5))
if (what.Contains(bref6) && bref6 != "")
{
found3 = true;
}
@ -542,10 +555,27 @@ internal class Utils
{
ret.Add(line);
}
if (which == "L=")
{
ret.Add(line);
}
}
return ret.ToArray();
}
public bool IsWebPage(string input)
{
if (Uri.TryCreate(input, UriKind.Absolute, out Uri uriResult))
{
if (!(uriResult.Scheme == Uri.UriSchemeHttp))
{
return uriResult.Scheme == Uri.UriSchemeHttps;
}
return true;
}
return false;
}
public void run_process(string[] lines, string from)
{
lines = remove_notneeded(lines);
@ -612,7 +642,7 @@ internal class Utils
{
case "D=":
{
string thefile2 = "";
string thefile3 = "";
if (!isfile)
{
Process.Start(new ProcessStartInfo
@ -623,11 +653,11 @@ internal class Utils
}
else
{
thefile2 = Get_File(what);
thefile3 = Get_File(what);
}
if (thefile2 != "FAILED")
if (thefile3 != "FAILED")
{
new CustomMessage("File downloaded! Find it here : " + thefile2, "", 4, tts: false).ShowDialog();
new CustomMessage("File downloaded! Find it here : " + thefile3, "", 4, tts: false).ShowDialog();
}
goto end_IL_0064;
}
@ -642,11 +672,54 @@ internal class Utils
});
continue;
}
string thefile3 = "";
thefile3 = Get_File(what);
if (thefile3 != "FAILED")
string thefile4 = "";
thefile4 = Get_File(what);
if (thefile4 != "FAILED")
{
Change_Wallpaper(thefile3);
Change_Wallpaper(thefile4);
}
goto end_IL_0064;
}
case "L=":
{
bool done2 = false;
foreach (Form fm2 in Application.OpenForms)
{
if (fm2.GetType() == typeof(SubLoop))
{
((SubLoop)fm2).additem(what);
done2 = true;
}
}
if (done2)
{
continue;
}
string appDirectory = AppDomain.CurrentDomain.BaseDirectory + "\\ConstantSubList.txt";
string filetype = Path.GetExtension(what);
if (new string[9] { ".jpg", ".jpeg", ".gif", ".mov", ".mpg", ".mpeg", ".avi", ".png", ".mp4" }.Contains(filetype))
{
what = Get_File(what);
if (what != "FAILED")
{
using StreamWriter writer = File.AppendText(appDirectory);
writer.WriteLine("[m],[" + what + "]");
}
continue;
}
if (!IsWebPage(what) && what != "FAILED")
{
using (StreamWriter writer2 = File.AppendText(appDirectory))
{
writer2.WriteLine("[t],[" + what + "]");
}
continue;
}
what = Get_File(what);
if (what != "FAILED")
{
using StreamWriter writer3 = File.AppendText(appDirectory);
writer3.WriteLine("[m],[" + what + "]");
}
goto end_IL_0064;
}
@ -656,17 +729,17 @@ internal class Utils
{
continue;
}
string thefile4 = "";
thefile4 = Get_File(what);
if (thefile4 != "FAILED")
string thefile2 = "";
thefile2 = Get_File(what);
if (thefile2 != "FAILED")
{
if (ConfigurationManager.AppSettings["AutoRun"] == "True")
{
Process.Start(thefile4);
Process.Start(thefile2);
}
else
{
new CustomMessage("Exe downloaded! Find it here : " + thefile4, "", 4, tts: false).ShowDialog();
new CustomMessage("Exe downloaded! Find it here : " + thefile2, "", 4, tts: false).ShowDialog();
}
}
goto end_IL_0064;
@ -747,16 +820,16 @@ internal class Utils
}
if (popstyle2 == "Serial")
{
bool done2 = false;
foreach (Form fm2 in Application.OpenForms)
bool done3 = false;
foreach (Form fm3 in Application.OpenForms)
{
if (fm2.GetType() == typeof(PopUp))
if (fm3.GetType() == typeof(PopUp))
{
((PopUp)fm2).add_url(what);
done2 = true;
((PopUp)fm3).add_url(what);
done3 = true;
}
}
if (!done2)
if (!done3)
{
new PopUp(what).Show();
}
@ -869,7 +942,7 @@ internal class Utils
what = what.Replace(" ", "%20");
Process.Start(new ProcessStartInfo
{
FileName = "https://twitter.com/intent/tweet?text=" + what + " [Posted by :]&url=www.thecontrolapp.co.uk",
FileName = "https://x.com/intent/tweet?text=" + what + " [Posted by :]&url=www.thecontrolapp.co.uk",
UseShellExecute = true
});
goto end_IL_0064;
@ -884,16 +957,25 @@ internal class Utils
switch (which)
{
case "5=":
new CustomMessage(what, "", 4, tts: true).ShowDialog();
new CustomMessage(what, "", 4, tts: true).Show();
break;
case "6=":
try
{
Bitmap image = new VideoCapture(0, VideoCapture.API.Any).QueryFrame().ToBitmap();
string filename2 = "web" + ConfigurationManager.AppSettings["UserName"].ToString() + from + DateTime.Now.Date.ToString().Replace("/", "").Replace(" ", "")
.Replace(":", "") + ".jpg";
string filePath2 = ConfigurationManager.AppSettings["LocalDrive"] + filename2;
new Bitmap(image, new Size(image.Width / 2, image.Height / 2)).Save(filePath2);
string filename2 = "";
string filePath2 = "";
if (ConfigurationManager.AppSettings["WebCnt"] != null && ConfigurationManager.AppSettings["WebCnt"].ToString() == "True")
{
new CustomMessage("Webcam picture in 5...4...3...2...1...", "", 5, tts: false).Show();
}
using (VideoCapture capture = new VideoCapture(0, VideoCapture.API.Any))
{
using Bitmap image = capture.QueryFrame().ToBitmap();
filename2 = "web" + ConfigurationManager.AppSettings["UserName"].ToString() + from + DateTime.Now.Date.ToString().Replace("/", "").Replace(" ", "")
.Replace(":", "") + ".jpg";
filePath2 = ConfigurationManager.AppSettings["LocalDrive"] + filename2;
new Bitmap(image, new Size(Convert.ToInt16((double)image.Width / 1.5), Convert.ToInt16((double)image.Height / 1.5))).Save(filePath2);
}
if (sendftpfile(filePath2))
{
sendcmd(from, Ecrypt("U=FTP" + filename2) + "|||", all: false);
@ -907,11 +989,11 @@ internal class Utils
case "7=":
{
bool found3 = false;
foreach (Form fm4 in Application.OpenForms)
foreach (Form fm5 in Application.OpenForms)
{
if (fm4.GetType() == typeof(Blank))
if (fm5.GetType() == typeof(Blank))
{
((Blank)fm4).add_time(1);
((Blank)fm5).add_time(1);
found3 = true;
}
}
@ -925,11 +1007,11 @@ internal class Utils
case "8=":
{
bool found2 = false;
foreach (Form fm3 in Application.OpenForms)
foreach (Form fm4 in Application.OpenForms)
{
if (fm3.GetType() == typeof(Blank))
if (fm4.GetType() == typeof(Blank))
{
((Blank)fm3).add_time(1);
((Blank)fm4).add_time(1);
found2 = true;
}
}