Slang Posted May 18, 2012 Share Posted May 18, 2012 (edited) The following code stopped working after the latest update, I have tried several things such as Hex(x,8) in _Reverse_Bytes as well as ,1 and ,3 in Dec. Using Dec(x,1) will send an empty packet to the server, so I would assume something is wrong there rather than the _Reverse_Bytes. Did anyone else experience the same problem? Or could anyone tell me what -exactly- changed in Hex() and Dec()? I have been working on updating my scripts to be compitable with the last autoit update with some success, any support is very much appreciated. expandcollapse popupFunc _Send_Packet($PACKET_DATA) $PROCESS_HANDLE = DllCall("kernel32.dll", "HANDLE", "OpenProcess", "DWORD", 0x1F0FFF, "BOOL", 1, "DWORD", $PROCESS_IDENTIFIER) $CODE_ADDRESS = DllCall("kernel32.dll", "ULONG_PTR", "VirtualAllocEx", "HANDLE", $PROCESS_HANDLE[0], "ptr", 0, "ULONG_PTR", 0x46, "DWORD", 0x1000, "DWORD", 0x40) $DATA_ADDRESS = DllCall("kernel32.dll", "ULONG_PTR", "VirtualAllocEx", "HANDLE", $PROCESS_HANDLE[0], "ptr", 0, "ULONG_PTR", StringLen($PACKET_DATA) / 2, "DWORD", 0x1000, "DWORD", 0x40) $OPCODE = "60" ; pushad $OPCODE &= "B8" & _Reverse_Bytes($SEND_PACKET_ADDRESS) ; mov eax, Send Packet Address $OPCODE &= "8B0D" & _Reverse_Bytes($REAL_BASE_ADDRESS) ; mov ecx, dword ptr [Real Base Address] $OPCODE &= "8B4920" ; mov ecx, dword ptr [ecx+20] $OPCODE &= "BF" & _Reverse_Bytes($DATA_ADDRESS[0]) ; mov edi, Packet Address $OPCODE &= "6A" & _Reverse_Bytes(StringLen($PACKET_DATA) / 2, 2) ; push Packet Size $OPCODE &= "57" ; push edi $OPCODE &= "FFD0" ; call eax $OPCODE &= "61" ; popad $OPCODE &= "C3" ; ret $OPCODE_BUFFER = DllStructCreate("byte[" & StringLen($OPCODE) / 2 & "]") For $i = 1 To DllStructGetSize($OPCODE_BUFFER) DllStructSetData($OPCODE_BUFFER, 1, Dec(StringMid($OPCODE, ($i - 1) * 2 + 1, 2)), $i) Next $PACKET_BUFFER = DllStructCreate("byte[" & StringLen($PACKET_DATA) / 2 & "]") For $i = 1 To DllStructGetSize($PACKET_BUFFER) DllStructSetData($PACKET_BUFFER, 1, Dec(StringMid($PACKET_DATA, ($i - 1) * 2 + 1, 2)), $i) Next ; No AutoIt conversion for LPCVOID and SIZE_T * - Int will do. DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "HANDLE", $PROCESS_HANDLE[0], "ptr", $CODE_ADDRESS[0], "struct*", $OPCODE_BUFFER, "ULONG_PTR", DllStructGetSize($OPCODE_BUFFER), "int", 0) DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "HANDLE", $PROCESS_HANDLE[0], "ptr", $DATA_ADDRESS[0], "struct*", $PACKET_BUFFER, "ULONG_PTR", DllStructGetSize($PACKET_BUFFER), "int", 0) ; LPSECURITY_ATTRIBUTES is a pointer ; No AutoIt conversion for LPSECURITY_ATTRIBUTES, LPTHREAD_START_ROUTINE, and LPDWORD - Int will do. $REMOTE_THREAD = DllCall("kernel32.dll", "HANDLE", "CreateRemoteThread", "HANDLE", $PROCESS_HANDLE[0], "int", 0, "ULONG_PTR", 0, "int", $CODE_ADDRESS[0], "ptr", 0, "DWORD", 0, "int", 0) Do $RET = DllCall("kernel32.dll", "DWORD", "WaitForSingleObject", "HANDLE", $REMOTE_THREAD[0], "DWORD", 50) Until $RET[0] <> 258 DllCall("kernel32.dll", "BOOL", "VirtualFreeEx", "HANDLE", $PROCESS_HANDLE[0], "ptr", $CODE_ADDRESS[0], "ULONG_PTR", 0, "DWORD", 0x8000) DllCall("kernel32.dll", "BOOL", "VirtualFreeEx", "HANDLE", $PROCESS_HANDLE[0], "ptr", $DATA_ADDRESS[0], "ULONG_PTR", 0, "DWORD", 0x8000) DllCall("kernel32.dll", "BOOL", "CloseHandle", "HANDLE", $REMOTE_THREAD[0]) DllCall("kernel32.dll", "BOOL", "CloseHandle", "HANDLE", $PROCESS_HANDLE[0]) EndFunc ;==>_Send_Packet Func _Reverse_Bytes($Value, $Size = 8) Local $tmp1, $tmp2, $i $tmp1 = StringRight("000000000" & Hex($Value), $Size) For $i = 0 To StringLen($tmp1) / 2 - 1 $tmp2 = $tmp2 & StringMid($tmp1, StringLen($tmp1) - 1 - 2 * $i, 2) Next Return $tmp2 EndFunc ;==>_Reverse_Bytes Edit: What happens internally is that it simply does not send any thing, and I am calling _Send_Packet("030000") expandcollapse popup[0065057E] Packet: 80 00 E5 E8 40 12 [0064CE9E] Packet: 02 00 B4 3A 10 80 [01D80019] Packet: ################################################################<-------------- [0064D5CB] Packet: 27 00 01 01 00 [0064D7BC] Packet: 31 00 03 00 00 00 07 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 08 00 00 [0064E361] Packet: 79 00 00 00 [0064E55B] Packet: 7F 00 03 11 00 00 00 0D 62 42 00 00 00 00 [0064E55B] Packet: 7F 00 FF 10 00 00 00 0D 62 42 00 00 00 00 [0065057E] Packet: 80 00 17 7C 41 12 [0064E55B] Packet: 7F 00 01 11 00 00 00 0D 62 42 04 4F B4 83 AE 4F B4 83 AF 4F B4 83 B0 4F B4 83 B1 00 00 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 09 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 0C 00 00 [0064CE9E] Packet: 02 00 B4 3A 10 80 [01D80019] Packet: ################################################################<-------------- [0064D5CB] Packet: 27 00 01 01 00 [0064D7BC] Packet: 31 00 03 00 00 00 07 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 08 00 00 [0064E361] Packet: 79 00 00 00 [0064E55B] Packet: 7F 00 03 11 00 00 00 0D 62 42 00 00 00 00 [0064E55B] Packet: 7F 00 FF 10 00 00 00 0D 62 42 00 00 00 00 [0065057E] Packet: 80 00 BB 12 42 12 [0064D7BC] Packet: 31 00 03 00 00 00 09 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 0C 00 00 [0064E55B] Packet: 7F 00 01 11 00 00 00 0D 62 42 04 4F B4 83 AE 4F B4 83 AF 4F B4 83 B0 4F B4 83 B1 00 00 00 00 [0064CE9E] Packet: 02 00 86 3A 10 80 [0064CE9E] Packet: 02 00 B7 3A 10 80 [01D80019] Packet: ################################################################<-------------- [0064D5CB] Packet: 27 00 01 01 00 [0064D7BC] Packet: 31 00 03 00 00 00 07 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 08 00 00 [0064E361] Packet: 79 00 00 00 [0064E55B] Packet: 7F 00 03 11 00 00 00 0D 62 42 00 00 00 00 [0064E55B] Packet: 7F 00 FF 10 00 00 00 0D 62 42 00 00 00 00 [0065057E] Packet: 80 00 5C C2 42 12 [0064D7BC] Packet: 31 00 03 00 00 00 09 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 0C 00 00 [0064E55B] Packet: 7F 00 01 11 00 00 00 0D 62 42 04 4F B4 83 AE 4F B4 83 AF 4F B4 83 B0 4F B4 83 B1 00 00 00 00 [01D80019] Packet: ################################################################<-------------- [0064D5CB] Packet: 27 00 01 01 00 [0064D7BC] Packet: 31 00 03 00 00 00 07 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 08 00 00 [0064E361] Packet: 79 00 00 00 [0064E55B] Packet: 7F 00 03 11 00 00 00 0D 62 42 00 00 00 00 [0064E55B] Packet: 7F 00 FF 10 00 00 00 0D 62 42 00 00 00 00 [0065057E] Packet: 80 00 50 49 43 12 [0064D7BC] Packet: 31 00 03 00 00 00 09 00 00 [0064D7BC] Packet: 31 00 03 00 00 00 0C 00 00 [0064E55B] Packet: 7F 00 01 11 00 00 00 0D 62 42 04 4F B4 83 AE 4F B4 83 AF 4F B4 83 B0 4F B4 83 B1 00 00 00 00 [01D80019] Packet: ################################################################<-------------- Edited May 18, 2012 by Slang Link to comment Share on other sites More sharing options...
jchd Posted May 18, 2012 Share Posted May 18, 2012 Dec and Hex are now working with 64_bit integers.Maybe this line in the v3.3.8.0 changelog has some relation with your issue. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 (edited) Dec and Hex are now working with 64_bit integers.Maybe this line in the v3.3.8.0 changelog has some relation with your issue.I have patched several scripts already by using Hex($val, 8) because I required 4 byte pointers, and it converted to 8 byte pointers sometimes.I am however, completely stuck on this one there is little to none additional information provided; besides that additional flags have been added.I have tried all of the flags too Dec(x,1); Dec(x,2); Dec(x,3) and none of them work. In 3.3.6.1 it is working fine. Edited May 18, 2012 by Slang Link to comment Share on other sites More sharing options...
jchd Posted May 18, 2012 Share Posted May 18, 2012 Could you post one-line examples of instances where Hex or Dec results are different from what you would expect? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 When I add a file write with the same StringMid(Dec(etc)) in the For loops, the only difference between 3.3.6.1 and 3.3.8.1 is opcodeBuffer: 96 opcodeBuffer: 184 opcodeBuffer: 128 opcodeBuffer: 170 opcodeBuffer: 99 opcodeBuffer: 0 opcodeBuffer: 139 opcodeBuffer: 13 opcodeBuffer: 192 opcodeBuffer: 33 opcodeBuffer: 165 opcodeBuffer: 0 opcodeBuffer: 139 opcodeBuffer: 73 opcodeBuffer: 32 opcodeBuffer: 191 opcodeBuffer: 0 opcodeBuffer: 0 opcodeBuffer: 203 opcodeBuffer: 2 opcodeBuffer: 106 opcodeBuffer: 3 <-- 0 ((THIS WHERE 3 IS WHAT IT SHOULD BE)) opcodeBuffer: 87 opcodeBuffer: 255 opcodeBuffer: 208 opcodeBuffer: 97 opcodeBuffer: 195 packetBuffer: 3 packetBuffer: 0 packetBuffer: 0 Link to comment Share on other sites More sharing options...
ProgAndy Posted May 18, 2012 Share Posted May 18, 2012 Sorry, I'd like to help you, but this looks like a part of a bot for perfect world. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 Sorry, I'd like to help you, but this looks like a part of a bot for perfect world.I am merely asking what changed in Hex() and Dec() as there is no additional information besides " recognizes 16 bit integers ".I do not see how that falls under the gamebot category; it worked in 3.3.6.1 and stopped working in 3.3.8.1, simple as that. Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 (edited) Okay, I think I am qualified to state that no one has any clue what happened. Back to 3.3.6.1? Edited May 18, 2012 by Slang Link to comment Share on other sites More sharing options...
trancexx Posted May 18, 2012 Share Posted May 18, 2012 No, you don't have a fucking clue. czardas 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 So, does any one actually know what changed instead of writing one sentence completely unrelated to the problem or stating the obvious? Link to comment Share on other sites More sharing options...
JFX Posted May 18, 2012 Share Posted May 18, 2012 Read the help file, carefully. Link to comment Share on other sites More sharing options...
NinerSevenTango Posted May 18, 2012 Share Posted May 18, 2012 Distressing to see this. Link to comment Share on other sites More sharing options...
JohnOne Posted May 18, 2012 Share Posted May 18, 2012 Okay, I think I am qualified to state that no one has any clue what happened. Back to 3.3.6.1?Is this your attempt at reverse psychology, to get everyone rallying around to prove how clever they are?You're good you, really really good, I'll be back with the answer in 1 minute. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 18, 2012 Moderators Share Posted May 18, 2012 Slang,For someone who has been here such as short a time as you have to report an MVP for "bumping his post count" is not a very sensible thing to do. It is particularly stupid because it prompted me to PM the MVP in question - which resulted in him showing me some pretty good evidence that his suspicions were very well founded. However, as there is nothing explicitly game-related in your question I am not going to lock it just yet. You have been pointed to the changes in the functions you are using. Many other members (including myself) needed to amend their scripts following those changes - careful reading of the Help file avoided too many problems. A Dev has indicated (in their normal succinct manner) that the problem is your use of the functions rather than the functions themselves - so I propose that you return to the Help file and reread the relevant sections again. NinerSevenTango,I would suggest that if you find threads like this "distressing" then you refrain from posting in them - or even reading them in the first place. All,I have not had a good day. Please do not make my evening go the same way - you might regret it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Slang Posted May 18, 2012 Author Share Posted May 18, 2012 Figured this out myself. Time to quit this board; this is probably the most active topic in the past 5 days, and it's funny how none of them helped.Hex() and Dec() have nothing to do with gaming whatsoever, therefore it is childish to put it under that category, any code injection, for any purpose would have the same problem.The help file does not help much either, as I have tried every flag for Dec() and Hex(), the functions broke, they do not work like they used to any more, at all whatsoever.I haven't been pointed to any thing, as I already stated that I was aware of the Dec() and Hex() changes in the first post.This is rather immature, and I think for such a big change in functions, you should give more information of the exact changes performed.Since obviously, no one is actually aware what changed. ( Otherwise, I do not see a reason for them not posting, besides being off-line ).Again, before more incorrect statements.I TRIED EVERY FLAG POSSIBLE FOR BOTH DEC AND HEX, AND IT STILL DOES NOT WORK. I WROTE MY OWN FUNCTIONS TO DO WHAT I EXPECTED IT TO DO; AS OF 3.3.8.0 HEX() IS BROKE.You can delete my account. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now