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

View file

@ -335,17 +335,10 @@ public class ControlApp : Form
System.Windows.Forms.Cursor.Show(); System.Windows.Forms.Cursor.Show();
Cursor cursor = System.Windows.Forms.Cursor.Current; Cursor cursor = System.Windows.Forms.Cursor.Current;
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor; 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 try
{ {
string user = ConfigurationManager.AppSettings["UserName"].ToString();
string pwd = ConfigurationManager.AppSettings["Password"].ToString();
string vrs = "012"; string vrs = "012";
string result = utils.getcmd(user, pwd, vrs, "Outstanding"); string result = utils.getcmd(user, pwd, vrs, "Outstanding");
string[] ret = utils.seperate_string(result); string[] ret = utils.seperate_string(result);

View file

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

View file

@ -88,7 +88,7 @@ public class Subliminal : Form
private void InitializeComponent() private void InitializeComponent()
{ {
this.label1 = new System.Windows.Forms.Label(); 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(); this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer();
((System.ComponentModel.ISupportInitialize)this.axWindowsMediaPlayer1).BeginInit(); ((System.ComponentModel.ISupportInitialize)this.axWindowsMediaPlayer1).BeginInit();
base.SuspendLayout(); base.SuspendLayout();

View file

@ -5,6 +5,7 @@ using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Linq;
using System.Media; using System.Media;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
@ -35,27 +36,19 @@ internal class Utils
public void writetolog(string shortvr, string longvr) public void writetolog(string shortvr, string longvr)
{ {
shortvr = CleanStringForLog(shortvr); shortvr = Decrypt(shortvr);
longvr = CleanStringForLog(longvr); longvr = Decrypt(longvr);
if (ConfigurationManager.AppSettings["Logging"] == "On") if (ConfigurationManager.AppSettings["Logging"] == "On")
{ {
File.AppendAllText("log.txt", shortvr+ "\n"); if (ConfigurationManager.AppSettings["Logging"] == "On")
{
File.AppendAllText("log.txt", shortvr);
} }
else else
{ {
File.AppendAllText("log.txt", longvr+ "\n"); File.AppendAllText("log.txt", longvr);
} }
} }
public string CleanStringForLog(string stringinput)
{
stringinput = Decrypt(stringinput);
if (stringinput.EndsWith("&&&"))
{
stringinput = stringinput.Substring(0, stringinput.Length - 3);
}
return stringinput;
} }
public string[] GetLatestItem() public string[] GetLatestItem()
@ -204,17 +197,10 @@ internal class Utils
string justfilename = Path.GetFileName(FileName); string justfilename = Path.GetFileName(FileName);
string ftpUsername = "acc929431981"; string ftpUsername = "acc929431981";
string ftpPassword = "6scM67YJ+Ezzz0RKCeIxbT9TAfSbRE++1T"; string ftpPassword = "6scM67YJ+Ezzz0RKCeIxbT9TAfSbRE++1T";
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://home240474283.1and1-data.host/" + justfilename); using WebClient client = new WebClient();
request.Method = "STOR"; client.Credentials = new NetworkCredential(ftpUsername, Decrypt(ftpPassword));
request.Credentials = new NetworkCredential(ftpUsername, Decrypt(ftpPassword)); Uri myuri = new Uri("ftp://home240474283.1and1-data.host/" + justfilename);
byte[] fileContents; client.UploadFile(myuri, "STOR", FileName);
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);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -585,6 +571,12 @@ internal class Utils
string which = decrip.Substring(0, 2); string which = decrip.Substring(0, 2);
string what = decrip.Substring(2, decrip.Length - 2).Trim(); string what = decrip.Substring(2, decrip.Length - 2).Trim();
bool inbanned = false; 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; string[] array2 = bannedlist;
foreach (string banned in array2) foreach (string banned in array2)
{ {

View file

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