Advertisement
Guest User

Untitled

a guest
Aug 8th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.30 KB | None | 0 0
  1. new PlVers:__version = 5;
  2. new Float:NULL_VECTOR[3];
  3. new String:NULL_STRING[1];
  4. new Extension:__ext_core = 64;
  5. new MaxClients;
  6. new Extension:__ext_sdktools = 492;
  7. new Extension:__ext_smsock = 536;
  8. new String:anz1[3][4] =
  9. {
  10. "a",
  11. "n",
  12. "z"
  13. }
  14. new String:anz2[3][4] =
  15. {
  16. "A",
  17. "N",
  18. "Z"
  19. }
  20. new String:anz3[3][4] =
  21. {
  22. "0",
  23. "5",
  24. "9"
  25. }
  26. new String:sBase64Table[17] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  27. new String:szTmpFile[3] = "ucptmp.txt";
  28. new String:szFileList[6] = "cfg/ucp/filelist.txt";
  29. new String:szDetectList[6] = "cfg/ucp/detectlist.txt";
  30. new String:szWadFile[2] = "ucp.cmd";
  31. new __@179[65];
  32. new __@178[65];
  33. new String:__@175[32];
  34. new String:__@177[8];
  35. new __@180[65];
  36. new __@181[65];
  37. new __@182[65];
  38. new __@183[65];
  39. new __@186[65];
  40. new __@265[65];
  41. new String:__@184[65][8];
  42. new String:__@185[65][8];
  43. new String:__@240[32];
  44. new String:__@14[9];
  45. new String:__@307[17];
  46. new String:__@244[65][8];
  47. new String:__@279[65][8];
  48. new String:__@250[105][32];
  49. new __@250_;
  50. new upmode;
  51. new String:__@297[55][128];
  52. new __@297_;
  53. new ServPort;
  54. new String:__@174[64];
  55. new String:__@255[32];
  56. new String:__@264[64];
  57. new String:ScreenMotdBuf[256];
  58. new String:DownloadLinkBuf[256];
  59. new String:hostbuf[16];
  60. new String:pathbuf[16];
  61. new String:portbuf[2];
  62. new String:UpdateNick[65][32];
  63. new String:ServHost[16];
  64. new Handle:c_ucp_version;
  65. new Handle:c_ucp_mode;
  66. new Handle:c_ucp_banlist_file;
  67. new Handle:c_ucp_build;
  68. new Handle:c_ucp_cpurl;
  69. new Handle:c_ucp_link;
  70. new Handle:c_ucp_checkfile_mode;
  71. new Handle:c_ucp_umode;
  72. new Handle:c_ucp_uhost;
  73. new Handle:c_ucp_uport;
  74. new Handle:c_ucp_uuser;
  75. new Handle:c_ucp_upass;
  76. new Handle:c_ucp_upath;
  77. new Handle:c_ucp_autoscreen;
  78. new Handle:c_ucp_mathack;
  79. new Handle:c_ucp_monitor;
  80. new Handle:c_ucp_who_mode;
  81. new Handle:c_ucp_detect_mode;
  82. new Handle:c_ucp_detect_time;
  83. new Handle:c_ucp_log_mode;
  84. new Handle:c_game_mode;
  85. public Plugin:myinfo =
  86. {
  87. name = "UCP Server",
  88. description = "Ultra Core Protector Anti-Cheat",
  89. author = "Endi",
  90. verison = "7.1",
  91. url = "http://ucp-anticheat.org/"
  92. };
  93.  
  94. public OnMapStart()
  95. {
  96. c_ucp_mathack = 1;
  97. DeleteFile("ucp.cmd.ztmp");
  98. if (!FileExists(szWadFile, false)) {
  99. LogMessage("Can't read %s", szWadFile);
  100. return 3;
  101. }
  102. AddFileToDownloadsTable(szWadFile);
  103. PrecacheGeneric(szWadFile, false);
  104. __@250_ = 0;
  105. decl String:buffer[128];
  106. if (!FileExists(szFileList, false)) {
  107. new HANDLE:file = OpenFile(szFileList, "wb");
  108. CloseHandle(file);
  109. } else {
  110. decl String:modebuffer[36];
  111. decl String:md5buffer[36];
  112. GetGameFolderName(modebuffer, 34);
  113. new HANDLE:file = OpenFile(szFileList, "rb");
  114. if (file) {
  115. while (!IsEndOfFile(file) && ReadFileLine(file, buffer, 128)) {
  116. new var2;
  117. if (buffer[0] != ';') {
  118. ReplaceString(buffer, strlen(buffer), "\r", "", true);
  119. ReplaceString(buffer, strlen(buffer), "\n", "", true);
  120. if (FileExists(buffer, false)) {
  121. AddFileToDownloadsTable(buffer);
  122. PrecacheGeneric(buffer, false);
  123. md5_file(buffer, md5buffer);
  124. ReplaceString(buffer, strlen(buffer), "/", "\", true);
  125. Format(__@250[__@250_], 127, "%s%s\%s", md5buffer, modebuffer, buffer);
  126. if (StrContains(__@250[__@250_], ".", true) != -1) {
  127. __@250_ = __@250_ + 1;
  128. }
  129. }
  130. }
  131. }
  132. CloseHandle(file);
  133. } else {
  134. LogMessage("Can't open %s", szFileList);
  135. }
  136. }
  137. GetDetectList();
  138. return 0;
  139. }
  140.  
  141. public GetDetectList()
  142. {
  143. __@297_ = 0;
  144. decl String:buffer[512];
  145. if (!FileExists(szDetectList, false)) {
  146. new HANDLE:file = OpenFile(szDetectList, "wb");
  147. CloseHandle(file);
  148. } else {
  149. new HANDLE:file = OpenFile(szDetectList, "rb");
  150. if (file) {
  151. while (!IsEndOfFile(file) && ReadFileLine(file, buffer, 512)) {
  152. new var2;
  153. if (buffer[0] != ';') {
  154. ReplaceString(buffer, strlen(buffer), "\r", "", true);
  155. ReplaceString(buffer, strlen(buffer), "\n", "", true);
  156. strcopy(__@297[__@297_], 511, buffer);
  157. __@297_ = __@297_ + 1;
  158. }
  159. }
  160. CloseHandle(file);
  161. } else {
  162. if (GetConVarInt(c_ucp_log_mode)) {
  163. LogMessage("Can't open %s", szDetectList);
  164. }
  165. }
  166. }
  167. return 0;
  168. }
  169.  
  170. public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max)
  171. {
  172. CreateNative("ucp_id", func_24);
  173. CreateNative("GetClientAuthString2", func_69);
  174. CreateNative("GetClientBuild", func_30);
  175. CreateNative("GetClientOs", func_31);
  176. return true;
  177. }
  178.  
  179. public Action:func_21(id, args)
  180. {
  181. if (IsFakeClient(id)) {
  182. return Action:0;
  183. }
  184. if (!GetConVarInt(c_ucp_mode)) {
  185. return Action:0;
  186. }
  187. if (__@183[id]) {
  188. return Action:0;
  189. }
  190. if (!__@180[id]) {
  191. new var1;
  192. if (__@181[id]) {
  193. decl String:buffer[32];
  194. decl String:Md5HashBuf[36];
  195. Format(buffer, 32, "%s ", __@184[id]);
  196. md5(buffer, Md5HashBuf, 34);
  197. Md5HashBuf[2] = 0;
  198. __@185[id][10] = 0;
  199. if (StrEqual(Md5HashBuf, __@185[id] + 8, false)) {
  200. __@179[id] = GetRandomInt(100000, 999999999);
  201. new len = IntToString(__@179[id], buffer, 32);
  202. func_37(buffer, len);
  203. ClientCommand(id, "ucp_%s 4%s", __@184[id], buffer);
  204. CreateTimer(10, func_19, id, 0);
  205. __@183[id] = 1;
  206. if (GetConVarInt(c_ucp_autoscreen) >= 60) {
  207. CreateTimer(10, func_27, id, 0);
  208. }
  209. if (__@186[id] == 1) {
  210. CreateTimer(0.5, func_33, id, 0);
  211. }
  212. CreateTimer(15, func_83, id, 0);
  213. if (GetConVarInt(c_ucp_detect_mode)) {
  214. CreateTimer(0.5, func_70, id, 0);
  215. }
  216. return Action:0;
  217. }
  218. }
  219. CreateTimer(0.1, func_34, id, 0);
  220. return Action:0;
  221. }
  222. func_16(id);
  223. return Action:0;
  224. }
  225.  
  226. public OnClientConnected(id)
  227. {
  228. __@184[id] = 0;
  229. __@179[id] = 0;
  230. __@186[id] = 0;
  231. __@307[id] = 0;
  232. __@180[id] = 1;
  233. __@181[id] = 1;
  234. __@182[id] = 1;
  235. if (GetConVarInt(c_ucp_mode)) {
  236. __@183[id] = 0;
  237. GetClientInfo(id, "*ucp_id", __@185[id], 12);
  238. if (strlen(__@185[id]) == 11) {
  239. strcopy(__@184[id], 11, __@185[id]);
  240. __@184[id][8] = 0;
  241. new i = 0;
  242. while (i < 8) {
  243. new var1;
  244. if (__@184[id][i][0] >= 'A') {
  245. i++;
  246. }
  247. i++;
  248. }
  249. decl String:l_@11[512];
  250. decl String:l_@10[12];
  251. decl String:l_@12[128];
  252. new b = 0;
  253. new HANDLE:file = OpenFile(__@175, "rt");
  254. if (file != HANDLE:-1) {
  255. while (!IsEndOfFile(file) && ReadFileLine(file, l_@11, 512)) {
  256. strcopy(l_@10, 9, l_@11);
  257. l_@10[8] = 0;
  258. if (StrEqual(l_@10, __@184[id], true)) {
  259. b = StrContains(l_@11[9], " ", true);
  260. new len = strlen(l_@11);
  261. while (len) {
  262. if (StrContains(l_@11[len], " ", true) != -1) {
  263. len++;
  264. strcopy(l_@12, 128, l_@11[len]);
  265. l_@11[b + 9] = 0;
  266. b = StringToInt(l_@11[9], 10);
  267. if (b) {
  268. new l_@9 = GetTime({0,0});
  269. if (l_@9 < b) {
  270. b -= l_@9;
  271. b /= 60;
  272. KickClient(id, "%t", "UCP_BANTIMEREASONMSG", b, l_@12);
  273. CloseHandle(file);
  274. return 0;
  275. }
  276. CloseHandle(file);
  277. file = -1;
  278. func_28(__@184[id]);
  279. CloseHandle(file);
  280. }
  281. KickClient(id, "%t", "UCP_BANREASONMSG", l_@12);
  282. CloseHandle(file);
  283. return 0;
  284. }
  285. len--;
  286. }
  287. strcopy(l_@12, 128, l_@11[len]);
  288. l_@11[b + 9] = 0;
  289. b = StringToInt(l_@11[9], 10);
  290. if (b) {
  291. new l_@9 = GetTime({0,0});
  292. if (l_@9 < b) {
  293. b -= l_@9;
  294. b /= 60;
  295. KickClient(id, "%t", "UCP_BANTIMEREASONMSG", b, l_@12);
  296. CloseHandle(file);
  297. return 0;
  298. }
  299. CloseHandle(file);
  300. file = -1;
  301. func_28(__@184[id]);
  302. CloseHandle(file);
  303. }
  304. KickClient(id, "%t", "UCP_BANREASONMSG", l_@12);
  305. CloseHandle(file);
  306. return 0;
  307. }
  308. }
  309. CloseHandle(file);
  310. }
  311. __@180[id] = 0;
  312. func_40(id);
  313. }
  314. return 0;
  315. }
  316. __@183[id] = 1;
  317. return 0;
  318. }
  319.  
  320. public func_40(id)
  321. {
  322. ClientCommand(id, "ucp_%s 1%d%d%s %s %s", __@184[id], GetConVarInt(c_ucp_checkfile_mode), c_ucp_mathack, __@14, __@177, __@240);
  323. return 0;
  324. }
  325.  
  326.  
  327. public Action:func_27(Handle:timer, id)
  328. {
  329. if (!GetConVarInt(c_ucp_mode)) {
  330. return Action:0;
  331. }
  332. if (!IsClientConnected(id)) {
  333. return Action:0;
  334. }
  335. if (IsFakeClient(id)) {
  336. return Action:0;
  337. }
  338. new sstime = GetConVarInt(c_ucp_autoscreen);
  339. if (sstime >= 60) {
  340. decl String:time[32];
  341. FormatTime(time, 32, "%Y.%m.%d_%H.%M.%S", GetTime({0,0}));
  342. ClientCommand(id, "ucp_%s 3%s%s", __@184[id], time, __@174);
  343. CreateTimer(float(sstime), func_27, id, 0);
  344. }
  345. return Action:0;
  346. }
  347.  
  348. public Action:func_83(Handle:timer, any:id)
  349. {
  350. if (!GetConVarInt(c_ucp_mode)) {
  351. return Action:0;
  352. }
  353. if (!IsClientConnected(id)) {
  354. return Action:0;
  355. }
  356. ClientCommand(id, "ucp_%s t", __@184[id]);
  357. CreateTimer(float(GetRandomInt(40, 60)), func_83, id, 0);
  358. return Action:0;
  359. }
  360.  
  361. public Action:func_19(Handle:timer, any:id)
  362. {
  363. if (!GetConVarInt(c_ucp_mode)) {
  364. return Action:0;
  365. }
  366. if (!IsClientConnected(id)) {
  367. return Action:0;
  368. }
  369. if (__@179[id] / 2 * __@179[id] == __@178[id]) {
  370. PrintCenterText(id, __@255);
  371. return Action:0;
  372. }
  373. CreateTimer(10, func_63, id, 0);
  374. return Action:0;
  375. }
  376.  
  377. public Action:func_63(Handle:timer, any:id)
  378. {
  379. if (!GetConVarInt(c_ucp_mode)) {
  380. return Action:0;
  381. }
  382. if (!IsClientConnected(id)) {
  383. return Action:0;
  384. }
  385. if (__@179[id] / 2 * __@179[id] == __@178[id]) {
  386. PrintCenterText(id, __@255);
  387. return Action:0;
  388. }
  389. func_16(id);
  390. return Action:0;
  391. }
  392.  
  393. public Action:func_2(id, args)
  394. {
  395. if (args < 1) {
  396. return Action:3;
  397. }
  398. if (!GetConVarInt(c_ucp_mode)) {
  399. return Action:0;
  400. }
  401. decl String:arg1[32];
  402. GetCmdArg(1, arg1, 32);
  403. __@178[id] = StringToInt(arg1, 10);
  404. if (args < 2) {
  405. GetCmdArg(2, arg1, 32);
  406. new var1;
  407. if (strlen(arg1) == strlen("7.1")) {
  408. func_16(id);
  409. }
  410. }
  411. return Action:3;
  412. }
  413.  
  414. public DisableVersionChange(Handle:convar, String:oldValue[], String:newValue[])
  415. {
  416. if (!StrEqual("7.1", newValue, true)) {
  417. SetConVarString(convar, "7.1", false, false);
  418. }
  419. return 0;
  420. }
  421.  
  422. public ModeChange(Handle:convar, String:oldValue[], String:newValue[])
  423. {
  424. if (!StrEqual(oldValue, newValue, true)) {
  425. if (StrEqual(newValue, "0", true)) {
  426. PrintToServer(" %t", "UCP_DISABLED");
  427. func_35("UCP_DISABLED");
  428. }
  429. PrintToServer(" %t", "UCP_ENABLED");
  430. func_35("UCP_ENABLED");
  431. }
  432. return 0;
  433. }
  434.  
  435. public func_35(String:reason[])
  436. {
  437. new maxClients = GetMaxClients();
  438. new i = 1;
  439. while (i <= maxClients) {
  440. if (IsClientConnected(i)) {
  441. PrintToChat(i, " %t", reason);
  442. PrintCenterText(i, " %t", reason);
  443. }
  444. i++;
  445. }
  446. return 0;
  447. }
  448. public Action:func_15(id, args)
  449. {
  450. if (args < 1) {
  451. return Action:0;
  452. }
  453. if (!GetConVarInt(c_ucp_mode)) {
  454. return Action:0;
  455. }
  456. if (__@183[id]) {
  457. return Action:0;
  458. }
  459. if (__@180[id]) {
  460. return Action:0;
  461. }
  462. decl String:arg1[32];
  463. GetCmdArg(1, arg1, 32);
  464. if (strlen(arg1) != 8) {
  465. func_16(id);
  466. return Action:0;
  467. }
  468. if (__@181[id]) {
  469. decl String:Md5Hash[36];
  470. decl String:Md5HashBuf[36];
  471. Format(Md5Hash, 34, "%s%s", __@184[id], __@14);
  472. Md5Hash[16] = 0;
  473. md5(Md5Hash, Md5HashBuf, 34);
  474. Md5HashBuf[8] = 0;
  475. if (StrEqual(Md5HashBuf, arg1, false)) {
  476. GetCmdArg(2, __@244[id], 5);
  477. if (strlen(__@244[id]) == 4) {
  478. __@181[id] = 0;
  479. __@265[id] = GetRandomInt(100000, 999999999);
  480. ClientCommand(id, "ucp_%s 2%d", __@184[id], __@265[id]);
  481. } else {
  482. strcopy(__@244[id], 5, "xxxx");
  483. }
  484. } else {
  485. strcopy(__@244[id], 5, "xxxx");
  486. }
  487. decl String:arg4[8];
  488. GetCmdArg(3, __@279[id], 16);
  489. GetCmdArg(4, arg4, 8);
  490. GetClientName(id, Md5Hash, 34);
  491. GetClientIP(id, Md5HashBuf, 34, true);
  492. GetClientAuthString(id, arg1, 32);
  493. if (GetConVarInt(c_ucp_log_mode)) {
  494. LogMessage("Login: %s | %s | %s-%s | %s | %s | %s | %s", Md5Hash, Md5HashBuf, __@185[id] + 10, __@184[id], arg1, __@244[id], arg4, __@279[id]);
  495. }
  496. if (func_36(__@184[id], id) == -1) {
  497. KickClient(id, "%t", "UCP_IDMSG");
  498. }
  499. return Action:0;
  500. }
  501. if (StrEqual(arg1, __@184[id], true)) {
  502. decl String:arg2[32];
  503. GetCmdArg(2, arg2, 32);
  504. new ping2 = StringToInt(arg2, 10);
  505. if (__@265[id] / 3 * __@265[id] == ping2) {
  506. __@182[id] = 0;
  507. }
  508. }
  509. return Action:0;
  510. }
  511.  
  512. public func_36(String:ucpid[], userid)
  513. {
  514. new maxClients = GetMaxClients();
  515. new i = 1;
  516. while (i <= maxClients) {
  517. if (IsClientConnected(i)) {
  518. new var1;
  519. if (StrEqual(ucpid, __@184[i], true)) {
  520. return -1;
  521. }
  522. }
  523. i++;
  524. }
  525. return 0;
  526. }
  527.  
  528. public func_16(id)
  529. {
  530. if (!IsClientConnected(id)) {
  531. return 0;
  532. }
  533. if (IsFakeClient(id)) {
  534. return 0;
  535. }
  536. if (strlen(__@184[id]) == 8) {
  537. decl String:l_@9[32];
  538. decl String:l_@10[16];
  539. GetClientName(id, l_@9, 32);
  540. GetClientIP(id, l_@10, 16, true);
  541. if (GetConVarInt(c_ucp_log_mode)) {
  542. LogMessage("Kicked: %s | %s | %s", l_@9, l_@10, __@184[id]);
  543. }
  544. }
  545. KickClient(id, "%t", "UCP_KICKMSG", DownloadLinkBuf);
  546. return 0;
  547. }
  548.  
  549. public Action:func_25(id, args)
  550. {
  551. if (args < 1) {
  552. ReplyToCommand(id, "Usage: ucp_unban <UCP ID>");
  553. return Action:3;
  554. }
  555. decl String:arg1[32];
  556. GetCmdArg(1, arg1, 32);
  557. if (strlen(arg1) == 8) {
  558. decl String:buffer[512];
  559. decl String:IDik[12];
  560. new HANDLE:file = OpenFile(__@175, "r");
  561. while (!IsEndOfFile(file) && ReadFileLine(file, buffer, 512)) {
  562. strcopy(IDik, 9, buffer);
  563. IDik[8] = 0;
  564. if (StrEqual(IDik, arg1, false)) {
  565. CloseHandle(file);
  566. func_28(arg1);
  567. decl String:name[32];
  568. GetClientName(id, name, 32);
  569. if (GetConVarInt(c_ucp_log_mode)) {
  570. LogMessage("%s unbanned %s", name, arg1);
  571. }
  572. return Action:3;
  573. }
  574. }
  575. CloseHandle(file);
  576. ReplyToCommand(id, "Can't found UCPID %s", arg1);
  577. }
  578. return Action:3;
  579. }
  580.  
  581. public Action:func_72(Handle:timer, any:userid)
  582. {
  583. ShowMOTDPanel(userid, "Player Screenshot", ScreenMotdBuf, 2);
  584. return Action:0;
  585. }
  586.  
  587. public Action:func_26(id, args)
  588. {
  589. decl String:buffer[512];
  590. ReplyToCommand(id, "------------ BanList ------------");
  591. new HANDLE:file = OpenFile(__@175, "r");
  592. while (!IsEndOfFile(file) && ReadFileLine(file, buffer, 512)) {
  593. ReplyToCommand(id, buffer);
  594. }
  595. CloseHandle(file);
  596. ReplyToCommand(id, "-----------------------------------");
  597. return Action:3;
  598. }
  599.  
  600. public OnConfigsExecuted()
  601. {
  602. GetConVarString(c_ucp_banlist_file, __@175, 128);
  603. if (StrEqual(__@175, "0", true)) {
  604. strcopy(__@175, 128, "cfg/ucp/banlist.txt");
  605. }
  606. SetConVarString(c_ucp_version, "7.1", false, false);
  607. if (!FileExists(__@175, false)) {
  608. new HANDLE:file = OpenFile(__@175, "a");
  609. CloseHandle(file);
  610. }
  611. GetConVarString(c_ucp_build, __@264, 256);
  612. GetConVarString(c_ucp_cpurl, __@240, 128);
  613. GetConVarString(c_ucp_link, DownloadLinkBuf, 1024);
  614. decl String:mode[16];
  615. GetConVarString(c_ucp_uhost, hostbuf, 64);
  616. GetConVarString(c_ucp_uport, portbuf, 8);
  617. GetConVarString(c_ucp_upath, pathbuf, 64);
  618. GetConVarString(c_ucp_umode, mode, 16);
  619. if (StrEqual(mode, "FTP", false)) {
  620. decl String:user[32];
  621. decl String:pass[32];
  622. GetConVarString(c_ucp_uuser, user, 32);
  623. GetConVarString(c_ucp_upass, pass, 32);
  624. Format(__@174, 256, "%s*%s*%s*%s*%s*", hostbuf, portbuf, user, pass, pathbuf);
  625. } else {
  626. upmode = 1;
  627. Format(__@174, 256, "%s*%s*%s*", hostbuf, portbuf, pathbuf);
  628. new len = strlen(pathbuf);
  629. while (len) {
  630. new var1;
  631. if (StrContains(len + 57620, "/", true) == -1) {
  632. len++;
  633. len++;
  634. strcopy(pathbuf, len, pathbuf);
  635. }
  636. len--;
  637. }
  638. }
  639. if (GetConVarInt(c_ucp_mode)) {
  640. PrintToServer(" %t", "UCP_ENABLED");
  641. } else {
  642. PrintToServer(" %t", "UCP_DISABLED");
  643. }
  644. if (!GetConVarInt(c_ucp_mode)) {
  645. return 0;
  646. }
  647. if (!GetConVarInt(c_ucp_monitor)) {
  648. return 0;
  649. }
  650. CreateTimer(3480, func_74, 0, 1);
  651. CreateTimer(1, func_71, 0, 0);
  652. return 0;
  653. }
  654.  
  655. public OnClientPutInServer(id)
  656. {
  657. if (!IsClientConnected(id)) {
  658. return 0;
  659. }
  660. if (IsFakeClient(id)) {
  661. return 0;
  662. }
  663. if (!GetConVarInt(c_ucp_mode)) {
  664. return 0;
  665. }
  666. if (__@183[id]) {
  667. return 0;
  668. }
  669. if (c_game_mode == Handle:4) {
  670. CreateTimer(10, func_73, id, 0);
  671. }
  672. if (__@180[id] == 1) {
  673. decl String:UserName[36];
  674. decl String:UserIP[16];
  675. decl String:UserAuth[36];
  676. GetClientName(id, UserName, 34);
  677. GetClientIP(id, UserIP, 16, true);
  678. GetClientAuthString(id, UserAuth, 34);
  679. if (GetConVarInt(c_ucp_log_mode)) {
  680. LogMessage("Login no-ucp: %s | %s | %s", UserName, UserIP, UserAuth);
  681. }
  682. } else {
  683. new var1;
  684. if (__@181[id]) {
  685. __@186[id] = 1;
  686. return 0;
  687. }
  688. 7864[id] = __@250_;
  689. CreateTimer(0.1, func_33, id + 34875375, 1);
  690. }
  691. return 0;
  692. }
  693.  
  694. public Action:func_73(Handle:timer, any:id)
  695. {
  696. if (!IsClientConnected(id)) {
  697. return Action:0;
  698. }
  699. if (IsFakeClient(id)) {
  700. return Action:0;
  701. }
  702. func_21(id, 0);
  703. return Action:0;
  704. }
  705.  
  706. public Action:func_34(Handle:timer, any:id)
  707. {
  708. if (!IsClientConnected(id)) {
  709. return Action:0;
  710. }
  711. if (IsFakeClient(id)) {
  712. return Action:0;
  713. }
  714. decl String:UserName[128];
  715. GetClientName(id, UserName, 128);
  716. new i = 64;
  717. i--;
  718. while (i != -1) {
  719. if (StrEqual(UserName, UpdateNick[i], true)) {
  720. strcopy(UpdateNick[i], strlen(UpdateNick[i]), "unk");
  721. ClientCommand(id, "ucp_%s a1", __@184[id]);
  722. CreateTimer(4.5, func_34_2, id, 0);
  723. return Action:0;
  724. }
  725. i--;
  726. }
  727. strcopy(UpdateNick[id], 128, UserName);
  728. ClientCommand(id, "retry", __@184[id]);
  729. return Action:0;
  730. }
  731.  
  732. public Action:func_34_2(Handle:timer, any:id)
  733. {
  734. if (!IsClientConnected(id)) {
  735. return Action:0;
  736. }
  737. if (IsFakeClient(id)) {
  738. return Action:0;
  739. }
  740. KickClient(id, "%t", "UCP_UPDATEMSG");
  741. return Action:0;
  742. }
  743.  
  744.  
  745. public OnClientDisconnect(id)
  746. {
  747. if (!GetConVarInt(c_ucp_mode)) {
  748. return 0;
  749. }
  750. __@184[id] = 0;
  751. __@183[id] = 0;
  752. __@185[id] = 0;
  753. __@186[id] = 0;
  754. return 0;
  755. }
  756.  
  757. public func_28(String:reason[])
  758. {
  759. if (FileExists(szTmpFile, false)) {
  760. DeleteFile(szTmpFile);
  761. }
  762. new HANDLE:file1 = OpenFile(__@175, "r");
  763. new HANDLE:file2 = OpenFile(szTmpFile, "a");
  764. decl String:buffer[512];
  765. decl String:IDik[12];
  766. while (!IsEndOfFile(file1) && ReadFileLine(file1, buffer, 512)) {
  767. strcopy(IDik, 9, buffer);
  768. IDik[8] = 0;
  769. if (!StrEqual(IDik, reason, false)) {
  770. strcopy(buffer, strlen(buffer), buffer);
  771. WriteFileLine(file2, buffer);
  772. }
  773. }
  774. CloseHandle(file1);
  775. CloseHandle(file2);
  776. DeleteFile(__@175);
  777. if (FileExists(__@175, false)) {
  778. ReplyToCommand(0, "Can't delete %s", __@175);
  779. } else {
  780. RenameFile(__@175, szTmpFile);
  781. }
  782. return 0;
  783. }
  784.  
  785. public Action:func_70(Handle:timer, any:id)
  786. {
  787. if (!GetConVarInt(c_ucp_mode)) {
  788. return Action:0;
  789. }
  790. if (!IsClientConnected(id)) {
  791. return Action:0;
  792. }
  793. if (IsFakeClient(id)) {
  794. return Action:0;
  795. }
  796. new i = __@297_;
  797. i--;
  798. while (i != -1) {
  799. if (__@297[i][1] == 80) {
  800. if (__@297[i][4] == 77) {
  801. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "51", __@297[i] + 6);
  802. }
  803. if (__@297[i][4] == 75) {
  804. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "52", __@297[i] + 6);
  805. }
  806. if (__@297[i][4] == 66) {
  807. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "53", __@297[i] + 6);
  808. }
  809. }
  810. if (__@297[i][1] == 87) {
  811. if (__@297[i][4] == 77) {
  812. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "61", __@297[i] + 6);
  813. }
  814. if (__@297[i][4] == 75) {
  815. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "62", __@297[i] + 6);
  816. }
  817. if (__@297[i][4] == 66) {
  818. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "63", __@297[i] + 6);
  819. }
  820. }
  821. if (__@297[i][1] == 68) {
  822. if (__@297[i][4] == 77) {
  823. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "71", __@297[i] + 6);
  824. }
  825. if (__@297[i][4] == 75) {
  826. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "72", __@297[i] + 6);
  827. }
  828. if (__@297[i][4] == 66) {
  829. ClientCommand(id, "ucp_%s \"%s%s\"", __@184[id], "73", __@297[i] + 6);
  830. }
  831. }
  832. i--;
  833. }
  834. if (GetConVarInt(c_ucp_detect_time) >= 60) {
  835. decl String:DetectTimeOut[16];
  836. GetConVarString(c_ucp_detect_time, DetectTimeOut, 16);
  837. CreateTimer(StringToFloat(DetectTimeOut), func_70, id, 0);
  838. }
  839. return Action:0;
  840. }
  841.  
  842. public Action:func_71(Handle:timer, any:id)
  843. {
  844. new Handle:socket = SocketCreate(SocketType:1, OnSocketErrorDl);
  845. SocketConnect(socket, OnSocketConnectedDl, OnSocketReceiveDl, OnSocketDisconnectedDl, "www.ucp-anticheat.ru", 80);
  846. return Action:0;
  847. }
  848.  
  849. public OnSocketConnectedDl(Handle:socket, any:pack)
  850. {
  851. decl String:buffer[512];
  852. decl spass;
  853. decl String:SrvMap[64];
  854. decl String:SrvPass[64];
  855. new Handle:passik = FindConVar("sv_password");
  856. GetConVarString(passik, SrvPass, 64);
  857. if (SrvPass[0]) {
  858. spass = 1;
  859. } else {
  860. spass = 0;
  861. }
  862. GetCurrentMap(SrvMap, 64);
  863. Format(buffer, 512, "GET /monitor.php?game=%d&pass=%d&port=%d&map=%s&ver=%s&host=%s HTTP/1.1\r\nHost: www.ucp-anticheat.ru\r\n\r\n", c_game_mode, spass, ServPort, SrvMap, "7.1", ServHost);
  864. SocketSend(socket, buffer, -1);
  865. return 0;
  866. }
  867.  
  868. public OnSocketErrorDl(Handle:socket, errorType, errorNum, any:ary)
  869. {
  870. CloseHandle(socket);
  871. return 0;
  872. }
  873.  
  874. public OnSocketReceiveDl(Handle:socket, String:receiveData[], dataSize, any:pack)
  875. {
  876. return 0;
  877. }
  878.  
  879. public OnSocketDisconnectedDl(Handle:socket, any:pack)
  880. {
  881. CloseHandle(socket);
  882. return 0;
  883. }
  884.  
  885. public Action:func_74(Handle:timer, any:id)
  886. {
  887. func_71(Handle:0, 0);
  888. return Action:0;
  889. }
  890.  
  891.  
  892. public func_31(Handle:plugin, numParams)
  893. {
  894. new id = GetNativeCell(1);
  895. if (strlen(__@279[id])) {
  896. SetNativeString(2, __@279[id], 16, true, 0);
  897. return 0;
  898. }
  899. return -1;
  900. }
  901.  
  902. public func_30(Handle:plugin, numParams)
  903. {
  904. new id = GetNativeCell(1);
  905. if (strlen(__@244[id])) {
  906. SetNativeString(2, __@244[id], 5, true, 0);
  907. return 0;
  908. }
  909. return -1;
  910. }
  911.  
  912. public func_24(Handle:plugin, numParams)
  913. {
  914. new id = GetNativeCell(1);
  915. if (strlen(__@184[id])) {
  916. SetNativeString(2, __@184[id], 9, true, 0);
  917. return 0;
  918. }
  919. return -1;
  920. }
  921.  
  922. public Action:func_10(id, args)
  923. {
  924. if (GetConVarInt(c_ucp_who_mode)) {
  925. return Action:3;
  926. }
  927. decl String:name[32];
  928. decl String:autoid[32];
  929. decl String:ip[16];
  930. new maxClients = GetMaxClients();
  931. new i = 1;
  932. while (i <= maxClients) {
  933. if (IsClientConnected(i)) {
  934. if (IsFakeClient(i)) {
  935. } else {
  936. if (!(GetClientAuthString2(i, autoid, 32))) {
  937. strcopy(autoid, 32, "unsid");
  938. }
  939. GetClientName(i, name, 32);
  940. GetClientIP(i, ip, 16, true);
  941. ReplyToCommand(id, "%2d %-16.15s %-20s %-20s %s %s", GetClientUserId(i), name, __@184[i], autoid, ip, __@244[i]);
  942. }
  943. }
  944. i++;
  945. }
  946. return Action:3;
  947. }
  948.  
  949. public Action:func_75(id, args)
  950. {
  951. if (!GetConVarInt(c_ucp_who_mode)) {
  952. return Action:3;
  953. }
  954. decl String:name[32];
  955. decl String:autoid[32];
  956. decl String:ip[16];
  957. new maxClients = GetMaxClients();
  958. new i = 1;
  959. while (i <= maxClients) {
  960. if (IsClientConnected(i)) {
  961. if (IsFakeClient(i)) {
  962. } else {
  963. if (!(GetClientAuthString2(i, autoid, 32))) {
  964. strcopy(autoid, 32, "unsid");
  965. }
  966. GetClientName(i, name, 32);
  967. GetClientIP(i, ip, 16, true);
  968. ReplyToCommand(id, "%2d %-16.15s %-20s %-20s %s %s", GetClientUserId(i), name, __@184[i], autoid, ip, __@244[i]);
  969. }
  970. }
  971. i++;
  972. }
  973. return Action:3;
  974. }
  975.  
  976. public func_38(String:sString[])
  977. {
  978. new cFillChar = 61;
  979. new resPos = 0;
  980. new len = 64;
  981. new nLength = strlen(sString);
  982. decl String:sResult[64];
  983. new nPos = 0;
  984. while (nPos < nLength) {
  985. new cCode = sString[nPos] >>> 2 & 63;
  986. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cCode + 644) + resPos;
  987. cCode = sString[nPos] << 4 & 63;
  988. nPos++;
  989. if (nPos < nLength) {
  990. cCode = sString[nPos] >>> 4 & 15 | cCode;
  991. }
  992. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cCode + 644) + resPos;
  993. if (nPos < nLength) {
  994. cCode = sString[nPos] << 2 & 63;
  995. nPos++;
  996. if (nPos < nLength) {
  997. cCode = sString[nPos] >>> 6 & 3 | cCode;
  998. }
  999. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cCode + 644) + resPos;
  1000. } else {
  1001. nPos++;
  1002. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cFillChar) + resPos;
  1003. }
  1004. if (nPos < nLength) {
  1005. cCode = sString[nPos] & 63;
  1006. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cCode + 644) + resPos;
  1007. nPos++;
  1008. } else {
  1009. resPos = FormatEx(sResult[resPos], len - resPos, "%c", cFillChar) + resPos;
  1010. nPos++;
  1011. }
  1012. nPos++;
  1013. }
  1014. strcopy(sString, 64, sResult);
  1015. return 0;
  1016. }
  1017.  
  1018. public OnPluginStart()
  1019. {
  1020. md5_file(szWadFile, __@14);
  1021. LoadTranslations("ucp.phrases");
  1022. c_ucp_version = CreateConVar("ucp_version", "7.1", "UCP Version", 270656, false, 0, false, 0);
  1023. HookConVarChange(c_ucp_version, ConVarChanged:3);
  1024. c_ucp_mode = CreateConVar("ucp_mode", "1", "Enable-Disable Plugin UCP", 262400, false, 0, false, 0);
  1025. HookConVarChange(c_ucp_mode, ConVarChanged:7);
  1026. CreateConVar("ucp_redirect_mode", "0", "Redirection NO_UCP Gamers", 32, false, 0, false, 0);
  1027. CreateConVar("ucp_redirect_wan", "0", "Redirection to remote address", 32, false, 0, false, 0);
  1028. CreateConVar("ucp_redirect_lan", "0", "Redirection to local address", 32, false, 0, false, 0);
  1029. c_ucp_autoscreen = CreateConVar("ucp_autoscreen", "0", "Auto ScreenShot", 32, false, 0, false, 0);
  1030. c_ucp_umode = CreateConVar("ucp_upload_mode", "FTP", "Upload Mode", 32, false, 0, false, 0);
  1031. c_ucp_uhost = CreateConVar("ucp_upload_host", "127.0.0.1", "Upload Server Host", 32, false, 0, false, 0);
  1032. c_ucp_uport = CreateConVar("ucp_upload_port", "21", "Upload Server Port", 32, false, 0, false, 0);
  1033. c_ucp_uuser = CreateConVar("ucp_upload_user", "anonymous", "Upload Server User", 32, false, 0, false, 0);
  1034. c_ucp_upass = CreateConVar("ucp_upload_pass", "password", "Upload Server Password", 32, false, 0, false, 0);
  1035. c_ucp_upath = CreateConVar("ucp_upload_path", "password", "Upload Server Path", 32, false, 0, false, 0);
  1036. c_ucp_cpurl = CreateConVar("ucp_cpurl", "0", "LastContentProviderURL", 32, false, 0, false, 0);
  1037. c_ucp_link = CreateConVar("ucp_link", "http://ucp-anticheat.org/download/ucpsetup.exe", "UCP Download URL", 32, false, 0, false, 0);
  1038. c_ucp_build = CreateConVar("ucp_build", "0", "Check Build Versions", 32, false, 0, false, 0);
  1039. c_ucp_banlist_file = CreateConVar("ucp_banlist_file", "0", "Banlist Path", 32, false, 0, false, 0);
  1040. c_ucp_checkfile_mode = CreateConVar("ucp_checkfile_mode", "1", "Check File Mode", 32, false, 0, false, 0);
  1041.  
  1042. c_ucp_detect_mode = CreateConVar("ucp_detect_mode", "1", "Detect Mode", 32, false, 0, false, 0);
  1043. c_ucp_detect_time = CreateConVar("ucp_detect_time", "0", "Detect Mode Time", 32, false, 0, false, 0);
  1044. c_ucp_log_mode = CreateConVar("ucp_log_mode", "1", "Log Mode", 32, false, 0, false, 0);
  1045. c_ucp_monitor = CreateConVar("ucp_monitor", "1", "UCP Monitor Mode", 32, false, 0, false, 0);
  1046. c_ucp_who_mode = CreateConVar("ucp_who_mode", "0", "UCP Who Mode", 32, false, 0, false, 0);
  1047. ServPort = GetConVarInt(FindConVar("hostport"));
  1048. GetConVarString(FindConVar("hostname"), ServHost, 64);
  1049. func_38(ServHost);
  1050. FormatEx(__@177, 32, "%c%c%c%c%c%c%c%c", GetRandomInt(65, 90), GetRandomInt(65, 90), GetRandomInt(48, 57), GetRandomInt(65, 90), GetRandomInt(48, 57), GetRandomInt(65, 90), GetRandomInt(48, 57), GetRandomInt(48, 57));
  1051. decl String:RandomCvar[32];
  1052. Format(RandomCvar, 32, "ucp_%s", __@177);
  1053. RegConsoleCmd(RandomCvar, func_15, "", 0);
  1054. RegConsoleCmd("ucp_run", func_2, "", 0);
  1055. RegConsoleCmd("chooseteam", func_21, "", 0);
  1056. RegConsoleCmd("jointeam", func_21, "", 0);
  1057. RegConsoleCmd("menuselect", func_21, "", 0);
  1058. RegConsoleCmd("joinclass", func_21, "", 0);
  1059. func_37(__@177, 8);
  1060. func_38(__@177);
  1061. RegAdminCmd("ucp_banid", func_23, 8, "", "", 0);
  1062. RegAdminCmd("ucp_ban", func_22, 8, "", "", 0);
  1063. RegAdminCmd("ucp_unban", func_25, 16, "", "", 0);
  1064. RegAdminCmd("ucp_banlist", func_26, 8, "", "", 0);
  1065. RegAdminCmd("ucp_screen", func_29, 8, "", "", 0);
  1066. RegAdminCmd("ucp_who", func_10, 8, "", "", 0);
  1067. RegConsoleCmd("ucp_who", func_75, "", 0);
  1068. ServerCommand("exec ucp/config.cfg");
  1069. Format(__@255, 128, "%t", "UCP_BANNER", "\r\n", "7.1");
  1070. decl String:GameType[52];
  1071. GetGameFolderName(GameType, 50);
  1072. if (StrEqual(GameType, "cstrike", false)) {
  1073. c_game_mode = 1;
  1074. } else {
  1075. if (StrEqual(GameType, "hl2mp", false)) {
  1076. c_game_mode = 4;
  1077. }
  1078. }
  1079. return 0;
  1080. }
  1081.  
  1082. public func_69(Handle:plugin, numParams)
  1083. {
  1084. new id = GetNativeCell(1);
  1085. if (strlen(__@184[id])) {
  1086. decl String:md5buffer2[36];
  1087. decl String:md5buffer[36];
  1088. md5(__@184[id], md5buffer, 34);
  1089. decl String:name[32];
  1090. new len = strlen(md5buffer);
  1091. new j = 0;
  1092. new i = 0;
  1093. while (i < len) {
  1094. new var1;
  1095. if (md5buffer[i] >= '0') {
  1096. name[j] = md5buffer[i];
  1097. j++;
  1098. i++;
  1099. }
  1100. i++;
  1101. }
  1102. name[8] = 0;
  1103. FormatEx(md5buffer2, 34, "STEAM_0:0:%s", name);
  1104. SetNativeString(2, md5buffer2, 19, true, 0);
  1105. return 1;
  1106. }
  1107. SetNativeString(2, "STEAM_ID_LAN", 13, true, 0);
  1108. return 0;
  1109. }
  1110.  
  1111. public Action:func_33(Handle:timer, any:id)
  1112. {
  1113. if (!GetConVarInt(c_ucp_checkfile_mode)) {
  1114. return Action:0;
  1115. }
  1116. new tid = id + -34875375;
  1117. if (!IsClientConnected(tid)) {
  1118. return Action:0;
  1119. }
  1120. if (IsFakeClient(tid)) {
  1121. return Action:0;
  1122. }
  1123. if (0 < __@307[tid]) {
  1124. __@307[tid]--;
  1125. ClientCommand(tid, "ucp_%s 9%s", __@184[tid], __@250[__@307[tid]]);
  1126. return Action:0;
  1127. }
  1128. KillTimer(timer, false);
  1129. return Action:0;
  1130. }
  1131.  
  1132. public Action:func_23(id, args)
  1133. {
  1134. if (args < 1) {
  1135. ReplyToCommand(id, "Usage: ucp_banid <UCP ID> [time in mins (optional)|0] [reason (optional)]");
  1136. return Action:3;
  1137. }
  1138. decl String:arg1[32];
  1139. decl String:arg2[128];
  1140. decl String:reason[128];
  1141. new BanTime = 0;
  1142. GetCmdArg(1, arg1, 32);
  1143. if (GetCmdArgs() > 1) {
  1144. GetCmdArg(2, arg2, 128);
  1145. if (IsCharNumeric(arg2)) {
  1146. BanTime = StringToInt(arg2, 10);
  1147. if (0 < BanTime) {
  1148. BanTime *= 60;
  1149. BanTime = GetTime({0,0}) + BanTime;
  1150. }
  1151. if (GetCmdArgs() > 2) {
  1152. GetCmdArg(3, reason, 128);
  1153. }
  1154. reason = 0;
  1155. }
  1156. strcopy(reason, strlen(arg2), arg2);
  1157. }
  1158. decl String:time[32];
  1159. decl String:name[32];
  1160. decl String:buffer[512];
  1161. GetClientName(id, name, 32);
  1162. FormatTime(time, 32, "%m/%d/%Y %H:%M:%S", GetTime({0,0}));
  1163. ReplyToCommand(id, " - [%s] -> banned!", arg1);
  1164. Format(buffer, 512, "%s %d %s %s %s %s %s", arg1, BanTime, "unknown", "unknow
  1165. n", time, name, reason);
  1166. new HANDLE:file = OpenFile(__@175, "a");
  1167. WriteFileLine(file, buffer);
  1168. CloseHandle(file);
  1169. return Action:3;
  1170. }
  1171.  
  1172. public Action:func_22(id, args)
  1173. {
  1174. if (args < 1) {
  1175. ReplyToCommand(id, "Usage: ucp_ban <nick/#userid> [time in mins (optional)|0] [reason (optional)]");
  1176. return Action:3;
  1177. }
  1178. decl String:arg1[32];
  1179. decl String:arg2[128];
  1180. decl String:reason[128];
  1181. new BanTime = 0;
  1182. GetCmdArg(1, arg1, 32);
  1183. new client = FindTarget(id, arg1, false, false);
  1184. if (!client) {
  1185. return Action:3;
  1186. }
  1187. if (!IsClientConnected(client)) {
  1188. return Action:3;
  1189. }
  1190. if (IsFakeClient(client)) {
  1191. return Action:3;
  1192. }
  1193. reason = 0;
  1194. if (GetCmdArgs() > 1) {
  1195. GetCmdArg(2, arg2, 128);
  1196. if (IsCharNumeric(arg2)) {
  1197. BanTime = StringToInt(arg2, 10);
  1198. if (0 < BanTime) {
  1199. BanTime *= 60;
  1200. BanTime = GetTime({0,0}) + BanTime;
  1201. }
  1202. if (GetCmdArgs() > 2) {
  1203. GetCmdArg(3, reason, 128);
  1204. }
  1205. reason = 0;
  1206. }
  1207. strcopy(reason, strlen(arg2), arg2);
  1208. }
  1209. decl String:time[32];
  1210. decl String:name[32];
  1211. decl String:uname[32];
  1212. decl String:ip[16];
  1213. decl String:buffer[512];
  1214. GetClientName(id, name, 32);
  1215. GetClientName(client, uname, 32);
  1216. GetClientIP(client, ip, 16, true);
  1217. FormatTime(time, 32, "%m/%d/%Y %H:%M:%S", GetTime({0,0}));
  1218. ReplyToCommand(id, " - [%s] -> banned!", uname);
  1219. Format(buffer, 512, "%s %d %s %s %s %s %s", __@184[client], BanTime, ip, uname, time, name, reason);
  1220. new HANDLE:file = OpenFile(__@175, "a");
  1221. WriteFileLine(file, buffer);
  1222. CloseHandle(file);
  1223. if (0 < BanTime) {
  1224. new BanTimeInfo = GetTime({0,0});
  1225. BanTime -= BanTimeInfo;
  1226. BanTime /= 60;
  1227. KickClient(client, "%t", "UCP_BANTIMEREASONMSG", BanTime, reason);
  1228. return Action:3;
  1229. }
  1230. KickClient(client, "%t", "UCP_BANREASONMSG", reason);
  1231. return Action:3;
  1232. }
  1233.  
  1234. public Action:func_29(id, args)
  1235. {
  1236. if (args < 1) {
  1237. ReplyToCommand(id, "Usage: ucp_screen <nick/#userid>");
  1238. return Action:3;
  1239. }
  1240. decl String:arg1[32];
  1241. GetCmdArg(1, arg1, 32);
  1242. new client = FindTarget(id, arg1, false, false);
  1243. if (!client) {
  1244. return Action:3;
  1245. }
  1246. if (!IsClientConnected(client)) {
  1247. return Action:3;
  1248. }
  1249. if (IsFakeClient(client)) {
  1250. return Action:3;
  1251. }
  1252. decl String:time[32];
  1253. FormatTime(time, 32, "%Y.%m.%d_%H.%M.%S", GetTime({0,0}));
  1254. ClientCommand(client, "ucp_%s 3%s%s", __@184[client], time, __@174);
  1255. decl String:name[32];
  1256. GetClientName(client, name, 32);
  1257. ReplyToCommand(id, " - [%s] -> screened!", name);
  1258. new var1;
  1259. if (GetCmdArgs() > 1) {
  1260. decl String:name2[32];
  1261. new len = strlen(name);
  1262. new i2 = 0;
  1263. new i = 0;
  1264. while (i < len) {
  1265. new var2;
  1266. if (name[i] >= 'A') {
  1267. name2[i2] = name[i];
  1268. i2++;
  1269. i++;
  1270. }
  1271. i++;
  1272. }
  1273. name2[i2] = 0;
  1274. if (!name2) {
  1275. strcopy(name2, 32, "unnamed");
  1276. }
  1277. Format(ScreenMotdBuf, 1024, "http://%s:%s%s%s_%s_%s.jpg", hostbuf, portbuf, pathbuf, name2, __@184[client], time);
  1278. CreateTimer(6, func_72, id, 0);
  1279. PrintCenterText(id, "5 seconds..");
  1280. }
  1281. return Action:3;
  1282. }
  1283.  
  1284. public func_37(String:name[], len)
  1285. {
  1286. new i = 0;
  1287. while (i < len) {
  1288. if (anz1[0][0] != name[i]) {
  1289. if (anz1[1][0] != name[i]) {
  1290. name[i]--;
  1291. name[i]--;
  1292. name[i]--;
  1293. name[i]--;
  1294. name[i]--;
  1295. name[i]--;
  1296. name[i]--;
  1297. name[i]--;
  1298. name[i]--;
  1299. name[i]--;
  1300. name[i]--;
  1301. name[i]--;
  1302. name[i]--;
  1303. i++;
  1304. } else {
  1305. name[i]++;
  1306. name[i]++;
  1307. name[i]++;
  1308. name[i]++;
  1309. name[i]++;
  1310. name[i]++;
  1311. name[i]++;
  1312. name[i]++;
  1313. name[i]++;
  1314. name[i]++;
  1315. name[i]++;
  1316. name[i]++;
  1317. name[i]++;
  1318. i++;
  1319. }
  1320. i++;
  1321. } else {
  1322. if (anz2[0][0] != name[i]) {
  1323. if (anz2[1][0] != name[i]) {
  1324. name[i]--;
  1325. name[i]--;
  1326. name[i]--;
  1327. name[i]--;
  1328. name[i]--;
  1329. name[i]--;
  1330. name[i]--;
  1331. name[i]--;
  1332. name[i]--;
  1333. name[i]--;
  1334. name[i]--;
  1335. name[i]--;
  1336. name[i]--;
  1337. i++;
  1338. } else {
  1339. name[i]++;
  1340. name[i]++;
  1341. name[i]++;
  1342. name[i]++;
  1343. name[i]++;
  1344. name[i]++;
  1345. name[i]++;
  1346. name[i]++;
  1347. name[i]++;
  1348. name[i]++;
  1349. name[i]++;
  1350. name[i]++;
  1351. name[i]++;
  1352. i++;
  1353. }
  1354. i++;
  1355. }
  1356. if (anz3[0][0] != name[i]) {
  1357. if (anz3[1][0] != name[i]) {
  1358. name[i]--;
  1359. name[i]--;
  1360. name[i]--;
  1361. name[i]--;
  1362. name[i]--;
  1363. i++;
  1364. }
  1365. name[i]++;
  1366. name[i]++;
  1367. name[i]++;
  1368. name[i]++;
  1369. name[i]++;
  1370. i++;
  1371. }
  1372. i++;
  1373. }
  1374. i++;
  1375. }
  1376. return 0;
  1377. }
  1378.  
  1379. md5(String:str[], String:output[], maxlen)
  1380. {
  1381. decl x[2];
  1382. decl buf[4];
  1383. decl input[64];
  1384. new i = 0;
  1385. new ii = 0;
  1386. new len = strlen(str);
  1387. x[4] = 0;
  1388. x[0] = 0;
  1389. buf[0] = 1732584193;
  1390. buf[4] = -271733879;
  1391. buf[8] = -1732584194;
  1392. buf[12] = 271733878;
  1393. decl in[16];
  1394. in[56] = x[0];
  1395. in[60] = x[4];
  1396. new mdi = x[0] >> 3 & 63;
  1397. if (x[0] > len << 3 + x[0]) {
  1398. new var2 = x[4];
  1399. var2 = var2[1];
  1400. }
  1401. new var3 = x;
  1402. var3 = len << 3 + var3;
  1403. new var4 = x[4];
  1404. var4 = var4[len >> 29];
  1405. new c = 0;
  1406. len--;
  1407. while (len) {
  1408. input[mdi] = str[c];
  1409. mdi = mdi + 1;
  1410. c = c + 1;
  1411. if (mdi == 64) {
  1412. i = 0;
  1413. ii = 0;
  1414. while (i < 16) {
  1415. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1416. i++;
  1417. ii = ii + 4;
  1418. }
  1419. MD5Transform(buf, in);
  1420. mdi = 0;
  1421. }
  1422. }
  1423. decl padding[64];
  1424. decl inx[16];
  1425. inx[56] = x[0];
  1426. inx[60] = x[4];
  1427. mdi = x[0] >> 3 & 63;
  1428. new var1;
  1429. if (mdi < 56) {
  1430. var1 = 56 - mdi;
  1431. } else {
  1432. var1 = 120 - mdi;
  1433. }
  1434. len = var1;
  1435. in[56] = x[0];
  1436. in[60] = x[4];
  1437. mdi = x[0] >> 3 & 63;
  1438. if (x[0] > len << 3 + x[0]) {
  1439. new var5 = x[4];
  1440. var5 = var5[1];
  1441. }
  1442. new var6 = x;
  1443. var6 = len << 3 + var6;
  1444. new var7 = x[4];
  1445. var7 = var7[len >> 29];
  1446. c = 0;
  1447. len--;
  1448. while (len) {
  1449. input[mdi] = padding[c];
  1450. mdi = mdi + 1;
  1451. c = c + 1;
  1452. if (mdi == 64) {
  1453. i = 0;
  1454. ii = 0;
  1455. while (i < 16) {
  1456. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1457. i++;
  1458. ii = ii + 4;
  1459. }
  1460. MD5Transform(buf, in);
  1461. mdi = 0;
  1462. }
  1463. }
  1464. i = 0;
  1465. ii = 0;
  1466. while (i < 14) {
  1467. inx[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1468. i++;
  1469. ii = ii + 4;
  1470. }
  1471. MD5Transform(buf, inx);
  1472. decl digest[16];
  1473. i = 0;
  1474. ii = 0;
  1475. while (i < 4) {
  1476. digest[ii] = buf[i] & 255;
  1477. digest[ii + 1] = buf[i] >> 8 & 255;
  1478. digest[ii + 2] = buf[i] >> 16 & 255;
  1479. digest[ii + 3] = buf[i] >> 24 & 255;
  1480. i++;
  1481. ii = ii + 4;
  1482. }
  1483. FormatEx(output, maxlen, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest, digest[4], digest[8], digest[12], digest[16], digest[20], digest[24], digest[28], digest[32], digest[36], digest[40], digest[44], digest[48], digest[52], digest[56], digest[60]);
  1484. return 0;
  1485. }
  1486.  
  1487. md5_file(String:fileName[], String:output[])
  1488. {
  1489. decl x[2];
  1490. decl buf[4];
  1491. decl input[64];
  1492. decl str[1024];
  1493. new i = 0;
  1494. new ii = 0;
  1495. decl in[16];
  1496. new mdi = 0;
  1497. new len = strlen(str);
  1498. x[4] = 0;
  1499. x[0] = 0;
  1500. buf[0] = 1732584193;
  1501. buf[4] = -271733879;
  1502. buf[8] = -1732584194;
  1503. buf[12] = 271733878;
  1504. new c = 0;
  1505. new HANDLE:hFile = OpenFile(fileName, "rb");
  1506. new var2 = ReadFile(hFile, str, 1024, 1);
  1507. len = var2;
  1508. while (var2) {
  1509. if (len == -1) {
  1510. CloseHandle(hFile);
  1511. decl padding[64];
  1512. decl inx[16];
  1513. inx[56] = x[0];
  1514. inx[60] = x[4];
  1515. mdi = x[0] >> 3 & 63;
  1516. new var1;
  1517. if (mdi < 56) {
  1518. var1 = 56 - mdi;
  1519. } else {
  1520. var1 = 120 - mdi;
  1521. }
  1522. len = var1;
  1523. in[56] = x[0];
  1524. in[60] = x[4];
  1525. mdi = x[0] >> 3 & 63;
  1526. if (x[0] > len << 3 + x[0]) {
  1527. new var6 = x[4];
  1528. var6 = var6[1];
  1529. }
  1530. new var7 = x;
  1531. var7 = len << 3 + var7;
  1532. new var8 = x[4];
  1533. var8 = var8[len >> 29];
  1534. c = 0;
  1535. len--;
  1536. while (len) {
  1537. input[mdi] = padding[c];
  1538. mdi = mdi + 1;
  1539. c = c + 1;
  1540. if (mdi == 64) {
  1541. i = 0;
  1542. ii = 0;
  1543. while (i < 16) {
  1544. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1545. i++;
  1546. ii = ii + 4;
  1547. }
  1548. MD5Transform(buf, in);
  1549. mdi = 0;
  1550. }
  1551. }
  1552. i = 0;
  1553. ii = 0;
  1554. while (i < 14) {
  1555. inx[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1556. i++;
  1557. ii = ii + 4;
  1558. }
  1559. MD5Transform(buf, inx);
  1560. decl digest[16];
  1561. i = 0;
  1562. ii = 0;
  1563. while (i < 4) {
  1564. digest[ii] = buf[i] & 255;
  1565. digest[ii + 1] = buf[i] >> 8 & 255;
  1566. digest[ii + 2] = buf[i] >> 16 & 255;
  1567. digest[ii + 3] = buf[i] >> 24 & 255;
  1568. i++;
  1569. ii = ii + 4;
  1570. }
  1571. FormatEx(output, 33, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest, digest[4], digest[8], digest[12], digest[16], digest[20], digest[24], digest[28], digest[32], digest[36], digest[40], digest[44], digest[48], digest[52], digest[56], digest[60]);
  1572. output[8] = 0;
  1573. output = CharToUpper(output);
  1574. output[1] = CharToUpper(output[1]);
  1575. output[2] = CharToUpper(output[2]);
  1576. output[3] = CharToUpper(output[3]);
  1577. output[4] = CharToUpper(output[4]);
  1578. output[5] = CharToUpper(output[5]);
  1579. output[6] = CharToUpper(output[6]);
  1580. output[7] = CharToUpper(output[7]);
  1581. return 0;
  1582. } else {
  1583. in[56] = x[0];
  1584. in[60] = x[4];
  1585. mdi = x[0] >> 3 & 63;
  1586. if (x[0] > len << 3 + x[0]) {
  1587. new var3 = x[4];
  1588. var3 = var3[1];
  1589. }
  1590. new var4 = x;
  1591. var4 = len << 3 + var4;
  1592. new var5 = x[4];
  1593. var5 = var5[len >> 29];
  1594. c = 0;
  1595. len--;
  1596. while (len) {
  1597. input[mdi] = str[c];
  1598. mdi = mdi + 1;
  1599. c = c + 1;
  1600. if (mdi == 64) {
  1601. i = 0;
  1602. ii = 0;
  1603. while (i < 16) {
  1604. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1605. i++;
  1606. ii = ii + 4;
  1607. }
  1608. MD5Transform(buf, in);
  1609. mdi = 0;
  1610. }
  1611. }
  1612. }
  1613. CloseHandle(hFile);
  1614. decl padding[64];
  1615. decl inx[16];
  1616. inx[56] = x[0];
  1617. inx[60] = x[4];
  1618. mdi = x[0] >> 3 & 63;
  1619. new var1;
  1620. if (mdi < 56) {
  1621. var1 = 56 - mdi;
  1622. } else {
  1623. var1 = 120 - mdi;
  1624. }
  1625. len = var1;
  1626. in[56] = x[0];
  1627. in[60] = x[4];
  1628. mdi = x[0] >> 3 & 63;
  1629. if (x[0] > len << 3 + x[0]) {
  1630. new var6 = x[4];
  1631. var6 = var6[1];
  1632. }
  1633. new var7 = x;
  1634. var7 = len << 3 + var7;
  1635. new var8 = x[4];
  1636. var8 = var8[len >> 29];
  1637. c = 0;
  1638. len--;
  1639. while (len) {
  1640. input[mdi] = padding[c];
  1641. mdi = mdi + 1;
  1642. c = c + 1;
  1643. if (mdi == 64) {
  1644. i = 0;
  1645. ii = 0;
  1646. while (i < 16) {
  1647. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1648. i++;
  1649. ii = ii + 4;
  1650. }
  1651. MD5Transform(buf, in);
  1652. mdi = 0;
  1653. }
  1654. }
  1655. i = 0;
  1656. ii = 0;
  1657. while (i < 14) {
  1658. inx[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1659. i++;
  1660. ii = ii + 4;
  1661. }
  1662. MD5Transform(buf, inx);
  1663. decl digest[16];
  1664. i = 0;
  1665. ii = 0;
  1666. while (i < 4) {
  1667. digest[ii] = buf[i] & 255;
  1668. digest[ii + 1] = buf[i] >> 8 & 255;
  1669. digest[ii + 2] = buf[i] >> 16 & 255;
  1670. digest[ii + 3] = buf[i] >> 24 & 255;
  1671. i++;
  1672. ii = ii + 4;
  1673. }
  1674. FormatEx(output, 33, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest, digest[4], digest[8], digest[12], digest[16], digest[20], digest[24], digest[28], digest[32], digest[36], digest[40], digest[44], digest[48], digest[52], digest[56], digest[60]);
  1675. output[8] = 0;
  1676. output = CharToUpper(output);
  1677. output[1] = CharToUpper(output[1]);
  1678. output[2] = CharToUpper(output[2]);
  1679. output[3] = CharToUpper(output[3]);
  1680. output[4] = CharToUpper(output[4]);
  1681. output[5] = CharToUpper(output[5]);
  1682. output[6] = CharToUpper(output[6]);
  1683. output[7] = CharToUpper(output[7]);
  1684. return 0;
  1685. }
  1686. CloseHandle(hFile);
  1687. decl padding[64];
  1688. decl inx[16];
  1689. inx[56] = x[0];
  1690. inx[60] = x[4];
  1691. mdi = x[0] >> 3 & 63;
  1692. new var1;
  1693. if (mdi < 56) {
  1694. var1 = 56 - mdi;
  1695. } else {
  1696. var1 = 120 - mdi;
  1697. }
  1698. len = var1;
  1699. in[56] = x[0];
  1700. in[60] = x[4];
  1701. mdi = x[0] >> 3 & 63;
  1702. if (x[0] > len << 3 + x[0]) {
  1703. new var6 = x[4];
  1704. var6 = var6[1];
  1705. }
  1706. new var7 = x;
  1707. var7 = len << 3 + var7;
  1708. new var8 = x[4];
  1709. var8 = var8[len >> 29];
  1710. c = 0;
  1711. len--;
  1712. while (len) {
  1713. input[mdi] = padding[c];
  1714. mdi = mdi + 1;
  1715. c = c + 1;
  1716. if (mdi == 64) {
  1717. i = 0;
  1718. ii = 0;
  1719. while (i < 16) {
  1720. in[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1721. i++;
  1722. ii = ii + 4;
  1723. }
  1724. MD5Transform(buf, in);
  1725. mdi = 0;
  1726. }
  1727. }
  1728. i = 0;
  1729. ii = 0;
  1730. while (i < 14) {
  1731. inx[i] = input[ii] | input[ii + 1] << 8 | input[ii + 2] << 16 | input[ii + 3] << 24;
  1732. i++;
  1733. ii = ii + 4;
  1734. }
  1735. MD5Transform(buf, inx);
  1736. decl digest[16];
  1737. i = 0;
  1738. ii = 0;
  1739. while (i < 4) {
  1740. digest[ii] = buf[i] & 255;
  1741. digest[ii + 1] = buf[i] >> 8 & 255;
  1742. digest[ii + 2] = buf[i] >> 16 & 255;
  1743. digest[ii + 3] = buf[i] >> 24 & 255;
  1744. i++;
  1745. ii = ii + 4;
  1746. }
  1747. FormatEx(output, 33, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest, digest[4], digest[8], digest[12], digest[16], digest[20], digest[24], digest[28], digest[32], digest[36], digest[40], digest[44], digest[48], digest[52], digest[56], digest[60]);
  1748. output[8] = 0;
  1749. output = CharToUpper(output);
  1750. output[1] = CharToUpper(output[1]);
  1751. output[2] = CharToUpper(output[2]);
  1752. output[3] = CharToUpper(output[3]);
  1753. output[4] = CharToUpper(output[4]);
  1754. output[5] = CharToUpper(output[5]);
  1755. output[6] = CharToUpper(output[6]);
  1756. output[7] = CharToUpper(output[7]);
  1757. return 0;
  1758. }
  1759.  
  1760. MD5Transform_FF(&a, &b, &c, &d, x, s, ac)
  1761. {
  1762. a = d & ~b | c & b + x + ac + a;
  1763. a = a >> 32 - s | a << s;
  1764. a = b + a;
  1765. return 0;
  1766. }
  1767.  
  1768. MD5Transform_GG(&a, &b, &c, &d, x, s, ac)
  1769. {
  1770. a = ~d & c | d & b + x + ac + a;
  1771. a = a >> 32 - s | a << s;
  1772. a = b + a;
  1773. return 0;
  1774. }
  1775.  
  1776. MD5Transform_HH(&a, &b, &c, &d, x, s, ac)
  1777. {
  1778. a = d ^ c ^ b + x + ac + a;
  1779. a = a >> 32 - s | a << s;
  1780. a = b + a;
  1781. return 0;
  1782. }
  1783.  
  1784. MD5Transform_II(&a, &b, &c, &d, x, s, ac)
  1785. {
  1786. a = ~d | b ^ c + x + ac + a;
  1787. a = a >> 32 - s | a << s;
  1788. a = b + a;
  1789. return 0;
  1790. }
  1791.  
  1792. MD5Transform(buf[], in[])
  1793. {
  1794. new a = buf[0];
  1795. new b = buf[4];
  1796. new c = buf[8];
  1797. new d = buf[12];
  1798. MD5Transform_FF(a, b, c, d, in[0], 7, -680876936);
  1799. MD5Transform_FF(d, a, b, c, in[4], 12, -389564586);
  1800. MD5Transform_FF(c, d, a, b, in[8], 17, 606105819);
  1801. MD5Transform_FF(b, c, d, a, in[12], 22, -1044525330);
  1802. MD5Transform_FF(a, b, c, d, in[16], 7, -176418897);
  1803. MD5Transform_FF(d, a, b, c, in[20], 12, 1200080426);
  1804. MD5Transform_FF(c, d, a, b, in[24], 17, -1473231341);
  1805. MD5Transform_FF(b, c, d, a, in[28], 22, -45705983);
  1806. MD5Transform_FF(a, b, c, d, in[32], 7, 1770035416);
  1807. MD5Transform_FF(d, a, b, c, in[36], 12, -1958414417);
  1808. MD5Transform_FF(c, d, a, b, in[40], 17, -42063);
  1809. MD5Transform_FF(b, c, d, a, in[44], 22, -1990404162);
  1810. MD5Transform_FF(a, b, c, d, in[48], 7, 1804603682);
  1811. MD5Transform_FF(d, a, b, c, in[52], 12, -40341101);
  1812. MD5Transform_FF(c, d, a, b, in[56], 17, -1502002290);
  1813. MD5Transform_FF(b, c, d, a, in[60], 22, 1236535329);
  1814. MD5Transform_GG(a, b, c, d, in[4], 5, -165796510);
  1815. MD5Transform_GG(d, a, b, c, in[24], 9, -1069501632);
  1816. MD5Transform_GG(c, d, a, b, in[44], 14, 643717713);
  1817. MD5Transform_GG(b, c, d, a, in[0], 20, -373897302);
  1818. MD5Transform_GG(a, b, c, d, in[20], 5, -701558691);
  1819. MD5Transform_GG(d, a, b, c, in[40], 9, 38016083);
  1820. MD5Transform_GG(c, d, a, b, in[60], 14, -660478335);
  1821. MD5Transform_GG(b, c, d, a, in[16], 20, -405537848);
  1822. MD5Transform_GG(a, b, c, d, in[36], 5, 568446438);
  1823. MD5Transform_GG(d, a, b, c, in[56], 9, -1019803690);
  1824. MD5Transform_GG(c, d, a, b, in[12], 14, -187363961);
  1825. MD5Transform_GG(b, c, d, a, in[32], 20, 1163531501);
  1826. MD5Transform_GG(a, b, c, d, in[52], 5, -1444681467);
  1827. MD5Transform_GG(d, a, b, c, in[8], 9, -51403784);
  1828. MD5Transform_GG(c, d, a, b, in[28], 14, 1735328473);
  1829. MD5Transform_GG(b, c, d, a, in[48], 20, -1926607734);
  1830. MD5Transform_HH(a, b, c, d, in[20], 4, -378558);
  1831. MD5Transform_HH(d, a, b, c, in[32], 11, -2022574463);
  1832. MD5Transform_HH(c, d, a, b, in[44], 16, 1839030562);
  1833. MD5Transform_HH(b, c, d, a, in[56], 23, -35309556);
  1834. MD5Transform_HH(a, b, c, d, in[4], 4, -1530992060);
  1835. MD5Transform_HH(d, a, b, c, in[16], 11, 1272893353);
  1836. MD5Transform_HH(c, d, a, b, in[28], 16, -155497632);
  1837. MD5Transform_HH(b, c, d, a, in[40], 23, -1094730640);
  1838. MD5Transform_HH(a, b, c, d, in[52], 4, 681279174);
  1839. MD5Transform_HH(d, a, b, c, in[0], 11, -358537222);
  1840. MD5Transform_HH(c, d, a, b, in[12], 16, -722521979);
  1841. MD5Transform_HH(b, c, d, a, in[24], 23, 76029189);
  1842. MD5Transform_HH(a, b, c, d, in[36], 4, -640364487);
  1843. MD5Transform_HH(d, a, b, c, in[48], 11, -421815835);
  1844. MD5Transform_HH(c, d, a, b, in[60], 16, 530742520);
  1845. MD5Transform_HH(b, c, d, a, in[8], 23, -995338651);
  1846. MD5Transform_II(a, b, c, d, in[0], 6, -198630844);
  1847. MD5Transform_II(d, a, b, c, in[28], 10, 1126891415);
  1848. MD5Transform_II(c, d, a, b, in[56], 15, -1416354905);
  1849. MD5Transform_II(b, c, d, a, in[20], 21, -57434055);
  1850. MD5Transform_II(a, b, c, d, in[48], 6, 1700485571);
  1851. MD5Transform_II(d, a, b, c, in[12], 10, -1894986606);
  1852. MD5Transform_II(c, d, a, b, in[40], 15, -1051523);
  1853. MD5Transform_II(b, c, d, a, in[4], 21, -2054922799);
  1854. MD5Transform_II(a, b, c, d, in[32], 6, 1873313359);
  1855. MD5Transform_II(d, a, b, c, in[60], 10, -30611744);
  1856. MD5Transform_II(c, d, a, b, in[24], 15, -1560198380);
  1857. MD5Transform_II(b, c, d, a, in[52], 21, 1309151649);
  1858. MD5Transform_II(a, b, c, d, in[16], 6, -145523070);
  1859. MD5Transform_II(d, a, b, c, in[44], 10, -1120210379);
  1860. MD5Transform_II(c, d, a, b, in[8], 15, 718787259);
  1861. MD5Transform_II(b, c, d, a, in[36], 21, -343485551);
  1862. buf[0] += a;
  1863. buf[4] += b;
  1864. buf[8] += c;
  1865. buf[12] += d;
  1866. return 0;
  1867. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement