Remove unused applications and fix panel buttons

This commit is contained in:
Michael 2017-02-04 11:23:58 -05:00
parent 28a087d2d4
commit 22abdea752
23 changed files with 11 additions and 1826 deletions

View file

@ -37,6 +37,7 @@ using API = ShiftOS.WinForms.Tools.ColorPickerDataBackend;
namespace ShiftOS.WinForms.Applications
{
[DefaultTitle("Choose color")]
public partial class ColorPicker : UserControl, IShiftOSWindow
{
public ColorPicker(Color oldcol, string ctc, Action<Color> callback)

View file

@ -35,6 +35,7 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
[DefaultTitle("Information")]
public partial class Dialog : UserControl, IShiftOSWindow, IInfobox
{
public Dialog()

View file

@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications
/// <summary>
///
/// </summary>
[DefaultTitle("Choose file")]
public partial class FileDialog : UserControl, IShiftOSWindow
{
public FileDialog(string[] filetypes, FileOpenerStyle style, Action<string> _callback)

View file

@ -42,6 +42,7 @@ namespace ShiftOS.WinForms.Applications
[Launcher("File Skimmer", true, "al_file_skimmer", "Utilities")]
[RequiresUpgrade("file_skimmer")]
[WinOpen("file_skimmer")]
[DefaultTitle("File Skimmer")]
public partial class FileSkimmer : UserControl, IShiftOSWindow
{
public FileSkimmer()

View file

@ -37,6 +37,7 @@ using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications
{
[DefaultTitle("Choose graphic")]
public partial class GraphicPicker : UserControl, IShiftOSWindow
{
public GraphicPicker(Image old, string name, ImageLayout layout, Action<byte[], Image, ImageLayout> cb)

View file

@ -1,237 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
namespace ShiftOS.WinForms.Applications
{
partial class MUDAuthenticator
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.pnlmain = new System.Windows.Forms.Panel();
this.pnlusers = new System.Windows.Forms.GroupBox();
this.lbusers = new System.Windows.Forms.ListBox();
this.fluserbuttons = new System.Windows.Forms.FlowLayoutPanel();
this.btnview = new System.Windows.Forms.Button();
this.btnrefreshusers = new System.Windows.Forms.Button();
this.pnllogin = new System.Windows.Forms.GroupBox();
this.txtpassword = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnlogin = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.pnlmain.SuspendLayout();
this.pnlusers.SuspendLayout();
this.fluserbuttons.SuspendLayout();
this.pnllogin.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.pnlmain);
this.panel1.Controls.Add(this.pnllogin);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(622, 430);
this.panel1.TabIndex = 0;
//
// pnlmain
//
this.pnlmain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlmain.Controls.Add(this.pnlusers);
this.pnlmain.Location = new System.Drawing.Point(13, 13);
this.pnlmain.Name = "pnlmain";
this.pnlmain.Size = new System.Drawing.Size(597, 405);
this.pnlmain.TabIndex = 1;
this.pnlmain.Visible = false;
//
// pnlusers
//
this.pnlusers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlusers.Controls.Add(this.lbusers);
this.pnlusers.Controls.Add(this.fluserbuttons);
this.pnlusers.Location = new System.Drawing.Point(16, 27);
this.pnlusers.Name = "pnlusers";
this.pnlusers.Size = new System.Drawing.Size(265, 356);
this.pnlusers.TabIndex = 0;
this.pnlusers.TabStop = false;
this.pnlusers.Text = "groupBox1";
//
// lbusers
//
this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbusers.FormattingEnabled = true;
this.lbusers.Location = new System.Drawing.Point(3, 16);
this.lbusers.Name = "lbusers";
this.lbusers.Size = new System.Drawing.Size(259, 308);
this.lbusers.TabIndex = 0;
//
// fluserbuttons
//
this.fluserbuttons.AutoSize = true;
this.fluserbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.fluserbuttons.Controls.Add(this.btnview);
this.fluserbuttons.Controls.Add(this.btnrefreshusers);
this.fluserbuttons.Dock = System.Windows.Forms.DockStyle.Bottom;
this.fluserbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.fluserbuttons.Location = new System.Drawing.Point(3, 324);
this.fluserbuttons.Name = "fluserbuttons";
this.fluserbuttons.Size = new System.Drawing.Size(259, 29);
this.fluserbuttons.TabIndex = 1;
//
// btnview
//
this.btnview.AutoSize = true;
this.btnview.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnview.Location = new System.Drawing.Point(173, 3);
this.btnview.Name = "btnview";
this.btnview.Size = new System.Drawing.Size(83, 23);
this.btnview.TabIndex = 0;
this.btnview.Text = "View user info";
this.btnview.UseVisualStyleBackColor = true;
//
// btnrefreshusers
//
this.btnrefreshusers.AutoSize = true;
this.btnrefreshusers.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnrefreshusers.Location = new System.Drawing.Point(113, 3);
this.btnrefreshusers.Name = "btnrefreshusers";
this.btnrefreshusers.Size = new System.Drawing.Size(54, 23);
this.btnrefreshusers.TabIndex = 1;
this.btnrefreshusers.Text = "Refresh";
this.btnrefreshusers.UseVisualStyleBackColor = true;
//
// pnllogin
//
this.pnllogin.Controls.Add(this.txtpassword);
this.pnllogin.Controls.Add(this.label2);
this.pnllogin.Controls.Add(this.btnlogin);
this.pnllogin.Controls.Add(this.label1);
this.pnllogin.Location = new System.Drawing.Point(177, 180);
this.pnllogin.Name = "pnllogin";
this.pnllogin.Size = new System.Drawing.Size(419, 251);
this.pnllogin.TabIndex = 0;
this.pnllogin.TabStop = false;
this.pnllogin.Text = "Log in";
//
// txtpassword
//
this.txtpassword.Location = new System.Drawing.Point(13, 137);
this.txtpassword.Name = "txtpassword";
this.txtpassword.Size = new System.Drawing.Size(387, 20);
this.txtpassword.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 100);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(81, 13);
this.label2.TabIndex = 2;
this.label2.Text = "{PASSWORD}:";
//
// btnlogin
//
this.btnlogin.Location = new System.Drawing.Point(325, 209);
this.btnlogin.Name = "btnlogin";
this.btnlogin.Size = new System.Drawing.Size(75, 23);
this.btnlogin.TabIndex = 1;
this.btnlogin.Text = "Submit";
this.btnlogin.UseVisualStyleBackColor = true;
this.btnlogin.Click += new System.EventHandler(this.btnlogin_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(7, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(393, 64);
this.label1.TabIndex = 0;
this.label1.Text = "{LOGIN_EXP}";
//
// MUDAuthenticator
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(622, 430);
this.Controls.Add(this.panel1);
this.Name = "MUDAuthenticator";
this.Text = "{MUD_AUTHENTICATOR_NAME}";
this.panel1.ResumeLayout(false);
this.pnlmain.ResumeLayout(false);
this.pnlusers.ResumeLayout(false);
this.pnlusers.PerformLayout();
this.fluserbuttons.ResumeLayout(false);
this.fluserbuttons.PerformLayout();
this.pnllogin.ResumeLayout(false);
this.pnllogin.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox pnllogin;
private System.Windows.Forms.TextBox txtpassword;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnlogin;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel pnlmain;
private System.Windows.Forms.GroupBox pnlusers;
private System.Windows.Forms.ListBox lbusers;
private System.Windows.Forms.FlowLayoutPanel fluserbuttons;
private System.Windows.Forms.Button btnview;
private System.Windows.Forms.Button btnrefreshusers;
}
}

View file

@ -1,174 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
using ShiftOS.Objects;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
[MultiplayerOnly]
[Launcher("MUD Administrator", true, "al_mud_cracker", "Administration")]
[RequiresUpgrade("mud_cracker")]
[WinOpen("mud_administrator")]
public partial class MUDAuthenticator : UserControl, IShiftOSWindow
{
public MUDAuthenticator()
{
try
{
InitializeComponent();
ServerManager.ServerAccessGranted += () =>
{
this.Invoke(new Action(() => { Granted(); }));
};
ServerManager.ServerAccessDenied += () =>
{
this.Invoke(new Action(() => { Denied(); }));
};
ServerManager.GUIDReceived += (guid) =>
{
this.guid = guid;
};
ServerManager.UsersReceived += (users) =>
{
foreach(var user in users)
{
if (!this.users.ContainsKey(user.Username))
{
this.users.Add(user.Username, user);
}
else
{
this.users[user.Username].OnlineChat += ";" + user.OnlineChat;
}
}
this.Invoke(new Action(() =>
{
SetupUserList();
}));
};
}
catch
{
}
pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2;
pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2;
pnllogin.Parent.SizeChanged += (o, a) =>
{
pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2;
pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2;
};
pnlmain.Left = (pnlmain.Parent.Width - pnlmain.Width) / 2;
pnlmain.Top = (pnlmain.Parent.Height - pnlmain.Height) / 2;
}
public void Granted()
{
Infobox.Show("{ACCESS_GRANTED}", "{ACCESS_GRANTED_MUDADMIN_EXP}");
//This will tell the server to take the granted password off the list of granted passwords
//so the user must generate and crack a new one.
ServerManager.SendMessage("mudhack_killpass", "");
SetupAuthUI();
}
public void SetupAuthUI()
{
pnllogin.Hide();
pnlmain.Show();
PopulateUserList();
}
Dictionary<string, OnlineUser> users = new Dictionary<string, OnlineUser>();
public void PopulateUserList()
{
users = null;
ServerManager.SendMessage("mudhack_getallusers", "");
}
private string guid = null;
public void SetupUserList()
{
lbusers.Items.Clear();
foreach(var kv in users)
{
guid = null;
ServerManager.SendMessage("getguid_send", kv.Key);
while(guid == null)
{
}
users[kv.Key].Guid = guid;
lbusers.Items.Add(kv.Key);
}
}
public void Denied()
{
Infobox.Show("{ACCESS_DENIED}", "{ACCESS_DENIED_MUDADMIN_EXP}");
}
private void btnlogin_Click(object sender, EventArgs e)
{
ServerManager.SendMessage("mudhack_verify", "{pass: \"" + txtpassword.Text + "\"}");
}
public void OnLoad()
{
}
public void OnSkinLoad()
{
}
public bool OnUnload()
{
return true;
}
public void OnUpgrade()
{
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications
[RequiresUpgrade("mud_fundamentals")]
[Launcher("MUD Control Centre", true, "al_mud_control_centre", "Networking")]
[WinOpen("mud_control_centre")]
[DefaultTitle("MUD Control Centre")]
public partial class MUDControlCentre : UserControl, IShiftOSWindow
{
public MUDControlCentre()

View file

@ -1,126 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
namespace ShiftOS.WinForms.Applications
{
partial class MUDPasswordCracker
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.txtpassword = new System.Windows.Forms.TextBox();
this.lblpassword = new System.Windows.Forms.Label();
this.btncrack = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.txtpassword);
this.panel1.Controls.Add(this.lblpassword);
this.panel1.Controls.Add(this.btncrack);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(439, 131);
this.panel1.TabIndex = 0;
//
// txtpassword
//
this.txtpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtpassword.Location = new System.Drawing.Point(13, 53);
this.txtpassword.Name = "txtpassword";
this.txtpassword.Size = new System.Drawing.Size(414, 20);
this.txtpassword.TabIndex = 2;
//
// lblpassword
//
this.lblpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblpassword.Location = new System.Drawing.Point(13, 13);
this.lblpassword.Name = "lblpassword";
this.lblpassword.Size = new System.Drawing.Size(414, 36);
this.lblpassword.TabIndex = 1;
this.lblpassword.Text = "{PASSWORD}:";
this.lblpassword.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// btncrack
//
this.btncrack.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btncrack.Location = new System.Drawing.Point(12, 96);
this.btncrack.Name = "btncrack";
this.btncrack.Size = new System.Drawing.Size(415, 23);
this.btncrack.TabIndex = 0;
this.btncrack.Text = "{CRACK}";
this.btncrack.UseVisualStyleBackColor = true;
this.btncrack.Click += new System.EventHandler(this.btncrack_Click);
//
// MUDPasswordCracker
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(439, 131);
this.Controls.Add(this.panel1);
this.Name = "MUDPasswordCracker";
this.Text = "Multi-User Domain Password Cracker v1.0";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtpassword;
private System.Windows.Forms.Label lblpassword;
private System.Windows.Forms.Button btncrack;
}
}

View file

@ -1,129 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
[MultiplayerOnly]
[Launcher("MUD cracker 1.0", true, "al_mud_cracker")]
[RequiresUpgrade("mud_cracker")]
[WinOpen("mud_cracker")]
public partial class MUDPasswordCracker : UserControl, IShiftOSWindow
{
public MUDPasswordCracker()
{
InitializeComponent();
}
private string PasswordToCrack { get; set; }
private string Password { get; set; }
private void btncrack_Click(object sender, EventArgs e)
{
ServerManager.ServerPasswordGenerated += (pass) =>
{
PasswordToCrack = pass;
this.Invoke(new Action(() =>
{
BeginCrack();
}));
};
ServerManager.InitiateMUDHack();
}
public void BeginCrack()
{
btncrack.Enabled = false;
btncrack.Text = "Starting crack...";
var t = new Thread(new ThreadStart(() =>
{
int secondsleft = 30;
while(secondsleft > 0)
{
try
{
this.Invoke(new Action(() =>
{
btncrack.Text = $"Cracking... step {secondsleft}.";
}));
secondsleft -= 1;
Thread.Sleep(1000);
}
catch
{
}
}
this.Invoke(new Action(() => EndCrack()));
}));
t.IsBackground = true;
t.Start();
}
public void EndCrack()
{
lblpassword.Show();
txtpassword.Show();
txtpassword.ReadOnly = true;
txtpassword.Text = PasswordToCrack;
}
public void OnLoad()
{
}
public void OnSkinLoad()
{
}
public bool OnUnload()
{
return true;
}
public void OnUpgrade()
{
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -38,6 +38,7 @@ namespace ShiftOS.WinForms.Applications {
[Launcher("Name Changer", true, "al_name_changer", "Customization")]
[RequiresUpgrade("name_changer")]
[WinOpen("name_changer")]
[DefaultTitle("Name Changer")]
public partial class NameChanger : UserControl, IShiftOSWindow
{
public NameChanger()

View file

@ -40,6 +40,7 @@ namespace ShiftOS.WinForms.Applications
[Launcher("Shiftorium", true, "al_shiftorium", "Utilities")]
[RequiresUpgrade("shiftorium_gui")]
[WinOpen("shiftorium")]
[DefaultTitle("Shiftorium")]
public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow
{

View file

@ -40,6 +40,7 @@ namespace ShiftOS.WinForms.Applications
[Launcher("Skin Loader", true, "al_skin_loader", "Customization")]
[RequiresUpgrade("skinning")]
[WinOpen("skin_loader")]
[DefaultTitle("Skin Loader")]
public partial class Skin_Loader : UserControl, IShiftOSWindow
{
public Skin_Loader()

View file

@ -1,226 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
using ShiftOS.WinForms.Controls;
namespace ShiftOS.WinForms.Applications
{
partial class VirusScanner
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnfullscan = new System.Windows.Forms.Button();
this.btnhomescan = new System.Windows.Forms.Button();
this.btnsysscan = new System.Windows.Forms.Button();
this.grpresults = new System.Windows.Forms.GroupBox();
this.lbviruses = new System.Windows.Forms.ListBox();
this.btnremoveviruses = new System.Windows.Forms.Button();
this.lblresults = new System.Windows.Forms.Label();
this.grpabout = new System.Windows.Forms.GroupBox();
this.rtbterm = new TerminalBox();
this.lblabout = new System.Windows.Forms.Label();
this.pgcontents = new System.Windows.Forms.Panel();
this.grpresults.SuspendLayout();
this.grpabout.SuspendLayout();
this.pgcontents.SuspendLayout();
this.SuspendLayout();
//
// btnfullscan
//
this.btnfullscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnfullscan.Location = new System.Drawing.Point(10, 12);
this.btnfullscan.Name = "btnfullscan";
this.btnfullscan.Size = new System.Drawing.Size(175, 23);
this.btnfullscan.TabIndex = 0;
this.btnfullscan.Text = "{START_SYSTEM_SCAN}";
this.btnfullscan.UseVisualStyleBackColor = true;
this.btnfullscan.Click += new System.EventHandler(this.btnfullscan_Click);
//
// btnhomescan
//
this.btnhomescan.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnhomescan.Location = new System.Drawing.Point(10, 41);
this.btnhomescan.Name = "btnhomescan";
this.btnhomescan.Size = new System.Drawing.Size(175, 23);
this.btnhomescan.TabIndex = 1;
this.btnhomescan.Text = "{SCAN_HOME}";
this.btnhomescan.UseVisualStyleBackColor = true;
this.btnhomescan.Click += new System.EventHandler(this.btnhomescan_Click);
//
// btnsysscan
//
this.btnsysscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnsysscan.Location = new System.Drawing.Point(10, 70);
this.btnsysscan.Name = "btnsysscan";
this.btnsysscan.Size = new System.Drawing.Size(175, 23);
this.btnsysscan.TabIndex = 2;
this.btnsysscan.Text = "{SCAN_SYSTEM}";
this.btnsysscan.UseVisualStyleBackColor = true;
this.btnsysscan.Click += new System.EventHandler(this.btnsysscan_Click);
//
// grpresults
//
this.grpresults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.grpresults.Controls.Add(this.lbviruses);
this.grpresults.Controls.Add(this.btnremoveviruses);
this.grpresults.Controls.Add(this.lblresults);
this.grpresults.Location = new System.Drawing.Point(3, 168);
this.grpresults.Name = "grpresults";
this.grpresults.Size = new System.Drawing.Size(179, 158);
this.grpresults.TabIndex = 3;
this.grpresults.TabStop = false;
this.grpresults.Text = "{RESULTS}";
//
// lbviruses
//
this.lbviruses.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbviruses.FormattingEnabled = true;
this.lbviruses.Location = new System.Drawing.Point(3, 16);
this.lbviruses.Name = "lbviruses";
this.lbviruses.Size = new System.Drawing.Size(173, 116);
this.lbviruses.TabIndex = 2;
//
// btnremoveviruses
//
this.btnremoveviruses.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnremoveviruses.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnremoveviruses.Location = new System.Drawing.Point(3, 132);
this.btnremoveviruses.Name = "btnremoveviruses";
this.btnremoveviruses.Size = new System.Drawing.Size(173, 23);
this.btnremoveviruses.TabIndex = 1;
this.btnremoveviruses.Text = "Remove";
this.btnremoveviruses.UseVisualStyleBackColor = true;
this.btnremoveviruses.Visible = false;
this.btnremoveviruses.Click += new System.EventHandler(this.btnremoveviruses_Click);
//
// lblresults
//
this.lblresults.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblresults.Location = new System.Drawing.Point(3, 16);
this.lblresults.Name = "lblresults";
this.lblresults.Size = new System.Drawing.Size(173, 139);
this.lblresults.TabIndex = 0;
this.lblresults.Text = "{SCAN_NOT_STARTED}";
//
// grpabout
//
this.grpabout.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grpabout.Controls.Add(this.rtbterm);
this.grpabout.Controls.Add(this.lblabout);
this.grpabout.Location = new System.Drawing.Point(191, 12);
this.grpabout.Name = "grpabout";
this.grpabout.Size = new System.Drawing.Size(362, 314);
this.grpabout.TabIndex = 5;
this.grpabout.TabStop = false;
this.grpabout.Text = "{ABOUT}";
//
// rtbterm
//
this.rtbterm.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbterm.Location = new System.Drawing.Point(3, 16);
this.rtbterm.Name = "rtbterm";
this.rtbterm.Size = new System.Drawing.Size(356, 295);
this.rtbterm.TabIndex = 1;
this.rtbterm.Text = "";
//
// lblabout
//
this.lblabout.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblabout.Location = new System.Drawing.Point(3, 16);
this.lblabout.Name = "lblabout";
this.lblabout.Size = new System.Drawing.Size(356, 295);
this.lblabout.TabIndex = 0;
this.lblabout.Text = "{VIRUSSCANNER_ABOUT}";
//
// pgcontents
//
this.pgcontents.BackColor = System.Drawing.Color.White;
this.pgcontents.Controls.Add(this.grpabout);
this.pgcontents.Controls.Add(this.grpresults);
this.pgcontents.Controls.Add(this.btnsysscan);
this.pgcontents.Controls.Add(this.btnhomescan);
this.pgcontents.Controls.Add(this.btnfullscan);
this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill;
this.pgcontents.Location = new System.Drawing.Point(0, 0);
this.pgcontents.Name = "pgcontents";
this.pgcontents.Size = new System.Drawing.Size(565, 343);
this.pgcontents.TabIndex = 25;
//
// VirusScanner
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pgcontents);
this.Name = "VirusScanner";
this.Text = "{VIRUS_SCANNER_NAME}";
this.Size = new System.Drawing.Size(565, 343);
this.Load += new System.EventHandler(this.VirusScanner_Load);
this.grpresults.ResumeLayout(false);
this.grpabout.ResumeLayout(false);
this.pgcontents.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
internal System.Windows.Forms.Button btnfullscan;
internal System.Windows.Forms.Button btnhomescan;
internal System.Windows.Forms.Button btnsysscan;
internal System.Windows.Forms.GroupBox grpresults;
internal System.Windows.Forms.Button btnremoveviruses;
internal System.Windows.Forms.Label lblresults;
internal System.Windows.Forms.GroupBox grpabout;
internal System.Windows.Forms.Label lblabout;
internal System.Windows.Forms.Panel pgcontents;
private TerminalBox rtbterm;
private System.Windows.Forms.ListBox lbviruses;
}
}

View file

@ -1,205 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using ShiftOS.Engine;
using ShiftOS.Objects;
using static ShiftOS.Objects.ShiftFS.Utils;
namespace ShiftOS.WinForms.Applications
{
[Launcher("Virus Scanner", true, "al_virus_scanner", "Administration")]
[RequiresUpgrade("virus_scanner")]
[WinOpen("virus_scanner")]
public partial class VirusScanner : UserControl, IShiftOSWindow
{
public VirusScanner()
{
InitializeComponent();
Action<ServerMessage> runner = new Action<ServerMessage>((msg) =>
{
if(msg.Name == "virusdb")
{
VirusDB = JsonConvert.DeserializeObject<Dictionary<string, string>>(msg.Contents);
}
});
ServerManager.MessageReceived += (srv) =>
{
runner?.Invoke(srv);
runner = null;
};
ServerManager.SendMessage("getvirusdb", "");
}
Dictionary<string, string> VirusDB = null;
private void btnfullscan_Click(object sender, EventArgs e)
{
lblabout.Hide();
lbviruses.Hide();
rtbterm.Show();
rtbterm.Focus();
rtbterm.Text = "";
var t = new Thread(new ThreadStart(() =>
{
ScanFolder("0:");
}));
t.IsBackground = true;
t.Start();
}
public List<string> infected = new List<string>();
public void ScanFolder(string path)
{
this.Invoke(new Action(() =>
{
lblresults.Hide();
}));
foreach (var file in GetFiles(path))
{
Console.WriteLine(file + " is now being scanned.");
string contents = ReadAllText(file);
foreach(var kv in VirusDB)
{
if(kv.Value == contents)
{
if(kv.Key.EndsWith(".0") || kv.Key.EndsWith(".1"))
{
infected.Add(file);
Console.WriteLine($"{file} - Virus detected: {kv.Key}");
this.Invoke(new Action(() =>
{
AddVirusToList(kv.Key);
}));
}
}
}
}
foreach(var dir in GetDirectories(path))
{
if (dir != null)
{
ScanFolder(dir);
}
}
}
public void AddVirusToList(string type)
{
lblresults.Hide();
lbviruses.Show();
btnremoveviruses.Show();
lbviruses.Items.Add(type);
}
private void VirusScanner_Load(object sender, EventArgs e)
{
Applications.Terminal.MakeWidget(rtbterm);
rtbterm.Hide();
}
private void btnhomescan_Click(object sender, EventArgs e)
{
lblabout.Hide();
rtbterm.Show();
rtbterm.Focus();
rtbterm.Text = "";
var t = new Thread(new ThreadStart(() =>
{
ScanFolder(Paths.GetPath("home"));
}));
t.IsBackground = true;
t.Start();
}
private void btnsysscan_Click(object sender, EventArgs e)
{
lblabout.Hide();
rtbterm.Show();
rtbterm.Focus();
rtbterm.Text = "";
var t = new Thread(new ThreadStart(() =>
{
ScanFolder(Paths.GetPath("system"));
}));
t.IsBackground = true;
t.Start();
}
private void btnremoveviruses_Click(object sender, EventArgs e)
{
while(infected.Count > 0)
{
Delete(infected[0]);
infected.RemoveAt(0);
}
lbviruses.Items.Clear();
}
public void OnLoad()
{
}
public void OnSkinLoad()
{
}
public bool OnUnload()
{
return true;
}
public void OnUpgrade()
{
}
}
public class InfectedFile
{
public string FilePath { get; set; }
public List<string> Viruses { get; set; }
public InfectedFile(string fpath, string[] viruses)
{
FilePath = fpath;
Viruses = new List<string>(viruses);
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,121 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
namespace ShiftOS.Engine
{
partial class UserControl1
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.mp3FilePath = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.stopMp3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// mp3FilePath
//
this.mp3FilePath.Location = new System.Drawing.Point(131, 8);
this.mp3FilePath.Name = "mp3FilePath";
this.mp3FilePath.ReadOnly = true;
this.mp3FilePath.Size = new System.Drawing.Size(239, 20);
this.mp3FilePath.TabIndex = 1;
//
// button1
//
this.button1.Location = new System.Drawing.Point(3, 8);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(122, 21);
this.button1.TabIndex = 2;
this.button1.Text = "Choose Song";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// stopMp3
//
this.stopMp3.Location = new System.Drawing.Point(445, 8);
this.stopMp3.Name = "stopMp3";
this.stopMp3.Size = new System.Drawing.Size(65, 21);
this.stopMp3.TabIndex = 3;
this.stopMp3.Text = "Stop";
this.stopMp3.UseVisualStyleBackColor = true;
this.stopMp3.Click += new System.EventHandler(this.stopMp3_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(376, 8);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(63, 21);
this.button2.TabIndex = 4;
this.button2.Text = "Play";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// UserControl1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.button2);
this.Controls.Add(this.stopMp3);
this.Controls.Add(this.button1);
this.Controls.Add(this.mp3FilePath);
this.Name = "UserControl1";
this.Text = "{WAV_PLAYER_NAME}";
this.Size = new System.Drawing.Size(530, 70);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox mp3FilePath;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button stopMp3;
private System.Windows.Forms.Button button2;
}
}

View file

@ -1,91 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShiftOS.Engine
{
[Launcher("WAV Player", true, "wav_player_al")]
[RequiresUpgrade("wav_player")]
[WinOpen("wav_player")]
public partial class UserControl1 : UserControl, IShiftOSWindow
{
string path;
public UserControl1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "WAV|*.wav";
if(ofd.ShowDialog() == DialogResult.OK)
{
path = ofd.FileName;
mp3FilePath.Text = ofd.FileName;
}
}
private void stopMp3_Click(object sender, EventArgs e)
{
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.Stop();
}
public void OnLoad()
{
}
public void OnSkinLoad()
{
}
public bool OnUnload()
{
return true;
}
public void OnUpgrade()
{
}
private void button2_Click(object sender, EventArgs e)
{
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.SoundLocation = path;
player.Load();
player.Play();
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -111,30 +111,12 @@
<Compile Include="Applications\GraphicPicker.Designer.cs">
<DependentUpon>GraphicPicker.cs</DependentUpon>
</Compile>
<Compile Include="Applications\mp3Player.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Applications\mp3Player.Designer.cs">
<DependentUpon>mp3Player.cs</DependentUpon>
</Compile>
<Compile Include="Applications\MUDAuthenticator.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Applications\MUDAuthenticator.Designer.cs">
<DependentUpon>MUDAuthenticator.cs</DependentUpon>
</Compile>
<Compile Include="Applications\MUDControlCentre.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Applications\MUDControlCentre.Designer.cs">
<DependentUpon>MUDControlCentre.cs</DependentUpon>
</Compile>
<Compile Include="Applications\MUDPasswordCracker.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Applications\MUDPasswordCracker.Designer.cs">
<DependentUpon>MUDPasswordCracker.cs</DependentUpon>
</Compile>
<Compile Include="Applications\NameChanger.cs">
<SubType>UserControl</SubType>
</Compile>
@ -177,12 +159,6 @@
<Compile Include="Applications\TextPad.Designer.cs">
<DependentUpon>TextPad.cs</DependentUpon>
</Compile>
<Compile Include="Applications\VirusScanner.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Applications\VirusScanner.Designer.cs">
<DependentUpon>VirusScanner.cs</DependentUpon>
</Compile>
<Compile Include="Applications\Terminal.cs">
<SubType>UserControl</SubType>
</Compile>
@ -271,18 +247,9 @@
<EmbeddedResource Include="Applications\GraphicPicker.resx">
<DependentUpon>GraphicPicker.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\mp3Player.resx">
<DependentUpon>mp3Player.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\MUDAuthenticator.resx">
<DependentUpon>MUDAuthenticator.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\MUDControlCentre.resx">
<DependentUpon>MUDControlCentre.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\MUDPasswordCracker.resx">
<DependentUpon>MUDPasswordCracker.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\NameChanger.resx">
<DependentUpon>NameChanger.cs</DependentUpon>
</EmbeddedResource>
@ -304,9 +271,6 @@
<EmbeddedResource Include="Applications\TextPad.resx">
<DependentUpon>TextPad.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\VirusScanner.resx">
<DependentUpon>VirusScanner.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Applications\Terminal.resx">
<DependentUpon>Terminal.cs</DependentUpon>
</EmbeddedResource>

View file

@ -34,6 +34,7 @@ using System.Windows.Forms;
using ShiftOS.Engine;
using static ShiftOS.Engine.SkinEngine;
using ShiftOS.WinForms.Tools;
using ShiftOS.WinForms.Applications;
/// <summary>
/// Winforms desktop.
@ -131,7 +132,7 @@ namespace ShiftOS.WinForms
pnlbtn.BackgroundImageLayout = GetImageLayout("panelbutton");
var pnlbtntext = new Label();
pnlbtntext.Text = form.Text;
pnlbtntext.Text = NameChangerBackend.GetName(form.ParentWindow);
pnlbtntext.AutoSize = true;
pnlbtntext.Location = LoadedSkin.PanelButtonFromLeft;
pnlbtntext.ForeColor = LoadedSkin.PanelButtonTextColor;