Advertisement
captmicro

Private LHK functions

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