From 18079c6f43981f1bf9fc093b3c5b68873fe90348 Mon Sep 17 00:00:00 2001 From: william341 Date: Thu, 27 Jul 2017 16:34:27 -0700 Subject: hacking p1 --- ShiftOS.Objects/Hackable.cs | 82 ------------------------------------- ShiftOS.Objects/Hacking/Exploit.cs | 30 ++++++++++++++ ShiftOS.Objects/Hacking/Hackable.cs | 82 +++++++++++++++++++++++++++++++++++++ ShiftOS.Objects/Hacking/Payload.cs | 31 ++++++++++++++ 4 files changed, 143 insertions(+), 82 deletions(-) delete mode 100644 ShiftOS.Objects/Hackable.cs create mode 100644 ShiftOS.Objects/Hacking/Exploit.cs create mode 100644 ShiftOS.Objects/Hacking/Hackable.cs create mode 100644 ShiftOS.Objects/Hacking/Payload.cs (limited to 'ShiftOS.Objects') diff --git a/ShiftOS.Objects/Hackable.cs b/ShiftOS.Objects/Hackable.cs deleted file mode 100644 index 4596d2d..0000000 --- a/ShiftOS.Objects/Hackable.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ShiftOS.Objects -{ - public class Hackable - { - public string SystemName { get; set; } - public string FriendlyName { get; set; } - public string Password { get; set; } - public string PasswordHint { get; set; } - public string WelcomeMessage { get; set; } - - public string Description { get; set; } - - public int FirewallStrength { get; set; } - public int LootRarity { get; set; } - public int LootAmount { get; set; } - public int ConnectionTimeoutLevel { get; set; } - public int LockTier { get; set; } - - public SystemType SystemType { get; set; } - - public string OnHackCompleteStoryEvent { get; set; } - public string OnHackFailedStoryEvent { get; set; } - - public string Dependencies { get; set; } - - - public string ID - { - get - { - return SystemName.ToLower().Replace(" ", "_"); - } - } - - public override string ToString() - { - return $"{FriendlyName} ({SystemName})"; - } - } - - [Flags] - public enum SystemType - { - FileServer, - SSHServer, - EmailServer, - Database - } - - [Serializable] - public class ServerMessage - { - public string Name { get; set; } - public string GUID { get; set; } - public string Contents { get; set; } - } - - public class LootInfo - { - public string Filename { get; set; } - public string ResourceId { get; set; } - public int Rarity { get; set; } - } - - public class Loot - { - public Loot(LootInfo info, byte[] data) - { - Data = data; - Info = info; - } - - public LootInfo Info { get; private set; } - public byte[] Data { get; private set; } - } -} diff --git a/ShiftOS.Objects/Hacking/Exploit.cs b/ShiftOS.Objects/Hacking/Exploit.cs new file mode 100644 index 0000000..7e83c3a --- /dev/null +++ b/ShiftOS.Objects/Hacking/Exploit.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public class Exploit + { + public string FriendlyName { get; set; } + public string ExploitName { get; set; } + public SystemType EffectiveAgainst { get; set; } + public string Dependencies { get; set; } + + public string ID + { + get + { + return ExploitName.ToLower().Replace(" ", "_"); + } + } + + public override string ToString() + { + return $"{FriendlyName} ({ExploitName})"; + } + } + +} diff --git a/ShiftOS.Objects/Hacking/Hackable.cs b/ShiftOS.Objects/Hacking/Hackable.cs new file mode 100644 index 0000000..4596d2d --- /dev/null +++ b/ShiftOS.Objects/Hacking/Hackable.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public class Hackable + { + public string SystemName { get; set; } + public string FriendlyName { get; set; } + public string Password { get; set; } + public string PasswordHint { get; set; } + public string WelcomeMessage { get; set; } + + public string Description { get; set; } + + public int FirewallStrength { get; set; } + public int LootRarity { get; set; } + public int LootAmount { get; set; } + public int ConnectionTimeoutLevel { get; set; } + public int LockTier { get; set; } + + public SystemType SystemType { get; set; } + + public string OnHackCompleteStoryEvent { get; set; } + public string OnHackFailedStoryEvent { get; set; } + + public string Dependencies { get; set; } + + + public string ID + { + get + { + return SystemName.ToLower().Replace(" ", "_"); + } + } + + public override string ToString() + { + return $"{FriendlyName} ({SystemName})"; + } + } + + [Flags] + public enum SystemType + { + FileServer, + SSHServer, + EmailServer, + Database + } + + [Serializable] + public class ServerMessage + { + public string Name { get; set; } + public string GUID { get; set; } + public string Contents { get; set; } + } + + public class LootInfo + { + public string Filename { get; set; } + public string ResourceId { get; set; } + public int Rarity { get; set; } + } + + public class Loot + { + public Loot(LootInfo info, byte[] data) + { + Data = data; + Info = info; + } + + public LootInfo Info { get; private set; } + public byte[] Data { get; private set; } + } +} diff --git a/ShiftOS.Objects/Hacking/Payload.cs b/ShiftOS.Objects/Hacking/Payload.cs new file mode 100644 index 0000000..a3800fa --- /dev/null +++ b/ShiftOS.Objects/Hacking/Payload.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public class Payload + { + public string FriendlyName { get; set; } + public string PayloadName { get; set; } + public int EffectiveAgainstFirewall { get; set; } + public SystemType EffectiveAgainstPort { get; set; } + public string Dependencies { get; set; } + + public string ID + { + get + { + return PayloadName.ToLower().Replace(" ", "_"); + } + } + + public override string ToString() + { + return $"{FriendlyName} ({PayloadName})"; + } + } + +} -- cgit v1.2.3