diff options
| author | Michael <[email protected]> | 2017-08-02 09:30:39 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-02 09:30:39 -0400 |
| commit | 10d2c0bbaa2b5c933a37056c784d3de84fa82eaf (patch) | |
| tree | e8894d69a359721c1363e32b97d4ff855fd81ef2 /ShiftOS.Frontend/Hacking | |
| parent | 52319b29eef65560a737353a71e1e4017dc87c09 (diff) | |
| download | shiftos_thereturn-10d2c0bbaa2b5c933a37056c784d3de84fa82eaf.tar.gz shiftos_thereturn-10d2c0bbaa2b5c933a37056c784d3de84fa82eaf.tar.bz2 shiftos_thereturn-10d2c0bbaa2b5c933a37056c784d3de84fa82eaf.zip | |
sploitset ftpwn mounts ftp directory on breach
Diffstat (limited to 'ShiftOS.Frontend/Hacking')
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackableProvider.cs | 31 | ||||
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackingCommands.cs | 2 |
2 files changed, 32 insertions, 1 deletions
diff --git a/ShiftOS.Frontend/Hacking/HackableProvider.cs b/ShiftOS.Frontend/Hacking/HackableProvider.cs index e578fb0..83409c5 100644 --- a/ShiftOS.Frontend/Hacking/HackableProvider.cs +++ b/ShiftOS.Frontend/Hacking/HackableProvider.cs @@ -11,6 +11,37 @@ namespace ShiftOS.Frontend { public class HackableProvider : IHackableProvider { + public byte[] FindLootBytes(string id) + { + foreach(var res in typeof(Properties.Resources).GetProperties(System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static)) + { + if(res.Name == id) + { + var obj = res.GetValue(null); + if(obj is System.Drawing.Image) + { + var img = (obj as System.Drawing.Bitmap); + using(var memstr = new System.IO.MemoryStream()) + { + img.Save(memstr, System.Drawing.Imaging.ImageFormat.Png); + return memstr.ToArray(); + } + } + else if(obj is System.IO.UnmanagedMemoryStream) + { + var ms = obj as System.IO.MemoryStream; + return ms.ToArray(); + } + else if(obj is string) + { + var bytes = Encoding.UTF8.GetBytes(obj.ToString()); + return bytes; + } + } + } + return null; + } + public Hackable[] GetHackables() { return JsonConvert.DeserializeObject<Hackable[]>(Properties.Resources.Hackables); diff --git a/ShiftOS.Frontend/Hacking/HackingCommands.cs b/ShiftOS.Frontend/Hacking/HackingCommands.cs index 9ebb824..3ecf7fb 100644 --- a/ShiftOS.Frontend/Hacking/HackingCommands.cs +++ b/ShiftOS.Frontend/Hacking/HackingCommands.cs @@ -51,12 +51,12 @@ namespace ShiftOS.Frontend string Port = args["port"].ToString(); string ExploitName = args["id"].ToString(); var ExploitID = Hacking.AvailableExploits.FirstOrDefault(x => x.ID == ExploitName); - Console.WriteLine(ExploitID.ExploitName); if (ExploitID == null) { Console.WriteLine("[sploitset] invalid exploit."); return; } + Console.WriteLine(ExploitID.ExploitName); var ExploitTarget = Hacking.CurrentHackable.PortsToUnlock.First(x => x.Value.ToString() == Port); if (ExploitTarget == null) { |
