OldSchoolHack

Register / Login English

Farm Bot Problem

icon Thread: Farm Bot Problem

Join Date: Mar 2011

Posts: 978

User-Rating:

89 positive
6 negative
das spiel benutzt wahrscheinlich directinput, wenn du glück hast, funktioniert sendinput mit den directinput scan codes.

c++:
CPP Code:
  1.  
  2. void pressKey(WORD Scancode)
  3. {
  4. INPUT inp;
  5. memset(&inp,0,sizeof(inp));
  6. inp.type=INPUT_KEYBOARD;
  7. inp.ki.wVk = 0;
  8. inp.ki.wScan = Scancode;
  9. inp.ki.time = 0;
  10. inp.ki.dwExtraInfo = 0;
  11. inp.ki.dwFlags=KEYEVENTF_SCANCODE;
  12. SendInput(1,&inp,sizeof(inp));
  13. Sleep(5);
  14. inp.ki.dwFlags=KEYEVENTF_SCANCODE|KEYEVENTF_KEYUP;
  15. SendInput(1,&inp,sizeof(inp));
  16. }
  17.  

dinput.h oder das hier inkludieren:
CPP Code:
  1.  
  2. #pragma once
  3.  
  4.  
  5. #define DIKEYBOARD_ESCAPE 0x0401 //
  6. #define DIKEYBOARD_1 0x0402 //
  7. #define DIKEYBOARD_2 0x0403 //
  8. #define DIKEYBOARD_3 0x0404 //
  9. #define DIKEYBOARD_4 0x0405 //
  10. #define DIKEYBOARD_5 0x0406 //
  11. #define DIKEYBOARD_6 0x0407 //
  12. #define DIKEYBOARD_7 0x0408 //
  13. #define DIKEYBOARD_8 0x0409 //
  14. #define DIKEYBOARD_9 0x040A //
  15. #define DIKEYBOARD_0 0x040B //
  16. #define DIKEYBOARD_MINUS 0x040C // (* - on main keyboard *)
  17. #define DIKEYBOARD_EQUALS 0x040D //
  18. #define DIKEYBOARD_BACK 0x040E // (* backspace *)
  19. #define DIKEYBOARD_TAB 0x040F //
  20. #define DIKEYBOARD_Q 0x0410 //
  21. #define DIKEYBOARD_W 0x0411 //
  22. #define DIKEYBOARD_E 0x0412 //
  23. #define DIKEYBOARD_R 0x0413 //
  24. #define DIKEYBOARD_T 0x0414 //
  25. #define DIKEYBOARD_Y 0x0415 //
  26. #define DIKEYBOARD_U 0x0416 //
  27. #define DIKEYBOARD_I 0x0417 //
  28. #define DIKEYBOARD_O 0x0418 //
  29. #define DIKEYBOARD_P 0x0419 //
  30. #define DIKEYBOARD_LBRACKET 0x041A //
  31. #define DIKEYBOARD_RBRACKET 0x041B //
  32. #define DIKEYBOARD_RETURN 0x041C // (* Enter on main keyboard *)
  33. #define DIKEYBOARD_LCONTROL 0x041D //
  34. #define DIKEYBOARD_A 0x041E //
  35. #define DIKEYBOARD_S 0x041F //
  36. #define DIKEYBOARD_D 0x0420 //
  37. #define DIKEYBOARD_F 0x0421 //
  38. #define DIKEYBOARD_G 0x0422 //
  39. #define DIKEYBOARD_H 0x0423 //
  40. #define DIKEYBOARD_J 0x0424 //
  41. #define DIKEYBOARD_K 0x0425 //
  42. #define DIKEYBOARD_L 0x0426 //
  43. #define DIKEYBOARD_SEMICOLON 0x0427 //
  44. #define DIKEYBOARD_APOSTROPHE 0x0428 //
  45. #define DIKEYBOARD_GRAVE 0x0429 // (* accent grave *)
  46. #define DIKEYBOARD_LSHIFT 0x042A //
  47. #define DIKEYBOARD_BACKSLASH 0x042B //
  48. #define DIKEYBOARD_Z 0x042C //
  49. #define DIKEYBOARD_X 0x042D //
  50. #define DIKEYBOARD_C 0x042E //
  51. #define DIKEYBOARD_V 0x042F //
  52. #define DIKEYBOARD_B 0x0430 //
  53. #define DIKEYBOARD_N 0x0431 //
  54. #define DIKEYBOARD_M 0x0432 //
  55. #define DIKEYBOARD_COMMA 0x0433 //
  56. #define DIKEYBOARD_PERIOD 0x0434 // (* . on main keyboard *)
  57. #define DIKEYBOARD_SLASH 0x0435 // (* / on main keyboard *)
  58. #define DIKEYBOARD_RSHIFT 0x0436 //
  59. #define DIKEYBOARD_MULTIPLY 0x0437 // (* * on numeric keypad *)
  60. #define DIKEYBOARD_LMENU 0x0438 // (* left Alt *)
  61. #define DIKEYBOARD_SPACE 0x0439 //
  62. #define DIKEYBOARD_CAPITAL 0x043A //
  63. #define DIKEYBOARD_F1 0x043B //
  64. #define DIKEYBOARD_F2 0x043C //
  65. #define DIKEYBOARD_F3 0x043D //
  66. #define DIKEYBOARD_F4 0x043E //
  67. #define DIKEYBOARD_F5 0x043F //
  68. #define DIKEYBOARD_F6 0x0440 //
  69. #define DIKEYBOARD_F7 0x0441 //
  70. #define DIKEYBOARD_F8 0x0442 //
  71. #define DIKEYBOARD_F9 0x0443 //
  72. #define DIKEYBOARD_F10 0x0444 //
  73. #define DIKEYBOARD_NUMLOCK 0x0445 //
  74. #define DIKEYBOARD_SCROLL 0x0446 // (* Scroll Lock *)
  75. #define DIKEYBOARD_NUMPAD7 0x0447 //
  76. #define DIKEYBOARD_NUMPAD8 0x0448 //
  77. #define DIKEYBOARD_NUMPAD9 0x0449 //
  78. #define DIKEYBOARD_SUBTRACT 0x044A // (* - on numeric keypad *)
  79. #define DIKEYBOARD_NUMPAD4 0x044B //
  80. #define DIKEYBOARD_NUMPAD5 0x044C //
  81. #define DIKEYBOARD_NUMPAD6 0x044D //
  82. #define DIKEYBOARD_ADD 0x044E // (* + on numeric keypad *)
  83. #define DIKEYBOARD_NUMPAD1 0x044F //
  84. #define DIKEYBOARD_NUMPAD2 0x0450 //
  85. #define DIKEYBOARD_NUMPAD3 0x0451 //
  86. #define DIKEYBOARD_NUMPAD0 0x0452 //
  87. #define DIKEYBOARD_DECIMAL 0x0453 // (* . on numeric keypad *)
  88. #define DIKEYBOARD_OEM_102 0x0456 // (* < > | on UK/Germany keyboards *)
  89. #define DIKEYBOARD_F11 0x0457 //
  90. #define DIKEYBOARD_F12 0x0458 //
  91. #define DIKEYBOARD_F13 0x0464 // (* (NEC PC98) *)
  92. #define DIKEYBOARD_F14 0x0465 // (* (NEC PC98) *)
  93. #define DIKEYBOARD_F15 0x0466 // (* (NEC PC98) *)
  94. #define DIKEYBOARD_KANA 0x0470 // (* (Japanese keyboard) *)
  95. #define DIKEYBOARD_ABNT_C1 0x0473 // (* / ? on Portugese (Brazilian) keyboards *)
  96. #define DIKEYBOARD_CONVERT 0x0479 // (* (Japanese keyboard) *)
  97. #define DIKEYBOARD_NOCONVERT 0x047B // (* (Japanese keyboard) *)
  98. #define DIKEYBOARD_YEN 0x047D // (* (Japanese keyboard) *)
  99. #define DIKEYBOARD_ABNT_C2 0x047E // (* Numpad . on Portugese (Brazilian) keyboards *)
  100. #define DIKEYBOARD_NUMPADEQUALS 0x048D // (* = on numeric keypad (NEC PC98) *)
  101. #define DIKEYBOARD_PREVTRACK 0x0490 // (* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) *)
  102. #define DIKEYBOARD_AT 0x0491 // (* (NEC PC98) *)
  103. #define DIKEYBOARD_COLON 0x0492 // (* (NEC PC98) *)
  104. #define DIKEYBOARD_UNDERLINE 0x0493 // (* (NEC PC98) *)
  105. #define DIKEYBOARD_KANJI 0x0494 // (* (Japanese keyboard) *)
  106. #define DIKEYBOARD_STOP 0x0495 // (* (NEC PC98) *)
  107. #define DIKEYBOARD_AX 0x0496 // (* (Japan AX) *)
  108. #define DIKEYBOARD_UNLABELED 0x0497 // (* (J3100) *)
  109. #define DIKEYBOARD_NEXTTRACK 0x0499 // (* Next Track *)
  110. #define DIKEYBOARD_NUMPADENTER 0x049C // (* Enter on numeric keypad *)
  111. #define DIKEYBOARD_RCONTROL 0x049D //
  112. #define DIKEYBOARD_MUTE 0x04A0 // (* Mute *)
  113. #define DIKEYBOARD_CALCULATOR 0x04A1 // (* Calculator *)
  114. #define DIKEYBOARD_PLAYPAUSE 0x04A2 // (* Play / Pause *)
  115. #define DIKEYBOARD_MEDIASTOP 0x04A4 // (* Media Stop *)
  116. #define DIKEYBOARD_VOLUMEDOWN 0x04AE // (* Volume - *)
  117. #define DIKEYBOARD_VOLUMEUP 0x04B0 // (* Volume + *)
  118. #define DIKEYBOARD_WEBHOME 0x04B2 // (* Web home *)
  119. #define DIKEYBOARD_NUMPADCOMMA 0x04B3 // (* , on numeric keypad (NEC PC98) *)
  120. #define DIKEYBOARD_DIVIDE 0x04B5 // (* / on numeric keypad *)
  121. #define DIKEYBOARD_SYSRQ 0x04B7 //
  122. #define DIKEYBOARD_RMENU 0x04B8 // (* right Alt *)
  123. #define DIKEYBOARD_PAUSE 0x04C5 // (* Pause *)
  124. #define DIKEYBOARD_HOME 0x04C7 // (* Home on arrow keypad *)
  125. #define DIKEYBOARD_UP 0x04C8 // (* UpArrow on arrow keypad *)
  126. #define DIKEYBOARD_PRIOR 0x04C9 // (* PgUp on arrow keypad *)
  127. #define DIKEYBOARD_LEFT 0x04CB // (* LeftArrow on arrow keypad *)
  128. #define DIKEYBOARD_RIGHT 0x04CD // (* RightArrow on arrow keypad *)
  129. #define DIKEYBOARD_END 0x04CF // (* End on arrow keypad *)
  130. #define DIKEYBOARD_DOWN 0x04D0 // (* DownArrow on arrow keypad *)
  131. #define DIKEYBOARD_NEXT 0x04D1 // (* PgDn on arrow keypad *)
  132. #define DIKEYBOARD_INSERT 0x04D2 // (* Insert on arrow keypad *)
  133. #define DIKEYBOARD_DELETE 0x04D3 // (* Delete on arrow keypad *)
  134. #define DIKEYBOARD_LWIN 0x04DB // (* Left Windows key *)
  135. #define DIKEYBOARD_RWIN 0x04DC // (* Right Windows key *)
  136. #define DIKEYBOARD_APPS 0x04DD // (* AppMenu key *)
  137. #define DIKEYBOARD_POWER 0x04DE // (* System Power *)
  138. #define DIKEYBOARD_SLEEP 0x04DF // (* System Sleep *)
  139. #define DIKEYBOARD_WAKE 0x04E3 // (* System Wake *)
  140. #define DIKEYBOARD_WEBSEARCH 0x04E5 // (* Web Search *)
  141. #define DIKEYBOARD_WEBFAVORITES 0x04E6 // (* Web Favorites *)
  142. #define DIKEYBOARD_WEBREFRESH 0x04E7 // (* Web Refresh *)
  143. #define DIKEYBOARD_WEBSTOP 0x04E8 // (* Web Stop *)
  144. #define DIKEYBOARD_WEBFORWARD 0x04E9 // (* Web Forward *)
  145. #define DIKEYBOARD_WEBBACK 0x04EA // (* Web Back *)
  146. #define DIKEYBOARD_MYCOMPUTER 0x04EB // (* My Computer *)
  147. #define DIKEYBOARD_MAIL 0x04EC // (* Mail *)
  148. #define DIKEYBOARD_MEDIASELECT 0x04ED // (* Media Select *)
  149.  

schonmal keybd_event ausprobiert?

ansonsten bleibt dir wirklich nichts anderes übrig als zu reversen, wenn das spiel directinput (dinput8.dll ins spiel geladen) benutzt, geht das ganze mit ner dll recht einfach, mach ich vllt i-wann mal nen tut...
kurzform:

dll-injecten, dinput8.dll finden, über DirectInput8Create die funktion GetDeviceState finden, diese hooken und den übergebenen buffer verändern.

__________________

http://www.abload.de/img/signfj5o.png
Spoiler
Vids:
Zitate:
Spoiler

Quote from xst
Vater KN4CK3R, der du hängst im irc, geheiligt werde dein Botnet, dein P7 v1.337 komme, die Bannwelle geschehe, wie in CS:S als auch in CS:GO, führe uns nicht in Versuchung, sondern erlöse uns von all dem c+p-Shit.
Quote from f4gsh0t_h4x
VAC ist an,immer,überall
Quote from gibson.w
Ich mag braune Würstchen
Quote from irc
<SilverDeath> KN4CK3R bistn nub
<~KN4CK3R> kk
Quote from irc
<OrkSchamane> das prob is das viele dieser eig. recht guten bücher englisch sind ...
<OrkSchamane> da habe ich's ja doppelt schwer
<~KN4CK3R> falsch
<~KN4CK3R> das prob is dass du programmieren willst ohne englisch zu können
Quote from irc
<SilverDeath> Ich schwöre dir Dr_Pepper Ich bumms deine Mutter tot Mann!
<Dr_Pepper> danke.
<SilverDeath> bitte
Quote from irc
<~KN4CK3R> dann liegts wenigstens an mir
<~KN4CK3R> nur noch rausfinden warum -.-
<SilverDeath> ja sicher
<SilverDeath> an wem sonst?
* You were kicked by KN4CK3R (kick)
Quote from Dr_Pepper
ihr seit beide dumm
Tutorials:
Releases:
Gifs:
Spoiler
http://www.abload.de/img/uberesp2sgul2.gif
https://i.imgur.com/Z5VQMrV.gif
http://www.abload.de/img/minesweeperzgaef.gif