示例#1
0
        public BinaryLauncherMenuItem(CovenantAPI CovenantClient, EventPrinter EventPrinter) : base(CovenantClient, EventPrinter)
        {
            this.binaryLauncher  = CovenantClient.ApiLaunchersBinaryGet();
            this.MenuTitle       = binaryLauncher.Name;
            this.MenuDescription = binaryLauncher.Description;

            this.AdditionalOptions.Add(new MenuCommandBinaryLauncherShow(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandBinaryLauncherGenerate(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandBinaryLauncherCode());
            this.AdditionalOptions.Add(new MenuCommandBinaryLauncherHost(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandBinaryLauncherWriteFile());
            var setCommand = new MenuCommandBinaryLauncherSet(CovenantClient);

            this.AdditionalOptions.Add(setCommand);
            this.AdditionalOptions.Add(new MenuCommandGenericUnset(setCommand.Parameters.FirstOrDefault(P => P.Name == "Option").Values));

            this.Refresh();
        }
示例#2
0
        public BinaryLauncherMenuItem(CovenantAPI CovenantClient) : base(CovenantClient)
        {
            try
            {
                this.BinaryLauncher  = CovenantClient.ApiLaunchersBinaryGet();
                this.MenuTitle       = BinaryLauncher.Name;
                this.MenuDescription = BinaryLauncher.Description;

                this.AdditionalOptions.Add(new MenuCommandBinaryLauncherShow(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandBinaryLauncherGenerate(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandBinaryLauncherCode(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandBinaryLauncherHost(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandBinaryLauncherWriteFile(CovenantClient));
                var setCommand = new MenuCommandBinaryLauncherSet(CovenantClient);
                this.AdditionalOptions.Add(setCommand);
                this.AdditionalOptions.Add(new MenuCommandGenericUnset(setCommand.Parameters.FirstOrDefault(P => P.Name == "Option").Values));
            }
            catch (HttpOperationException e)
            {
                EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content);
            }
        }