From a531cefa00923cc89fe94750bb1b4af12a50df93 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Jan 2017 16:23:10 -0500 Subject: Terminal remote control! --- ShiftOS.WinForms/Commands.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'ShiftOS.WinForms/Commands.cs') diff --git a/ShiftOS.WinForms/Commands.cs b/ShiftOS.WinForms/Commands.cs index a0a1692..ba0ed31 100644 --- a/ShiftOS.WinForms/Commands.cs +++ b/ShiftOS.WinForms/Commands.cs @@ -32,12 +32,36 @@ using System.IO; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; +using Newtonsoft.Json; /// /// Coherence commands. /// namespace ShiftOS.WinForms { + [Namespace("trm")] + public static class TerminalExtensions + { + [Command("setpass", true)] + [RequiresArgument("pass")] + public static bool setPass(Dictionary args) + { + SaveSystem.CurrentSave.Password = args["pass"] as string; + return true; + } + + [Command("remote", "username:,sysname:,pass:", "Allows you to control a remote system on the multi-user domain given a username, password and system name.")] + [RequiresArgument("username")] + [RequiresArgument("sysname")] + [RequiresArgument("pass")] + public static bool RemoteControl(Dictionary args) + { + ServerManager.SendMessage("trm_handshake_request", JsonConvert.SerializeObject(args)); + return true; + } + } + + [Namespace("coherence")] [RequiresUpgrade("kernel_coherence")] public static class CoherenceCommands -- cgit v1.2.3