Advertisement
captmicro

LHK Versions TWO POINT OOOH lhk_functions.txt

Jan 14th, 2013
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. /* LUA FUNCTIONS */
  2. ToSig(str) -> Create signature from data & mask (input example "\x53\x55?\x8B??\x68")
  3.  
  4. /* LHK FUNCTIONS */
  5. SetDebugPrivileges()
  6. WriteConsole(str)
  7.  
  8. CleanExit(returncode)
  9. Sleep(ms)
  10. CloseHandle(handle) -> return BOOL
  11. IsKeyDown(vk_key) -> returns BOOL
  12.  
  13. FindWindow(title) -> return HWND
  14. SendMessage(hwnd, msg, wparam, lparam) -> return BOOL
  15. PostMessage(hwnd, msg, wparam, lparam) -> return BOOL
  16. GetProcessId(hwnd) -> return PID
  17. OpenProcess(access, pid) -> return PROCESS
  18. TerminateProcess(process) - > return BOOL
  19. GetBaseAddress(process, modulename) -> return ADDRESS
  20. SigScan(process, start, maxlen, sig, siglen) -> return ADDRESS
  21.  
  22. AllocMem(process, address, size, type, protection) -> return ADDRESS
  23. FreeMem(process, address, size, type) -> return BOOL
  24. ProtectMem(process, address, size, protection) -> return oldPROTECTION
  25. QueryMem(process, address) -> return baseAddress, allocationBase, allocationProtect, regionSize, state, protect, type
  26.  
  27. ReadByte(process, address) -> return BYTE
  28. ReadShort(process, address) -> return SHORT
  29. ReadInt(process, address) -> return INT
  30. ReadLong(process, address) -> return LONG
  31. ReadFloat(process, address -> return FLOAT
  32. ReadStr(process, address, len) -> return STRING [If len is 0 read till null char]
  33.  
  34. WriteByte(process, address, val)
  35. WriteShort(process, address, val)
  36. WriteInt(process, address, val)
  37. WriteLong(process, address, val)
  38. WriteFloat(process, address, val)
  39. WriteStr(process, address, str)
  40.  
  41. /*Public Helper Driver (kernel mode memory access)*/
  42. DrvOpen() -> Open driver communication path, must be used before all Drv* functions
  43. DrvClose() -> Close driver communication path, must be used before exiting script
  44. DrvSetProc(exename) -> set current kmode process, must be used to before DrvRead*/DrvWrite*/DrvSigScan calls
  45. DrvUnsetProc() -> null current kmode process, must be used to before exiting script or calling DrvSetProc again
  46. DrvReadByte(address) -> return BYTE
  47. DrvReadShort(address) -> return SHORT
  48. DrvReadInt(address) -> return INT
  49. DrvReadFloat(address -> return FLOAT
  50. DrvWriteByte(address, val) -> return BOOL (true = success, false = fail)
  51. DrvWriteShort(address, val) -> return BOOL (true = success, false = fail)
  52. DrvWriteInt(address, val) -> return BOOL (true = success, false = fail)
  53. DrvWriteFloat(address, val) -> return BOOL (true = success, false = fail)
  54. DrvSigScan(start, maxlen, sig, siglen) -> return ADDRESS
  55. DrvPopImageData() -> pop image info from linked list in kernel, see http://pastebin.com/SL5dLSFV for details
  56.  
  57. /* Threading */
  58. ThreadCreate(luafile) -> return THREAD (created in suspended state)
  59. ThreadResume(THREAD) -> return INT (previous suspend counter)
  60. ThreadSuspend(THREAD) -> return INT (previous suspend counter)
  61. ThreadTerminate(THREAD, exitcode) -> return INT (0 = fail, 1 = success)
  62. ThreadGetExitCode(THREAD) -> return INT (thread exit code)
  63.  
  64. /* Fast Artifical Nerual Network */
  65. annCreate(numLayers, ...) -> return FANN PTR
  66. annCreateFromFile(file) -> return FANN PTR
  67. annDestroy(FANN PTR)
  68. annSaveToFile(FANN PTR, file)
  69. annRandomizeWeights(FANN PTR, min, max)
  70. annLearnRate(FANN PTR, [rate]) -> returns FLOAT (only if one arg is given)
  71. annTrainAlgorithm(FANN PTR, [algorithm]) -> returns ALGORITHM (only if one arg is given)
  72. annTrainOnFile(FANN PTR, file)
  73. annRun(FANN PTR, inputs) -> return ARRAY OF FLOATS (input is also array of floats)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement