update to latest version

This commit is contained in:
Merith 2025-02-28 11:27:06 -08:00
parent b69a6ae4a1
commit ddd2ea9eb5
41 changed files with 7918 additions and 7943 deletions

View file

@ -4,7 +4,7 @@
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputType>WinExe</OutputType>
<UseWindowsForms>True</UseWindowsForms>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>netcoreapp8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
@ -12,18 +12,8 @@
</PropertyGroup>
<PropertyGroup>
<RootNamespace />
<ApplicationIcon>App.ico</ApplicationIcon>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile Remove="ControlAppMonolith.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ControlAppMonolith.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Reference Include="HtmlAgilityPack">
<HintPath>C:\ControlApp\HtmlAgilityPack.dll</HintPath>
@ -50,12 +40,4 @@
<HintPath>C:\ControlApp\Emgu.CV.Bitmap.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="App.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Readme.md">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View file

@ -330,63 +330,56 @@ public class ControlApp : Form
}
}
public void chk_next()
{
System.Windows.Forms.Cursor.Show();
Cursor cursor = System.Windows.Forms.Cursor.Current;
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
string user = ConfigurationManager.AppSettings["UserName"].ToString();
string pwd = ConfigurationManager.AppSettings["Password"].ToString();
if (string.IsNullOrEmpty(user) || string.IsNullOrEmpty(pwd))
{
return;
}
try
{
string vrs = "012";
string result = utils.getcmd(user, pwd, vrs, "Outstanding");
string[] ret = utils.seperate_string(result);
Nocomds.Text = ret[0];
whonxtlbl.Text = ret[1];
if (ret[2] == "0")
{
varified = false;
}
else
{
varified = true;
}
ScoreTxt.Text = ret[3];
if (Nocomds.Text != "0")
{
try
{
if (ConfigurationManager.AppSettings["OutstandRemind"] == null || !Convert.ToBoolean(ConfigurationManager.AppSettings["OutstandRemind"].ToString()))
{
if (Nocomds.Text == "1")
{
new CustomMessage("You have " + Nocomds.Text + " outstanding command.", "", 0, tts: true).ShowDialog();
}
else if (Convert.ToInt16(Nocomds.Text) > 1)
{
new CustomMessage("You have " + Nocomds.Text + " outstanding commands.", "", 0, tts: true).ShowDialog();
}
}
}
catch
{
}
}
}
catch (Exception ex)
{
utils.writetolog("Error checking for count", "Error checking for count :" + ex.Message);
}
System.Windows.Forms.Cursor.Current = cursor;
}
public void chk_next()
{
System.Windows.Forms.Cursor.Show();
Cursor cursor = System.Windows.Forms.Cursor.Current;
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
try
{
string user = ConfigurationManager.AppSettings["UserName"].ToString();
string pwd = ConfigurationManager.AppSettings["Password"].ToString();
string vrs = "012";
string result = utils.getcmd(user, pwd, vrs, "Outstanding");
string[] ret = utils.seperate_string(result);
Nocomds.Text = ret[0];
whonxtlbl.Text = ret[1];
if (ret[2] == "0")
{
varified = false;
}
else
{
varified = true;
}
ScoreTxt.Text = ret[3];
if (Nocomds.Text != "0")
{
try
{
if (ConfigurationManager.AppSettings["OutstandRemind"] == null || !Convert.ToBoolean(ConfigurationManager.AppSettings["OutstandRemind"].ToString()))
{
if (Nocomds.Text == "1")
{
new CustomMessage("You have " + Nocomds.Text + " outstanding command.", "", 0, tts: true).ShowDialog();
}
else if (Convert.ToInt16(Nocomds.Text) > 1)
{
new CustomMessage("You have " + Nocomds.Text + " outstanding commands.", "", 0, tts: true).ShowDialog();
}
}
}
catch
{
}
}
}
catch (Exception ex)
{
utils.writetolog("Error checking for count", "Error checking for count :" + ex.Message);
}
System.Windows.Forms.Cursor.Current = cursor;
}
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
{

View file

@ -53,11 +53,17 @@ public class Other : Form
private void Other_Load(object sender, EventArgs e)
{
string userlist = ConfigurationManager.AppSettings["CommonUsers"];
string blist = ConfigurationManager.AppSettings["BlackList"];
if (userlist != null)
{
string[] users = new Utils().seperate_string(userlist);
textBox1.Lines = users;
}
if (blist != null)
{
string[] blists = new Utils().seperate_string(blist);
textBox1.Lines = blists;
}
}
protected override void Dispose(bool disposing)

View file

@ -88,7 +88,7 @@ public class Subliminal : Form
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PopUp));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlApp.PopUp));
this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer();
((System.ComponentModel.ISupportInitialize)this.axWindowsMediaPlayer1).BeginInit();
base.SuspendLayout();

View file

@ -5,6 +5,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Media;
using System.Net;
using System.Net.Http;
@ -33,30 +34,22 @@ internal class Utils
public string[] blist = new string[1] { "" };
public void writetolog(string shortvr, string longvr)
{
shortvr = CleanStringForLog(shortvr);
longvr = CleanStringForLog(longvr);
if (ConfigurationManager.AppSettings["Logging"] == "On")
{
File.AppendAllText("log.txt", shortvr+ "\n");
}
else
{
File.AppendAllText("log.txt", longvr+ "\n");
}
}
public string CleanStringForLog(string stringinput)
{
stringinput = Decrypt(stringinput);
if (stringinput.EndsWith("&&&"))
{
stringinput = stringinput.Substring(0, stringinput.Length - 3);
}
return stringinput;
}
public void writetolog(string shortvr, string longvr)
{
shortvr = Decrypt(shortvr);
longvr = Decrypt(longvr);
if (ConfigurationManager.AppSettings["Logging"] == "On")
{
if (ConfigurationManager.AppSettings["Logging"] == "On")
{
File.AppendAllText("log.txt", shortvr);
}
else
{
File.AppendAllText("log.txt", longvr);
}
}
}
public string[] GetLatestItem()
{
@ -204,17 +197,10 @@ internal class Utils
string justfilename = Path.GetFileName(FileName);
string ftpUsername = "acc929431981";
string ftpPassword = "6scM67YJ+Ezzz0RKCeIxbT9TAfSbRE++1T";
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://home240474283.1and1-data.host/" + justfilename);
request.Method = "STOR";
request.Credentials = new NetworkCredential(ftpUsername, Decrypt(ftpPassword));
byte[] fileContents;
using (StreamReader sourceStream = new StreamReader(FileName))
{
fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
}
request.ContentLength = fileContents.Length;
using Stream requestStream = request.GetRequestStream();
requestStream.Write(fileContents, 0, fileContents.Length);
using WebClient client = new WebClient();
client.Credentials = new NetworkCredential(ftpUsername, Decrypt(ftpPassword));
Uri myuri = new Uri("ftp://home240474283.1and1-data.host/" + justfilename);
client.UploadFile(myuri, "STOR", FileName);
}
catch (Exception ex)
{
@ -585,6 +571,12 @@ internal class Utils
string which = decrip.Substring(0, 2);
string what = decrip.Substring(2, decrip.Length - 2).Trim();
bool inbanned = false;
string blist = ConfigurationManager.AppSettings["BlackList"];
if (blist != null && blist.Length > 0)
{
string[] blists = seperate_string(blist);
bannedlist.Concat(blists);
}
string[] array2 = bannedlist;
foreach (string banned in array2)
{

View file

@ -4,6 +4,8 @@
<clear />
<add key="Logging" value="On" />
<add key="LogLvl" value="1" />
<add key="CommonUsers" value="" />
<add key="BlackList" value="" />
<add key="Showblocked" value="False" />
<add key="Clickthroughpop" value="True" />
<add key="OutstandRemind" value="True" />