예제 #1
0
        static void Main()
        {
            var clients = new List <Ts3FullClient>();

            for (int i = 0; i < 50; i++)
            {
                var client = new Ts3FullClient(EventDispatchType.AutoThreadPooled);
                client.OnConnected           += Client_OnConnected;
                client.OnDisconnected        += Client_OnDisconnected;
                client.OnErrorEvent          += Client_OnErrorEvent;
                client.OnTextMessageReceived += Client_OnTextMessageReceived;
                var data = Ts3Crypt.LoadIdentity("MG8DAgeAAgEgAiEAqNonGuL0w/8kLlgLbl4UkH8DQQJ7fEu1tLt+mx1E+XkCIQDgQoIGcBVvAvNoiDT37iWbPQb2kYe0+VKLg67OH2eQQwIgTyijCKx7QB/xQSnIW5uIkVmcm3UU5P2YnobR9IEEYPg=", 64, 0);
                con = new ConnectionDataFull()
                {
                    Address = "127.0.0.1", Username = "******", Identity = data, Password = "******"
                };
                client.Connect(con);
                clients.Add(client);
            }

            Console.WriteLine("End");
            Console.ReadLine();
        }
예제 #2
0
        static void Main3(string[] args)
        {
            // Initialize client
            var client = new Ts3FullClient(EventDispatchType.AutoThreadPooled);
            var data   = Ts3Crypt.LoadIdentity("MCkDAgbAAgEgAiBPKKMIrHtAH/FBKchbm4iRWZybdRTk/ZiehtH0gQRg+A==", 64, 0).Unwrap();

            //var data = Ts3Crypt.GenerateNewIdentity();
            con = new ConnectionDataFull()
            {
                Address = "pow.splamy.de", Username = "******", Identity = data
            };

            // Setup audio
            client
            // Save cpu by not processing the rest of the pipe when the
            // output is not read.
            .Chain <CheckActivePipe>()
            // This reads the packet meta data, checks for packet order
            // and manages packet merging.
            .Chain <AudioPacketReader>()
            // Teamspeak sends audio encoded. This pipe will decode it to
            // simple PCM.
            .Chain <DecoderPipe>()
            // This will merge multiple clients talking into one audio stream
            .Chain <ClientMixdown>()
            // Reads from the ClientMixdown buffer with a fixed timing
            .Into <PreciseTimedPipe>(x => x.Initialize(new SampleInfo(48_000, 2, 16)))
            // Reencode to the codec of our choice
            .Chain(new EncoderPipe(Codec.OpusMusic))
            // Define where to send to.
            .Chain <StaticMetaPipe>(x => x.SetVoice())
            // Send it with our client.
            .Chain(client);

            // Connect
            client.Connect(con);
        }
예제 #3
0
        public static void Main()
        {
            foreach (var ver in vers.Skip(0))
            {
                Ts3Server serv = null;
                Process   ts3  = null;
                try
                {
                    serv = new Ts3Server();
                    serv.Listen(new IPEndPoint(IPAddress.Any, 9987));
                    // http://ftp.4players.de/pub/hosted/ts3/updater-images/client/
                    // .\CAnydate.exe C:\TS\Any http://files.teamspeak-services.com/updater-images/client/1516349129 win32

                    Process anyd = new Process()
                    {
                        StartInfo = new ProcessStartInfo
                        {
                            FileName  = @"C:\TS\CAnydate.exe",
                            Arguments = $@"C:\TS\Any http://ftp.4players.de/pub/hosted/ts3/updater-images/client/{ver} win32"
                        }
                    };
                    anyd.Start();
                    anyd.WaitForExit();

                    ts3 = new Process()
                    {
                        StartInfo = new ProcessStartInfo
                        {
                            FileName = @"C:\TS\Any\ts3client_win32.exe",
                        }
                    };
                    ts3.Start();

                    for (int i = 0; i < 240; i++)
                    {
                        if (serv.Init)
                        {
                            break;
                        }
                        Thread.Sleep(1000);
                    }

                    if (!serv.Init)
                    {
                        Console.WriteLine("ERR! {0}", ver);
                        File.WriteAllText("sign.out", $"ERR! {ver}");
                        continue;
                    }
                }
                catch (Exception)
                {
                }
                finally
                {
                    try
                    {
                        ts3?.Kill();
                    }
                    catch { }
                    serv?.Dispose();
                }
            }

            //var crypt = new Ts3Crypt();
            //crypt.Test();
            //return;

            var clients = new List <Ts3FullClient>();

            //for (int i = 0; i < 50; i++)
            {
                var client = new Ts3FullClient(EventDispatchType.AutoThreadPooled);
                client.OnConnected       += Client_OnConnected;
                client.OnDisconnected    += Client_OnDisconnected;
                client.OnErrorEvent      += Client_OnErrorEvent;
                client.OnEachTextMessage += Client_OnTextMessageReceived;
                var data = Ts3Crypt.LoadIdentity("MCkDAgbAAgEgAiBPKKMIrHtAH/FBKchbm4iRWZybdRTk/ZiehtH0gQRg+A==", 64, 0);
                var con  = new ConnectionDataFull()
                {
                    Address = "127.0.0.1", Username = "******", Identity = data.Unwrap(), ServerPassword = "******", VersionSign = VersionSign.VER_WIN_3_1_8
                };
                client.Connect(con);
                clients.Add(client);
            }

            Console.WriteLine("End");
            Console.ReadLine();
        }
        static void Main()
        {
            AppDomain.CurrentDomain.ProcessExit += new EventHandler(CurrentDomain_ProcessExit);
            clients  = new List <Ts3FullClient>();
            channels = File.ReadAllLines(chanfile);
            var parser = new FileIniDataParser();

            cfg = parser.ReadFile(cfgfile);
            RandomNick rndnick = new RandomNick();

            rndnick.Init();
            TSSettings.OpenDB();
            Console.CancelKeyPress += (s, e) => {
                if (e.SpecialKey == ConsoleSpecialKey.ControlC)
                {
                    e.Cancel = true;
                    Dispose();
                    Environment.Exit(0);
                }
            };
            con.Address  = cfg["general"]["Address"];
            con.Password = cfg["general"]["ServerPassword"];
            ownerUID     = cfg["general"]["OwnerUID"];

            /*
             * adminCGID = uint.Parse(cfg["general"]["adminCGID"]);
             * modCGID = uint.Parse(cfg["general"]["modCGID"]);
             * banCGID = uint.Parse(cfg["general"]["banCGID"]);
             */
            if (!File.Exists(idfile))
            {
                using (File.Create(idfile)) { }
            }
            ids = File.ReadAllLines(idfile);
            for (int i = 0; i < channels.Length; i++)
            {
                if (isExit)
                {
                    return;
                }
                con.Username = rndnick.GetRandomNick();                 //cfg["general"]["Nickname"];
                var client = new Ts3FullClient(EventDispatchType.DoubleThread);
                client.OnConnected           += OnConnected;
                client.OnDisconnected        += OnDisconnected;
                client.OnErrorEvent          += OnErrorEvent;
                client.OnTextMessageReceived += OnTextMessageReceived;
                client.OnClientMoved         += OnClientMoved;
                client.OnClientEnterView     += OnClientEnterView;
                var          _identity = ids.Select(x => x.Split(',')).ToList();
                IdentityData ID;
                try {
                    ID = Ts3Crypt.LoadIdentity(_identity[i][0], ulong.Parse(_identity[i][1]));
                    if (i > 0)
                    {
                        Thread.Sleep(int.Parse(cfg["general"]["ConnectSleepMS"]));
                    }
                } catch (Exception) {
                    ID = Ts3Crypt.GenerateNewIdentity(int.Parse(cfg["general"]["MinLVL"]));
                    File.AppendAllText(idfile, ID.PrivateKeyString + "," + ID.ValidKeyOffset + "\r\n");
                }
                Console.WriteLine("#" + i + " UID: " + ID.ClientUid);
                con.Identity = ID;
                //Array values = Enum.GetValues(typeof(VersionSign));
                //Random random = new Random();
                //con.VersionSign = (VersionSign)values.GetValue(random.Next(values.Length));
                //var t = typeof(VersionSign).GetFields();
                con.VersionSign = VersionSign.VER_WIN_3_UNKNOWN;
                //con.VersionSign = new VersionSign("YaTQA-3.9pre [Build: 32503680000]", "ServerQuery", String.Empty);
                con.HWID = $"{Clientlib.RandomString(32)},{Clientlib.RandomString(32)}";
                Console.WriteLine("#" + i + " HWID: " + con.HWID);
                client.Connect(con);
                clients.Add(client);
            }
            AntiAFK = new Timer(OnTick, "on", 114 * 10000, 114 * 10000);
            Console.WriteLine("End");
            Console.ReadLine();
            Dispose();
        }