public static BaseRequest CreateBaseRequestEntity(string deviceID, string sessionKey, uint uIn, string osType, int scene) { BaseRequest.Builder builder = new BaseRequest.Builder(); builder.SetSessionKey(ByteString.CopyFrom(sessionKey, Encoding.Default)); builder.SetUin(uIn); byte[] array = new byte[16]; array = Encoding.Default.GetBytes(deviceID + "\0"); builder.SetDeviceID(ByteString.CopyFrom(array)); builder.SetClientVersion(637929271); builder.SetDeviceType(ByteString.CopyFrom(osType, Encoding.Default)); builder.SetScene(scene); return(builder.Build()); }
public static BaseRequest GetBasePack(byte[] sessionKey, long uin = 0, int Scene = 0) { BaseRequest.Builder pack = new BaseRequest.Builder(); byte[] deviceid = "49aa7db2f4a3ffe0e96218f6b92cde32".ToByteArray(16, 2); pack.SetDeviceID(ByteString.CopyFrom(deviceid)); pack.SetDeviceType(ByteString.CopyFromUtf8("iPad iPhone OS8.4")); pack.SetScene(Scene); pack.SetSessionKey(ByteString.CopyFrom(sessionKey)); Console.WriteLine(uin); Console.WriteLine((uint)uin); pack.SetUin((uint)uin); pack.SetClientVersion(0x16070124); return(pack.Build()); }
public static BaseRequest CreateBaseRequestEntity(string deviceID, string sessionKey, uint uIn, string osType, int scene) { BaseRequest.Builder brb = new BaseRequest.Builder(); byte[] byt = new byte[36]; brb.SetSessionKey(ByteString.CopyFrom(sessionKey, Encoding.Default)); brb.SetUin(uIn); byte[] bytSD = new byte[16]; bytSD = Encoding.Default.GetBytes(deviceID + "\x00"); brb.SetDeviceID(ByteString.CopyFrom(bytSD)); brb.SetClientVersion(VERSION); brb.SetDeviceType(ByteString.CopyFrom(osType, Encoding.Default)); brb.SetScene(scene); BaseRequest br = brb.Build(); return(br); }
public static BaseRequest CreateBaseRequestEntity(string deviceID, string osType, int scene, int version) { BaseRequest.Builder brb = new BaseRequest.Builder(); byte[] byt = new byte[0]; brb.SetSessionKey(ByteString.CopyFrom(byt)); brb.SetUin(0); byte[] bytSD = new byte[16]; bytSD = Encoding.Default.GetBytes(deviceID + "\x00"); brb.SetDeviceID(ByteString.CopyFrom(bytSD)); brb.SetClientVersion(version); //osType = "iPad iPhone OS7.0.3"; brb.SetDeviceType(ByteString.CopyFrom(osType, Encoding.Default)); brb.SetScene(scene); BaseRequest br = brb.Build(); return(br); }