aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/Hacking
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Frontend/Hacking')
-rw-r--r--ShiftOS.Frontend/Hacking/PayloadFunc.cs24
1 files changed, 24 insertions, 0 deletions
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;
}
}
}