Advertisement
Guest User

csgo wallhack

a guest
Apr 16th, 2017
2,593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IF  (A_ahkversion <= 1.1.25.04)
  2. {
  3. MsgBox,You have an old Autohotkey version! Downlad the latest verion here: https://autohotkey.com/download/
  4. ExitApp
  5. }
  6.  
  7. IF NOT A_IsAdmin
  8. {
  9.    Run *RunAs "%A_ScriptFullPath%"
  10.    ExitApp
  11. }
  12.  
  13. #SingleInstance,Force
  14.  
  15. Global DllName
  16. Global Title
  17.  
  18. Title = Counter-Strike: Global Offensive
  19. DllName = client.dll
  20.  
  21. Process, Exist, csgo.exe
  22. if(!errorlevel)
  23. {
  24.  MsgBox Can't find PID! ERROR
  25. }    
  26. PID = %ErrorLevel%
  27. MsgBox PID = %PID%
  28. SetFormat, Integer, Hex
  29. Base := GetDllBase(DllName, PID)
  30.  
  31. F6::
  32. SoundBeep
  33.  
  34. Sleep,2000
  35.  
  36. start:=0x00000000
  37. loop {
  38. start:=start+0x1000
  39. check:=ReadMemory(start+0x4,%Title%)
  40. check2:=ReadMemory(check,%Title%)
  41.  
  42. if (check2==0x6574616D)
  43.  
  44.  
  45. {
  46.  
  47. break
  48. }
  49. if (start>0xDDDDDDDD)
  50. {
  51. msgbox, Error 1
  52. }
  53.  
  54. }
  55. offset:=start+0x550
  56. end:=start+0x2000
  57.  
  58. loop
  59. {
  60. offset:=offset+0x4
  61. check:=ReadMemory(offset,%Title%)
  62. checka:=check+0x1c
  63. check2:=ReadMemory(check+0x1c,%Title%)
  64. if (check2==0x72617065)
  65. {
  66. break
  67. }
  68. if (offset>end)
  69. {
  70. msgbox, Error 2
  71. }
  72. }
  73.  
  74. msgbox, [Phlick's ESP] Done, press F6 in main menu!
  75.  
  76. offsets3:=offset
  77.  
  78. t1:=ReadMemory(offsets3,%Title%)
  79. t2:=ReadMemory(offsets3+0x8,%Title%)
  80. t3:=ReadMemory(offsets3+0x10,%Title%)
  81. t4:=ReadMemory(offsets3+0x18,%Title%)
  82. t5:=ReadMemory(offsets3+0x20,%Title%)
  83. t6:=ReadMemory(offsets3+0x28,%Title%)
  84. t7:=ReadMemory(offsets3+0x30,%Title%)
  85.  
  86. offsetsct:=offsets3+0x30+0xC0
  87.  
  88. ct1:=ReadMemory(offsetsct,%Title%)
  89. ct2:=ReadMemory(offsetsct+0x8,%Title%)
  90. ct3:=ReadMemory(offsetsct+0x10,%Title%)
  91. ct4:=ReadMemory(offsetsct+0x18,%Title%)
  92. ct5:=ReadMemory(offsetsct+0x20,%Title%)
  93. ct6:=ReadMemory(offsetsct+0x28,%Title%)
  94. ct7:=ReadMemory(offsetsct+0x638,%Title%)
  95.  
  96.  
  97. t11:=t1+0x96D
  98. t111:=ReadMemoryString(t11,%Title%)
  99. rewritetex(t111,t11)
  100. t22:=t2+0xC0F
  101. t222:=ReadMemoryString(t22,%Title%)
  102. rewritetex(t222,t22)
  103. t33:=t3+0x45D
  104. t333:=ReadMemoryString(t33,%Title%)
  105. rewritetex(t333,t33)
  106. t44:=t4+0x7e1
  107. t444:=ReadMemoryString(t44,%Title%)
  108. rewritetex(t444,t44)
  109. t55:=t5+0xACC
  110. t555:=ReadMemoryString(t55,%Title%)
  111. rewritetex(t555,t55)
  112. t66:=t6+0xFD
  113. t666:=ReadMemoryString(t66,%Title%)
  114. rewritetex(t666,t66)
  115. t77:=t7+0x838
  116. t777:=ReadMemoryString(t77,%Title%)
  117. rewritetex(t777,t77)
  118.  
  119.  
  120.  
  121. ct11:=ct1+0x27D
  122. ct111:=ReadMemoryString(ct11,%Title%)
  123. rewritetex2(ct111,ct11)
  124. ct22:=ct2+0x219d
  125. t222:=ReadMemoryString(ct22,%Title%)
  126. rewritetex2(ct222,ct22)
  127. ct33:=ct3+0x378
  128. ct333:=ReadMemoryString(ct33,%Title%)
  129. rewritetex2(ct333,ct33)
  130. ct44:=ct4+0x7e1
  131. ct444:=ReadMemoryString(ct44,%Title%)
  132. rewritetex2(ct444,ct44)
  133. ct55:=ct5+0xA70
  134. ct555:=ReadMemoryString(ct55,%Title%)
  135. rewritetex2(ct111,ct11)
  136. ct66:=ct6+0x111
  137. ct666:=ReadMemoryString(ct66,%Title%)
  138. rewritetex2(ct666,ct66)
  139. ct77:=ct7+0xEB7
  140. ct777:=ReadMemoryString(ct77,%Title%)
  141. rewritetex2(ct777,ct77)
  142.  
  143. ExitApp
  144.  
  145.  
  146. rewritetex(Haystack,offsettex)
  147. {
  148.  
  149. Needle = "$rimlight"
  150. StringGetPos, pos, Haystack, %Needle%
  151. if (pos >= 0)
  152.   {  WriteMemory(0x6E676924,offsettex+pos+0x0,%Title%)
  153.     WriteMemory(0x7A65726F,offsettex+pos+0x4,%Title%)
  154.     WriteMemory(0x20203120,offsettex+pos+0x8,%Title%)
  155.     WriteMemory(0x0A0D0A0D,offsettex+pos+0xC,%Title%)
  156.     WriteMemory(0x6C6F6324,offsettex+pos+0x10,%Title%)
  157.     WriteMemory(0x2220726F,offsettex+pos+0x14,%Title%)
  158.     WriteMemory(0x3020395B,offsettex+pos+0x18,%Title%)
  159.     WriteMemory(0x225D3020,offsettex+pos+0x1C,%Title%)
  160.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x20,%Title%)
  161.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x24,%Title%)
  162.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x28,%Title%)
  163. }
  164.     }
  165.  
  166. rewritetex2(Haystack,offsettex)
  167. {
  168.  
  169. Needle = "$rimlight"
  170. StringGetPos, pos, Haystack, %Needle%
  171. if (pos >= 0)
  172.    { WriteMemory(0x6E676924,offsettex+pos+0x0,%Title%)
  173.     WriteMemory(0x7A65726F,offsettex+pos+0x4,%Title%)
  174.     WriteMemory(0x20203120,offsettex+pos+0x8,%Title%)
  175.     WriteMemory(0x0A0D0A0D,offsettex+pos+0xC,%Title%)
  176.     WriteMemory(0x6C6F6324,offsettex+pos+0x10,%Title%)
  177.     WriteMemory(0x2220726F,offsettex+pos+0x14,%Title%)
  178.     WriteMemory(0x3020305B,offsettex+pos+0x18,%Title%)
  179.     WriteMemory(0x225D3920,offsettex+pos+0x1C,%Title%)
  180.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x20,%Title%)
  181.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x24,%Title%)
  182.     WriteMemory(0x0A0D0A0D,offsettex+pos+0x28,%Title%)
  183. }
  184.     }
  185.  
  186.  
  187.  
  188. ReadMemory(MADDRESS,PROGRAM)
  189. {
  190. winget, pid, PID, %PROGRAM%
  191. VarSetCapacity(MVALUE,4,0)
  192. ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
  193. DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
  194. Loop 4
  195. result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
  196. return, result
  197. }
  198.  
  199. WriteMemory(WVALUE,MADDRESS,PROGRAM)
  200. {
  201. winget, pid, PID, %PROGRAM%
  202.  
  203. ProcessHandle := DllCall("OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt")
  204. DllCall("WriteProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "Uint*", WVALUE,"Uint", 4, "Uint *", 0)
  205.  
  206. DllCall("CloseHandle", "int", ProcessHandle)
  207. return
  208. }
  209.  
  210. GetDllBase(DllName, PID = 0)
  211. {
  212.    TH32CS_SNAPMODULE := 0x00000008
  213.     INVALID_HANDLE_VALUE = -1
  214.     VarSetCapacity(me32, 548, 0)
  215.     NumPut(548, me32)
  216.     snapMod := DllCall("CreateToolhelp32Snapshot", "Uint", TH32CS_SNAPMODULE
  217.                                                  , "Uint", PID)
  218.     If (snapMod = INVALID_HANDLE_VALUE) {
  219.         Return 0
  220.     }
  221.     If (DllCall("Module32First", "Uint", snapMod, "Uint", &me32)){
  222.         while(DllCall("Module32Next", "Uint", snapMod, "UInt", &me32)) {
  223.             If !DllCall("lstrcmpi", "Str", DllName, "UInt", &me32 + 32) {
  224.                 DllCall("CloseHandle", "UInt", snapMod)
  225.                 Return NumGet(&me32 + 20)
  226.             }
  227.         }
  228.     }
  229.     DllCall("CloseHandle", "Uint", snapMod)
  230.     Return 0
  231. }
  232.  
  233.  
  234. ReadMemoryString(MADDRESS,PROGRAM)
  235. {
  236.     winget, pid, PID, %PROGRAM%
  237.  
  238.             ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "Uint")
  239.             teststr =
  240.             Loop 32
  241.             {
  242.                Output := "x"
  243.                tempVar := DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "str", Output, "Uint", 1, "Uint *", 0)
  244.                if (ErrorLevel or !tempVar)
  245.                {
  246.                   DllCall("CloseHandle", "int", ProcessHandle)
  247.                   return teststr
  248.                }
  249.  
  250.  
  251.  
  252.                teststr = %teststr%%Output%
  253.                MADDRESS++
  254.             }
  255.             DllCall("CloseHandle", "int", ProcessHandle)
  256.             return, teststr
  257.  
  258. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement