From 1f131438c0be7fe7a7c558530d32f24d3696686a Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 Aug 2017 11:55:53 -0400 Subject: the first mission --- ShiftOS.Frontend/Hacking/PayloadFunc.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'ShiftOS.Frontend/Hacking') diff --git a/ShiftOS.Frontend/Hacking/PayloadFunc.cs b/ShiftOS.Frontend/Hacking/PayloadFunc.cs index 5252db4..642b138 100644 --- a/ShiftOS.Frontend/Hacking/PayloadFunc.cs +++ b/ShiftOS.Frontend/Hacking/PayloadFunc.cs @@ -18,6 +18,30 @@ namespace ShiftOS.Frontend case 1: Hacking.CurrentHackable.DoConnectionTimeout = false; break; + case 2: + new System.Threading.Thread(() => + { + Console.WriteLine("FTP File Puller - Version 1.01"); + foreach (var loot in Hacking.CurrentHackable.ServerFTPLoot) + { + var bytes = Hacking.GetLootBytes(loot.ID); + System.Threading.Thread.Sleep(4 * bytes.Length); + string localPath = "0:/home/documents/" + loot.LootName; + int count = 0; + while (Objects.ShiftFS.Utils.FileExists(localPath)) + { + count++; + string truename = loot.LootName.Insert(loot.LootName.LastIndexOf('.'), $"-{count}"); + localPath = $"0:/home/documents/{truename}"; + } + Console.WriteLine($" --> from {Hacking.CurrentHackable.Data.SystemName}:21/home/documents/{loot.LootName} to {localPath}: {bytes.Length} bytes written"); + Objects.ShiftFS.Utils.WriteAllBytes(localPath, bytes); + } + Console.WriteLine("Disconnecting from server..."); + Hacking.EndHack(); + TerminalBackend.SetShellOverride(""); + }).Start(); + break; } } } -- cgit v1.2.3