Esempio n. 1
0
        private void SendCommand(NamedPipeServerStream pipe, Utility.TaskMsg task)
        {
            string command_src = new JavaScriptSerializer().Serialize(task);

            StringBuilder output = new StringBuilder();

            try
            {
                byte[] taskbyte = Encoding.Default.GetBytes(command_src);
                string taskb64  = Convert.ToBase64String(taskbyte);
                pipe.Write(Encoding.Default.GetBytes(taskb64), 0, Encoding.Default.GetBytes(taskb64).Length);
            }
            catch (IOException e)
            {
                Console.WriteLine("Error during sendcommand {0}", e.Message);
            }
            Console.WriteLine(output);
            Console.WriteLine();
        }
Esempio n. 2
0
 public InjectionLoaderListener(string pipename, Utility.TaskMsg command)
 {
     this.pipename = pipename;
     this.command  = command;
 }