Exemplo n.º 1
0
        private Unknown6 GenerateSignature(IEnumerable <IMessage> requests)
        {
            var sig = new POGOProtos.Networking.Signature();

            sig.TimestampSinceStart = (ulong)_internalWatch.ElapsedMilliseconds;
            sig.Timestamp           = (ulong)DateTime.UtcNow.ToUnixTime();
            sig.SensorInfo          = new POGOProtos.Networking.Signature.Types.SensorInfo()
            {
                AccelNormalizedZ  = GenRandom(9.8),
                AccelNormalizedX  = GenRandom(0.02),
                AccelNormalizedY  = GenRandom(0.3),
                TimestampSnapshot = (ulong)_internalWatch.ElapsedMilliseconds - 230,
                MagnetometerX     = GenRandom(0.12271042913198471),
                MagnetometerY     = GenRandom(-0.015570580959320068),
                MagnetometerZ     = GenRandom(0.010850906372070313),
                AngleNormalizedX  = GenRandom(17.950439453125),
                AngleNormalizedY  = GenRandom(-23.36273193359375),
                AngleNormalizedZ  = GenRandom(-48.8250732421875),
                AccelRawX         = GenRandom(-0.0120010357350111),
                AccelRawY         = GenRandom(-0.04214850440621376),
                AccelRawZ         = GenRandom(0.94571763277053833),
                GyroscopeRawX     = GenRandom(7.62939453125e-005),
                GyroscopeRawY     = GenRandom(-0.00054931640625),
                GyroscopeRawZ     = GenRandom(0.0024566650390625),
                AccelerometerAxes = 3
            };
            sig.DeviceInfo = new POGOProtos.Networking.Signature.Types.DeviceInfo()
            {
                DeviceId              = settings.DeviceId,
                AndroidBoardName      = settings.AndroidBoardName,
                AndroidBootloader     = settings.AndroidBootloader,
                DeviceBrand           = settings.DeviceBrand,
                DeviceModel           = settings.DeviceModel,
                DeviceModelIdentifier = settings.DeviceModelIdentifier,
                DeviceModelBoot       = settings.DeviceModelBoot,
                HardwareManufacturer  = settings.HardwareManufacturer,
                HardwareModel         = settings.HardwareModel,
                FirmwareBrand         = settings.FirmwareBrand,
                FirmwareTags          = settings.FirmwareTags,
                FirmwareType          = settings.FirmwareType,
                FirmwareFingerprint   = settings.FirmwareFingerprint
            };

            float altitude      = 0;
            long  requestLength = 200;

            lock (RandomDevice)
            {
                altitude      = (float)(RandomDevice.NextDouble() * (15 - 10) + 10);
                requestLength = (long)RandomDevice.Next(100, 300);
            }

            sig.LocationFix.Add(new POGOProtos.Networking.Signature.Types.LocationFix()
            {
                Provider = "network",

                //Unk4 = 120,
                Latitude  = (float)_latitude,
                Longitude = (float)_longitude,
                //Altitude = (float)_altitude,
                Altitude            = altitude, //Just random for now
                TimestampSinceStart = (ulong)(_internalWatch.ElapsedMilliseconds - requestLength),
                Floor        = 3,
                LocationType = 1
            });

            //Compute 10
            var x         = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            var firstHash = BitConverter.ToUInt32(x.ComputeHash(_authTicket.ToByteArray()), 0);

            x = new System.Data.HashFunction.xxHash(32, firstHash);
            var locationBytes = BitConverter.GetBytes(_latitude).Reverse()
                                .Concat(BitConverter.GetBytes(_longitude).Reverse())
                                .Concat(BitConverter.GetBytes(_altitude).Reverse()).ToArray();

            sig.LocationHash1 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 20
            x = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            sig.LocationHash2 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 24
            x = new System.Data.HashFunction.xxHash(64, 0x1B845238);
            var seed = BitConverter.ToUInt64(x.ComputeHash(_authTicket.ToByteArray()), 0);

            x = new System.Data.HashFunction.xxHash(64, seed);
            foreach (var req in requests)
            {
                sig.RequestHash.Add(BitConverter.ToUInt64(x.ComputeHash(req.ToByteArray()), 0));
            }

            //static for now
            //sig.Unk22 = ByteString.CopyFrom(new byte[16] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F });
            byte[] buffer = new byte[16];

            lock (RandomDevice)
            {
                RandomDevice.NextBytes(buffer);
            }

            sig.Unk22 = ByteString.CopyFrom(buffer);

            Unknown6 val = new Unknown6();

            val.RequestType       = 6;
            val.Unknown2          = new Unknown6.Types.Unknown2();
            val.Unknown2.Unknown1 = ByteString.CopyFrom(Encrypt(sig.ToByteArray()));
            return(val);
        }
Exemplo n.º 2
0
        private Unknown6 GenerateSignature(IEnumerable <IMessage> requests)
        {
            var sig = new POGOProtos.Networking.Signature();

            sig.TimestampSinceStart = (ulong)_internalWatch.ElapsedMilliseconds;
            sig.Timestamp           = (ulong)DateTime.UtcNow.ToUnixTime();
            sig.SensorInfo          = new POGOProtos.Networking.Signature.Types.SensorInfo()
            {
                AccelNormalizedZ  = GenRandom(9.8),
                AccelNormalizedX  = GenRandom(0.02),
                AccelNormalizedY  = GenRandom(0.3),
                TimestampSnapshot = (ulong)_internalWatch.ElapsedMilliseconds - 230,
                MagnetometerX     = GenRandom(0.12271042913198471),
                MagnetometerY     = GenRandom(-0.015570580959320068),
                MagnetometerZ     = GenRandom(0.010850906372070313),
                AngleNormalizedX  = GenRandom(17.950439453125),
                AngleNormalizedY  = GenRandom(-23.36273193359375),
                AngleNormalizedZ  = GenRandom(-48.8250732421875),
                AccelRawX         = GenRandom(-0.0120010357350111),
                AccelRawY         = GenRandom(-0.04214850440621376),
                AccelRawZ         = GenRandom(0.94571763277053833),
                GyroscopeRawX     = GenRandom(7.62939453125e-005),
                GyroscopeRawY     = GenRandom(-0.00054931640625),
                GyroscopeRawZ     = GenRandom(0.0024566650390625),
                AccelerometerAxes = 3
            };
            sig.DeviceInfo = new POGOProtos.Networking.Signature.Types.DeviceInfo()
            {
                DeviceId              = GetDeviceId(),
                AndroidBoardName      = "msm8994", // might al
                AndroidBootloader     = "unknown",
                DeviceBrand           = "OnePlus",
                DeviceModel           = "OnePlus2", // might als
                DeviceModelIdentifier = "ONE A2003_24_160604",
                DeviceModelBoot       = "qcom",
                HardwareManufacturer  = "OnePlus",
                HardwareModel         = "ONE A2003",
                FirmwareBrand         = "OnePlus2",
                FirmwareTags          = "dev-keys",
                FirmwareType          = "user",
                FirmwareFingerprint   = "OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447840820:user/release-keys"
            };
            sig.LocationFix.Add(new POGOProtos.Networking.Signature.Types.LocationFix()
            {
                Provider = "network",

                //Unk4 = 120,
                Latitude            = (float)_latitude,
                Longitude           = (float)_longitude,
                Altitude            = (float)_altitude,
                TimestampSinceStart = (ulong)_internalWatch.ElapsedMilliseconds - 200,
                Floor        = 3,
                LocationType = 1
            });

            //Compute 10
            var x         = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            var firstHash = BitConverter.ToUInt32(x.ComputeHash(_authTicket.ToByteArray()), 0);

            x = new System.Data.HashFunction.xxHash(32, firstHash);
            var locationBytes = BitConverter.GetBytes(_latitude).Reverse()
                                .Concat(BitConverter.GetBytes(_longitude).Reverse())
                                .Concat(BitConverter.GetBytes(_altitude).Reverse()).ToArray();

            sig.LocationHash1 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 20
            x = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            sig.LocationHash2 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 24
            x = new System.Data.HashFunction.xxHash(64, 0x1B845238);
            var seed = BitConverter.ToUInt64(x.ComputeHash(_authTicket.ToByteArray()), 0);

            x = new System.Data.HashFunction.xxHash(64, seed);
            foreach (var req in requests)
            {
                sig.RequestHash.Add(BitConverter.ToUInt64(x.ComputeHash(req.ToByteArray()), 0));
            }

            //static for now
            sig.Unk22 = ByteString.CopyFrom(new byte[16] {
                0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
            });


            Unknown6 val = new Unknown6();

            val.RequestType       = 6;
            val.Unknown2          = new Unknown6.Types.Unknown2();
            val.Unknown2.Unknown1 = ByteString.CopyFrom(Encrypt(sig.ToByteArray()));
            return(val);
        }
Exemplo n.º 3
0
        private Unknown6 GenerateSignature(IEnumerable<IMessage> requests)
        {
            var sig = new POGOProtos.Networking.Signature();
            sig.TimestampSinceStart = (ulong)_internalWatch.ElapsedMilliseconds;
            sig.Timestamp = (ulong)DateTime.UtcNow.ToUnixTime();
            sig.SensorInfo = new POGOProtos.Networking.Signature.Types.SensorInfo()
            {
                AccelNormalizedZ = GenRandom(9.8),
                AccelNormalizedX = GenRandom(0.02),
                AccelNormalizedY = GenRandom(0.3),
                TimestampSnapshot = (ulong)_internalWatch.ElapsedMilliseconds - 230,
                MagnetometerX = GenRandom(0.12271042913198471),
                MagnetometerY = GenRandom(-0.015570580959320068),
                MagnetometerZ = GenRandom(0.010850906372070313),
                AngleNormalizedX = GenRandom(17.950439453125),
                AngleNormalizedY = GenRandom(-23.36273193359375),
                AngleNormalizedZ = GenRandom(-48.8250732421875),
                AccelRawX = GenRandom(-0.0120010357350111),
                AccelRawY = GenRandom(-0.04214850440621376),
                AccelRawZ = GenRandom(0.94571763277053833),
                GyroscopeRawX = GenRandom(7.62939453125e-005),
                GyroscopeRawY = GenRandom(-0.00054931640625),
                GyroscopeRawZ = GenRandom(0.0024566650390625),
                AccelerometerAxes = 3
            };
            sig.DeviceInfo = new POGOProtos.Networking.Signature.Types.DeviceInfo()
            {
                DeviceId = GetDeviceId(),
                AndroidBoardName = "msm8994", // might al
                AndroidBootloader = "unknown",
                DeviceBrand = "OnePlus",
                DeviceModel = "OnePlus2", // might als
                DeviceModelIdentifier = "ONE A2003_24_160604",
                DeviceModelBoot = "qcom",
                HardwareManufacturer = "OnePlus",
                HardwareModel = "ONE A2003",
                FirmwareBrand = "OnePlus2",
                FirmwareTags = "dev-keys",
                FirmwareType = "user",
                FirmwareFingerprint = "OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447840820:user/release-keys"
            };
            sig.LocationFix.Add(new POGOProtos.Networking.Signature.Types.LocationFix()
            {
                Provider = "network",

                //Unk4 = 120,
                Latitude = (float)_latitude,
                Longitude = (float)_longitude,
                Altitude = (float)_altitude,
                TimestampSinceStart = (ulong)_internalWatch.ElapsedMilliseconds - 200,
                Floor = 3,
                LocationType = 1
            });

            //Compute 10
            var x = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            var firstHash = BitConverter.ToUInt32(x.ComputeHash(_authTicket.ToByteArray()), 0);
            x = new System.Data.HashFunction.xxHash(32, firstHash);
            var locationBytes = BitConverter.GetBytes(_latitude).Reverse()
                .Concat(BitConverter.GetBytes(_longitude).Reverse())
                .Concat(BitConverter.GetBytes(_altitude).Reverse()).ToArray();
            sig.LocationHash1 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 20
            x = new System.Data.HashFunction.xxHash(32, 0x1B845238);
            sig.LocationHash2 = BitConverter.ToUInt32(x.ComputeHash(locationBytes), 0);
            //Compute 24
            x = new System.Data.HashFunction.xxHash(64, 0x1B845238);
            var seed = BitConverter.ToUInt64(x.ComputeHash(_authTicket.ToByteArray()), 0);
            x = new System.Data.HashFunction.xxHash(64, seed);
            foreach (var req in requests)
                sig.RequestHash.Add(BitConverter.ToUInt64(x.ComputeHash(req.ToByteArray()), 0));

            //static for now
            sig.Unk22 = ByteString.CopyFrom(new byte[16] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F });

            Unknown6 val = new Unknown6();
            val.RequestType = 6;
            val.Unknown2 = new Unknown6.Types.Unknown2();
            val.Unknown2.Unknown1 = ByteString.CopyFrom(Encrypt(sig.ToByteArray()));
            return val;
        }