DestBro

Трейнер|Башня на бок|Антипереворот

Jul 16th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. import flashex.mem;
  2. import flashex.io;
  3. import std.random;
  4. import flash.vm;
  5. import flash.vmex;
  6. import flash.swf;
  7. import flash.minimap;
  8. import Network;
  9. import licence;
  10. import base.win;
  11. import base.ini;
  12. import std.io;
  13. import base.gui;
  14. import std.string;
  15. import std.time;
  16. import std.file;
  17. Dialog ref toc;
  18. HWND text1;
  19. CheckBox check1,check2;
  20.  
  21. bool rew = false;
  22. int[] Sig_Basnea_NaBok;
  23.  
  24. int ItoSig;
  25. int[] ParPovFreez;
  26. bool BoolPPF;
  27.  
  28. char[] IntToHex(int x){char[] ret;
  29. int a = x, i = 0; int[500] mass;
  30. do{x /= 16; a %= 16;
  31. mass[i] = a; i++; a = x;
  32. }while(x > 16); mass[i] = a;
  33. for (int j = i; j > -1; j--){
  34. if(mass[j] == 10) ret = ret+"A";
  35. else if (mass[j] == 11) ret = ret+"B";
  36. else if (mass[j] == 12) ret = ret+"C";
  37. else if (mass[j] == 13) ret = ret+"D";
  38. else if (mass[j] == 14) ret = ret+"E";
  39. else if (mass[j] == 15) ret = ret+"F";
  40. else ret = ret + mass[j].str();}
  41. if(ret.size==8){return "0"+ret;}else{
  42. return ret;}}
  43.  
  44.  
  45. char[] IntToSig(int a){
  46. char[] x = IntToHex(a);
  47. char[8] tazik; tazik[0] = x[6];
  48. tazik[1] = x[7];tazik[2] = x[4];
  49. tazik[3] = x[5];tazik[4] = x[2];
  50. tazik[5] = x[3];tazik[6] = x[0];
  51. tazik[7] = x[1];return ""+tazik+"";}
  52.  
  53.  
  54. void GetSetAddresPPF(){FlashObject OSGi = FlashObjectFind("ServersDropDownList");
  55. OSGi.GetObject("list",OSGi); if(OSGi._address > 10){
  56. ParPovFreez = {(OSGi._address+328)}; ItoSig = OSGi._address+328;
  57. Signature.Replace( ParPovFreez, "00 00 00 00 00 00 E0 3F");
  58. Signature.FindAndReplace("F2 0F 10 15 ?? ?? ?? ?? F2 0F 59 EA F2 0F 58 C5",
  59. "F2 0F 10 15 "+IntToSig(ItoSig)+" F2 0F 59 EA F2 0F 58 C5", false, true);
  60. BoolPPF = true; }else{BoolPPF = false;}
  61. }
  62.  
  63.  
  64. class HotKeyInfo{ char c; bool alt; bool ctrl; bool shift;
  65.  
  66. void HotKeyInfo(char _c, bool _alt, bool _ctrl, bool _shift){
  67. c = _c; alt = _alt; ctrl = _ctrl; shift = _shift;}}
  68.  
  69. HotKeyInfo hotkeyTest1 = HotKeyInfo('B', false, false, false);
  70. HotKeyControl hotKey1;
  71.  
  72. HotKeyInfo hotkeyTest2 = HotKeyInfo('Z', false, false, true);
  73. HotKeyControl hotKey2;
  74.  
  75.  
  76. void EventHotKey2(Dialog ref dlg, int param)
  77. {
  78. Signature.Replace(ParPovFreez, "00 00 00 00 00 00 E0 7F"); /*Переворот*/
  79. Sleep(70); // Ждем 0.7 секунд
  80. Signature.Replace(ParPovFreez, "00 00 00 00 00 00 E0 3F"); /*Норма*/
  81. Beep(800,100); // ЗВУК
  82. }
  83.  
  84. void EventHotKey1(Dialog ref dlg, int param)
  85. {
  86. if(!rew)
  87. {
  88. Signature.Replace(Sig_Basnea_NaBok, "90 90 90 90 90");
  89. text1.SetText("Башня на бок Активирована");
  90. }else{
  91. Signature.Replace(Sig_Basnea_NaBok, "F3 0F 7E 5A 38");
  92. text1.SetText("Башня на бок Деактивирована");
  93. }
  94. rew =! rew;
  95. }
  96.  
  97. void HotKeyEvent2(Dialog ref dlg, int lparam){
  98. dlg.DelHotKey(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift);
  99. hotKey1.Get(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift); if(hotkeyTest2.c != 0)
  100. dlg.AddHotKey(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift, EventHotKey1, 1);}
  101.  
  102. void HotKeyEvent(Dialog ref dlg, int lparam){
  103. dlg.DelHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
  104. hotKey1.Get(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift); if(hotkeyTest1.c != 0)
  105. dlg.AddHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift, EventHotKey1, 1);}
  106.  
  107.  
  108.  
  109. void SetHotKey2(Dialog ref dlg, int param)
  110. {
  111. if(check2.IsChecked())
  112. {
  113. GetSetAddresPPF(); // Находим сигнатуру, и делаем махинации с ней.
  114. if(BoolPPF==true){
  115. Beep(1000, 200);
  116. hotKey2.GetHWND().Enable(true);
  117. dlg.AddHotKey(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift, EventHotKey2, 1);}
  118. else{MessageBox("Не получилось найти свободный адрес","Ошибка !");}
  119.  
  120. }else{
  121. Beep(500, 200);
  122. hotKey2.GetHWND().Enable(false);//сделаем серым
  123. dlg.DelHotKey(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift);
  124. }
  125. }
  126.  
  127. void SetHotKey1(Dialog ref dlg, int param)
  128. {
  129. if(check1.IsChecked())
  130. {
  131. Sig_Basnea_NaBok = Signature.Find("F3 0F 7E 5A 38 66 0F D6 9D B8 FE FF FF", false, true);
  132.  
  133. if(Sig_Basnea_NaBok.size){
  134. Beep(1000, 200); Signature.Replace(Sig_Basnea_NaBok, "90 90 90 90 90");
  135. hotKey1.GetHWND().Enable(true);
  136. dlg.AddHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift, EventHotKey1, 1);
  137. }else{
  138. check1.Checked(0); hotKey1.GetHWND().Enable(false);
  139. dlg.DelHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
  140. }
  141. }else{Beep(500, 200); Signature.Replace(Sig_Basnea_NaBok, "F3 0F 7E 5A 38");
  142. hotKey1.GetHWND().Enable(false);//сделаем серым
  143. dlg.DelHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
  144. }
  145. }
  146.  
  147. void closeDlg(Dialog ref Dialog, int param){
  148. Signature.Replace(Sig_Basnea_NaBok, "F3 0F 7E 5A 38");}
  149.  
  150. toc = CreateDialog("Башня на бок", 200, 200, 290, 170, closeDlg);
  151.  
  152. hotKey1 = toc.AddHotKeyControl(120, 13, 70,19, HotKeyEvent, 0);
  153. hotKey1.GetHWND().Enable(false);
  154. hotKey1.Set(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
  155. check1 = toc.AddCheckBox("Башня на бок", 7, 15, 100, 20, SetHotKey1, 1);
  156.  
  157. hotKey2 = toc.AddHotKeyControl(120, 43, 70,19, HotKeyEvent2, 0);
  158. hotKey2.GetHWND().Enable(false);
  159. hotKey2.Set(hotkeyTest2.c, hotkeyTest2.alt, hotkeyTest2.ctrl, hotkeyTest2.shift);
  160. check2 = toc.AddCheckBox("Антипереворот", 7, 45, 100, 20, SetHotKey2, 1);
  161. text1 = toc.AddStatic("Tекст", 30, 80, 300, 20);
  162.  
  163. toc.Show(true);
  164. toc.OnTop(1);
  165. toc.WaitClose();
  166. return 0;
Add Comment
Please, Sign In to add comment