diff options
| author | william341 <[email protected]> | 2017-07-27 17:27:31 -0700 |
|---|---|---|
| committer | william341 <[email protected]> | 2017-07-27 17:27:31 -0700 |
| commit | 2d5b566da493c8669d05df2e8004f7ba6a2d29d5 (patch) | |
| tree | b06f1e9918a929db0c1d457eb9eb73e859115553 /ShiftOS.Frontend/Hacking | |
| parent | e5aec8a0531fe78dcc881a11b589b5a19338e503 (diff) | |
| download | shiftos_thereturn-2d5b566da493c8669d05df2e8004f7ba6a2d29d5.tar.gz shiftos_thereturn-2d5b566da493c8669d05df2e8004f7ba6a2d29d5.tar.bz2 shiftos_thereturn-2d5b566da493c8669d05df2e8004f7ba6a2d29d5.zip | |
hacking p2
Diffstat (limited to 'ShiftOS.Frontend/Hacking')
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackableProvider.cs | 5 | ||||
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackerTestCommands.cs | 45 |
2 files changed, 50 insertions, 0 deletions
diff --git a/ShiftOS.Frontend/Hacking/HackableProvider.cs b/ShiftOS.Frontend/Hacking/HackableProvider.cs index 6198b0c..5419030 100644 --- a/ShiftOS.Frontend/Hacking/HackableProvider.cs +++ b/ShiftOS.Frontend/Hacking/HackableProvider.cs @@ -26,6 +26,11 @@ namespace ShiftOS.Frontend return JsonConvert.DeserializeObject<Payload[]>(Properties.Resources.Payloads); } + public Port[] GetPorts() + { + return JsonConvert.DeserializeObject<Port[]>(Properties.Resources.Ports); + } + public byte[] GetLootFromResource(string resId) { return new byte[] { 0xDE, 0xAD, 0xBE, 0xEF }; //nyi diff --git a/ShiftOS.Frontend/Hacking/HackerTestCommands.cs b/ShiftOS.Frontend/Hacking/HackerTestCommands.cs index 675356a..a72f267 100644 --- a/ShiftOS.Frontend/Hacking/HackerTestCommands.cs +++ b/ShiftOS.Frontend/Hacking/HackerTestCommands.cs @@ -19,6 +19,33 @@ namespace ShiftOS.Frontend } } + [Command("lsexploits")] + public static void ListAllExploits() + { + foreach (var exploit in Hacking.AvailableExploits) + { + Console.WriteLine(exploit.ID + ": " + exploit.FriendlyName); + } + } + + [Command("lspayloads")] + public static void ListAllPayloads() + { + foreach (var exploit in Hacking.AvailablePayloads) + { + Console.WriteLine(exploit.ID + ": " + exploit.FriendlyName); + } + } + + [Command("lsports")] + public static void ListAllPorts() + { + foreach (var exploit in Hacking.AvailablePorts) + { + Console.WriteLine(exploit.ID + ": " + exploit.FriendlyName); + } + } + [Command("describebackable")] [RequiresArgument("id")] public static void DescribeHackable(Dictionary<string, object> args) @@ -41,6 +68,24 @@ namespace ShiftOS.Frontend Console.WriteLine(hackable.WelcomeMessage); } + [Command("describeport")] + [RequiresArgument("id")] + public static void DescribePort(Dictionary<string, object> args) + { + string id = args["id"].ToString(); + var port = Hacking.AvailablePorts.FirstOrDefault(x => x.ID == id); + if (port == null) + { + Console.WriteLine("Port not found."); + return; + } + Console.WriteLine(port.FriendlyName); + Console.WriteLine("------------------------"); + Console.WriteLine(); + Console.WriteLine("Port: " + port.Value.ToString()); + Console.WriteLine("Name: " + port.Name); + } + [Command("inithack")] [RequiresArgument("id")] public static void InitHack(Dictionary<string, object> args) |
