Exemple #1
0
        public MshtaLauncherMenuItem(CovenantAPI CovenantClient, EventPrinter EventPrinter) : base(CovenantClient, EventPrinter)
        {
            this.mshtaLauncher   = CovenantClient.ApiLaunchersMshtaGet();
            this.MenuTitle       = mshtaLauncher.Name;
            this.MenuDescription = mshtaLauncher.Description;

            this.AdditionalOptions.Add(new MenuCommandMshtaLauncherShow(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMshtaLauncherGenerate(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMshtaLauncherCode());
            this.AdditionalOptions.Add(new MenuCommandMshtaLauncherHost(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMshtaLauncherWriteFile());
            var setCommand = new MenuCommandMshtaLauncherSet(CovenantClient);

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

            this.Refresh();
        }
Exemple #2
0
        public MshtaLauncherMenuItem(CovenantAPI CovenantClient) : base(CovenantClient)
        {
            try
            {
                this.MshtaLauncher   = CovenantClient.ApiLaunchersMshtaGet();
                this.MenuTitle       = MshtaLauncher.Name;
                this.MenuDescription = MshtaLauncher.Description;

                this.AdditionalOptions.Add(new MenuCommandMshtaLauncherShow(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMshtaLauncherGenerate(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMshtaLauncherCode(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMshtaLauncherHost(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMshtaLauncherWriteFile(CovenantClient));
                var setCommand = new MenuCommandMshtaLauncherSet(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);
            }
        }