Advertisement
Guest User

Untitled

a guest
Jul 4th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. ÇáÓáÇã Úáíßã æÑÍãå Çááå æÈÑßÇÊå
  2. ÇáäåÇÑÏå ãÚÇíÇ ÇááæÏÑ Çááì ÇäÇ ßäÊ ãäÒáå ÞÈá ßÏå ÈÓ ãÓÍÊ ÇáãæÖæÚ æÇáÇä åäÒáå ÊÇäí
  3. äÏÎá Úáì ÇáÊÑßíÈ Úáì Øæá
  4. ÑæÍ Úáì ßáÇÓ Constants
  5. ÇÈÍË Úä
  6. ßæÏ PHP:
  7.  
  8. GameCryptographyKey = "
  9. ÈÏá ÇáÓØÑ ßáå È
  10. ßæÏ PHP:
  11. GameCryptographyKey = "z1Sf34V7z6AV13uA";
  12. ÑæÍ Úáì ßáÇÓ Authentication
  13. æÈÏáå ßáå
  14. ßæÏ PHP:
  15. // Created by Mohamed Almasri
  16.  
  17. using Almasri.Network.Cryptography;
  18.  
  19. using System;
  20.  
  21. using System.IO;
  22.  
  23. using System.Text;
  24.  
  25. namespace Almasri.Network.AuthPackets
  26.  
  27. {
  28.  
  29. public unsafe class Authentication : Interfaces.IPacket
  30.  
  31. {
  32.  
  33. public string Username;
  34.  
  35. public string Password;
  36.  
  37. public string Server;
  38.  
  39. public string Mac;
  40.  
  41. public Authentication()
  42.  
  43. {
  44.  
  45. }
  46.  
  47. public void Deserialize(byte[] buffer)
  48.  
  49. {
  50.  
  51. if (buffer.Length == 312)
  52.  
  53. {
  54.  
  55. ushort length = BitConverter.ToUInt16(buffer, 0);
  56.  
  57. if (length == 312)
  58.  
  59. {
  60.  
  61. ushort type = BitConverter.ToUInt16(buffer, 2);
  62.  
  63. byte[] temp = new byte[16];
  64.  
  65. if (type == 1542)
  66.  
  67. {
  68.  
  69. MemoryStream MS = new MemoryStream(buffer);
  70.  
  71. BinaryReader BR = new BinaryReader(MS);
  72.  
  73. BR.ReadUInt16();
  74.  
  75. BR.ReadUInt16();
  76.  
  77. Username = Encoding.Default.GetString(BR.ReadBytes(32));
  78.  
  79. Username = Username.Replace("\0", "");
  80.  
  81. BR.ReadBytes(36);
  82.  
  83. var PasswordArray = BR.ReadBytes(32);
  84.  
  85. LoaderEncryption.Decrypt(PasswordArray, 32);
  86.  
  87. Password = Encoding.Default.GetString(PasswordArray);
  88.  
  89. Password = Password.Replace("\0", "");
  90.  
  91. BR.ReadBytes(32);
  92.  
  93. Server = Encoding.Default.GetString(BR.ReadBytes(32));
  94.  
  95. Server = Server.Replace("\0", "");
  96.  
  97. BR.Close();
  98.  
  99. MS.Close();
  100.  
  101. }
  102.  
  103. }
  104.  
  105. }
  106.  
  107. }
  108.  
  109. public byte[] ToArray()
  110.  
  111. {
  112.  
  113. throw new NotImplementedException();
  114.  
  115. }
  116.  
  117. public void Send(Client.GameClient client)
  118.  
  119. {
  120.  
  121. throw new NotImplementedException();
  122.  
  123. }
  124.  
  125. }
  126.  
  127. }
  128. ÛíÑ ÇÓã ÇáÈÑæÌíßÊ
  129. ßæÏ PHP:
  130. Almasri
  131. ÑæÍ Úáì ßáÇÓ LoaderEncryption
  132. æÈÏáå ßáå È
  133. ßæÏ PHP:
  134. using System;
  135.  
  136. using System.Collections.Generic;
  137.  
  138. using System.Linq;
  139.  
  140. using System.Text;
  141.  
  142. namespace Almasri.Network.Cryptography
  143.  
  144. {
  145.  
  146. public class LoaderEncryption
  147.  
  148. {
  149.  
  150. private static byte[] Key = { 180, 152, 187, 196, 231, 208, 204, 120, 177, 164, 184, 77, 9, 125, 114, 49, 9, 191, 20, 122, 9, 39, 123, 17, 115, 222, 188, 120, 109, 9, 65, 206, 85, 10, 29, 215, 143, 108, 231, 114 };
  151.  
  152. public static void Encrypt(byte[] arr)
  153.  
  154. {
  155.  
  156. int length = Key.Length;
  157.  
  158. for (int i = 0; i < arr.Length; i++)
  159.  
  160. {
  161.  
  162. arr[i] ^= Key[i % length];
  163.  
  164. arr[i] ^= Key[(i + 1) % length];
  165.  
  166. }
  167.  
  168. }
  169.  
  170. public static void Decrypt(byte[] arr, int size)
  171.  
  172. {
  173.  
  174. int length = Key.Length;
  175.  
  176. for (int i = 0; i < size; i++)
  177.  
  178. {
  179.  
  180. arr[i] ^= Key[(i + 1) % length];
  181.  
  182. arr[i] ^= Key[i % length];
  183.  
  184. }
  185.  
  186. }
  187.  
  188. }
  189.  
  190. }
  191. ÛíÑ ÈÑÏå ÇÓã ÇáÈÑæÌíßÊ
  192. ßæÏ PHP:
  193. Almasri
  194. ÇáÈÇÊÔ :
  195. ßæÏ PHP:
  196. http://up.top4top.net/downloadf-414iay331-rar.html
  197. Íãá 7-zip
  198. ßæÏ PHP:
  199. http://www.7-zip.org/a/7z1604.exe
  200. ÔÑÍ ÇáÊÚÏíá
  201. ßæÏ PHP:
  202. https://www.youtube.com/watch?v=JahaG6x_GU4
  203. æÈÚÏ ãÇÊÚãá Çááì Ýì ÇáÝíÏíæ ÑæÍ Úáì ÇáßáäÊ æÇÝÊÍ ÝæáÏÑ neoncube æÚÏá ÇáÇì Èì ãä ÇáÊßÓÊ neoncube
  204. ãáÍæÙå:
  205. ÇáÈÇÊÔ Ïå ÞÏíã íÚäì ãÝåæÔ ÇáÌÑãäÊÇÊ ÇáÌÏíÏå ÇäÊ Íãá ÈÇÊÔÇÊ ßæäßÑ ÇáÌÏíÏå æÎÏ ãäåÇ ÇáãáÝÇÊ ÇáÌÏíÏå Òì ini æ ani æÇáÍÌÇÊ Ïì æÖíÝåÇ Ýì ÇááæÏÑ ÚäÏß
  206. ÈÇáÊæÝíÞ ááÌãíÚ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement