public HackCommand(IDexPromise promise) : base(promise) { CommandHelpString = $"{CmdName} <node> #<software>"; State = CommandState.NotStarted; CommandName = CmdName.ToLower(); MandatoryParamCount = 2; }
public TargetCommand(IDexPromise promise) : base(promise) { CommandHelpString = $"{CmdName} <network>"; State = CommandState.NotStarted; CommandName = CmdName.ToLower(); MandatoryParamCount = 1; }
public TestCommand(IDexPromise promise) : base(promise) { OptionalParamCount = 0; MandatoryParamCount = 0; CommandName = CmdName; CommandHelpString = "login"; State = CommandState.NotStarted; }
public InitCommand(IDexPromise promise) : base(promise) { CommandHelpString = $"{CmdName} <login> <pwd> [realm]"; State = CommandState.NotStarted; CommandName = CmdName.ToLower(); MandatoryParamCount = 2; OptionalParamCount = 1; }
public WelcomeCommand(string text, Verbosity verbosity, IDexPromise promise) : base(promise) { CommandName = CmdName; CommandHelpString = $"{CmdName}"; _text = text; _verbosity = verbosity; State = CommandState.NotStarted; }
public LoginCommand(IDexPromise promise) : base(promise) { OptionalParamCount = 1; MandatoryParamCount = 1; CommandName = CmdName; CommandHelpString = "login <user> [password]"; State = CommandState.NotStarted; }
public MacroCommand(IDexPromise promise) : base(promise) { CommandHelpString = $"<command>[newline][command][newline][command]"; State = CommandState.NotStarted; CommandName = CmdName.ToLower(); MandatoryParamCount = 0; OptionalParamCount = 0; }
public LoginCommand(IDexPromise promise) : base(promise) { OptionalParamCount = 1; MandatoryParamCount = 2; CommandName = CmdName; CommandHelpString = "login <user> <password> [realm->local]"; State = CommandState.NotStarted; _wellknownNames = new Dictionary <string, string> { { "gr8b", "639924" } }; }
public CommandBase ResolveCommand(string input, IDexPromise dexPromise) { string[] split = input.Split(' '); if (LoginCommand.CmdName.Equals(split[0].Trim().ToLower())) { return(new LoginCommand(dexPromise)); } if (TestCommand.CmdName.Equals(split[0].Trim().ToLower())) { return(new TestCommand(dexPromise)); } else { return(new SRDirectInstructionCommand(Verbosity.Critical, dexPromise)); } /* * if (input.Contains("\n")) * return new MacroCommand(dexPromise); * * if (InitCommand.CmdName.Equals(split[0].ToLower())) * return new InitCommand(dexPromise); * * if (SRStatusInstructionCommand.CmdName.Equals(split[0].ToLower())) * return new SRStatusInstructionCommand(Verbosity.Critical, dexPromise); * * * * if (DexInfoInstructionCommand.CmdName.Equals(split[0].ToLower())) * return new DexInfoInstructionCommand(Verbosity.Critical, dexPromise); * * if (DexTargetInstructionCommand.CmdName.Equals(split[0].ToLower())) * return new DexTargetInstructionCommand(Verbosity.Critical, dexPromise); * * if (TargetCommand.CmdName.Equals(split[0].ToLower())) * return new TargetCommand(dexPromise); * * if (DexLookInstructionCommand.CmdName.Equals(split[0].ToLower())) * return new DexLookInstructionCommand(Verbosity.Critical, dexPromise); * * if (HackCommand.CmdName.Equals(split[0].ToLower())) * return new HackCommand(dexPromise); * * if (ShowGraphUICommand.CmdName.Equals(split[0].ToLower())) * return new ShowGraphUICommand(dexPromise); * * if (split[0].ToLower().StartsWith("#")) * return new DexHackInstructionCommand(Verbosity.Critical, dexPromise);*/ return(null); }
public void SetPromise(IDexPromise promise) { MainWindow view = new MainWindow(); MainWindowViewModel viewModel = new MainWindowViewModel(); promise.Network.Nodes["VPN1"].Disabled = 700; viewModel.SetNetwork(promise.Network); view.DataContext = viewModel; if (elementHost1.Child != null) { elementHost1.Child = null; } elementHost1.Child = view; }
protected CommandBase(IDexPromise promise) { Promise = promise; }
public ShowGraphUICommand(IDexPromise promise) : base(promise) { CommandHelpString = "info #<software code>"; MandatoryParamCount = 0; }
public DexInfoInstructionCommand(Verbosity verbosity, IDexPromise promise) : base(CmdName, verbosity, promise) { CommandHelpString = "info #<software code>"; MandatoryParamCount = 1; OptionalParamCount = 2; }
public SRStatusInstructionCommand(Commands.Verbosity verbosity, IDexPromise promise) : base(CmdName, verbosity, promise) { CommandHelpString = $"{CmdName}"; MandatoryParamCount = 0; OptionalParamCount = 0; }
public DexLookInstructionCommand(Verbosity verbosity, IDexPromise promise) : base(CmdName, verbosity, promise) { CommandHelpString = "look <node>"; MandatoryParamCount = 1; }
//should _commands init _commands in the derived class :( protected CompositeCommand(IDexPromise promise) : base(promise) { }
public DexDirectInstructionCommand(Verbosity verbosity, IDexPromise promise) : base(CmdName, verbosity, promise) { CommandHelpString = "!<any text>"; MandatoryParamCount = 0; }
protected SRInstructionCommandBase(string instruction, Verbosity verbosity, IDexPromise promise) : base(promise) { _instruction = instruction; Verbosity = verbosity; State = CommandState.NotStarted; }
public DexTargetInstructionCommand(Verbosity verbosity, IDexPromise promise) : base(CmdName, verbosity, promise) { CommandHelpString = "target <networkName> //i.e target Blackmirror11"; MandatoryParamCount = 1; OptionalParamCount = 0; }
protected TextOutBase(IDexPromise promise) : base(promise) { }