
SXGuy
Active Members-
Posts
47 -
Joined
-
Last visited
SXGuy's Achievements

Seeker (1/7)
0
Reputation
-
How to use ConsoleWrite Correctly?
SXGuy replied to SXGuy's topic in AutoIt General Help and Support
Im sorry for getting angry, it just winds me up that i write a simple question and get flamed by people who dont actually read what i ask. Anyway, you have helped me, sorry, i didnt realise consolewrite only works with compiled scripts. I guess a mod can now lock this thread. -
How to use ConsoleWrite Correctly?
SXGuy replied to SXGuy's topic in AutoIt General Help and Support
Wow, i never knew this forum was filled with so many spitefull people. firstly, this has NOTHING to do with NomadMemory, unless you cant read properly, i didnt ask 1 single question relating to reading memory functions. secondly, if you put your ego aside for 1 second, i asked why consolewrite doesnt print the information i supply it, i didnt ask you to explain how to add data inside the brackets, i asked why the data i supplied does not work. Hense ConsoleWrite(HEX($BaseAddress) & " Byte " & $Array & @CRLF) Maybe if you idiots got off your high horse for one second and actually read what i asked you wouldnt come across so arrogant and aggressive. Oh and last but not least if what i written is pointless code to you, thats fine, but thats not the point, its something I wanted to do. If the code doesnt work within ConsoleWrite, fine, tell me that, but dont flame me like some 8 year old. -
Im trying to make a simple disembler similiar to Cheat Engine. So far i am able to pass each address and each line of bytes in a messagebox but when i use consolewrite instead, nothing happens. Im probably doing something wrong, can anyone advice? #include <NomadMemory.au3> Local $BaseAddress = "0x01009000" Local $array Local $PID $PID = ProcessExists("AProcess.exe") $hProcess = _MemoryOpen($PID) While $BaseAddress $Array = _MemoryRead ($BaseAddress,$hProcess,'byte[16]') ;msgbox(0,"Test","Addy " & HEX($BaseAddress) & " Byte " & $Array) ConsoleWrite(HEX($BaseAddress) & " Byte " & $Array & @CRLF) If $BaseAddress = Dec("010090A0") Then Call ("Idle") $BaseAddress = $BaseAddress + 16 WEnd Func Idle() _MemoryClose($PID) While 1 Sleep(10) Wend EndFunc Basically, it takes the base address of a process and reads the first 16 bytes, it then increments the address to read by 16 and continues the process of reading addresses and bytes up to the 10th address Like i say, if i use a messagebox, it works, but i want to be able to output the address and bytes in a console.
-
_WinAPI_ReadProcessMemory return array
SXGuy replied to Azothoras's topic in AutoIt General Help and Support
I might be way off with what you want, but i think i was trying something similar a few days ago. Using GetBaseAddress as a starting point and reading however many bytes i needed to read. Dividing bytes by each increment of the base address. Then i try to output results to a console, but i was just getting nothing returned. example: While $BaseAddress $Array = _WinAPI_ReadProcessMemory($hProcess, "0x" & HEX($BaseAddress),'byte[1]') $baseAddress = $BaseAddress+1 ConsoleWrite() ;do some console writing based on $Array If $BaseAddress = Dec("7FFFFFFF") Then Call ("Submit") WEnd Func Submit() While 1 Sleep(10) Wend EndFunc I know im way off with my code, and i know that $Array isnt defined properly, this is just off the top of my head, but i think you can see where i was trying to go with it anyway. -
This was just what i was looking for thanks. And btw i think the reason why it works with some ranges and not others, is because you are not defining the range properly, you should be scanning from the base address to the end of the memory block. i.e 00400000 - wherever it ends I doubt whatever your scanning is as high as FFFFFFFF, anything in the high region is probably another module loaded into memory, and since you are focusing on the pid of a particular process, it wont scan higher than its own memory block. hope that helps, sorry im posting in an old thread, but i hope this has helped you none the less.
-
Thank you! I knew it would be something along those lines, but just wasnt sure. This has really helped, thanks again.
-
Im trying to write a script which will create x amount of folders with a given name using an array or similar. But im having trouble getting the folders to be created exactly where i want them to be using an array. My example code is: #include <Array.au3> $text = "Clients\" $user = "Paul\Chris\Frank\" $array = StringSplit($user, '\', 1) Dircreate("C:\Documents and Settings\Administrator\desktop\" & $text & $user) I understand the way i have written is its not correct for my purpose but i am unable to work out how i rewrite it so it is. Ill explain what i want to do. I want to first create a folder called Clients, then create multiple subfolders called Paul, Chris and Frank. The problem i have is, each sub folder is being created inside the previous, rather than all being created in the Clients folder. Example: Result is Clients\Paul\Chris\Frank But i want Clients\Paul Clients\Chris Clients\Frank. How can i modify the code to achieve this? Thanks for any help you can give.
-
I dont know of any converter out there im afraid, if im unsure of one, i just use CE attached to notepad, type the opcode and look in the dissembler for the bytes However, if you download CE 5.5 source code and look at one of the .pas files, i think you will get a good idea on how it converts opcodes to byte expressions
-
You dont need autoit to nop the address, you are ment to use CE, thats the whole point in the CE tutorial. Anyway, 0045ae66 - 8b 80 0c 03 00 00 - mov eax,[eax+0000030c]. mov eax,[eax+30c] may be the static pointer you found, but its not that address you are ment to nop, its the address with the pointer information. 0045ae66 I will explain, at that address is an array of bytes, those array of bytes represent the register and offset for the pointer. 8b 80 = mov eax,eax 0c 03 00 00 = +0000030c Bytes are reversed due to the way it understands the code (big and little endian) Anyway, to replace this address with nops you would replace each byte at that address with "90" 90 = nop. So go to Memory view in CE and go to the address 0045ae66. Double click that address and type "nop". It will say that you have asked to nop once, but you need to nop 6 times, just click ok, so it will nop the rest for you. There you have it. If you really do wish to know how to do the same with Autoit then its quite simple. Read up on _WinAPI_WriteProcessMemory
-
TCPSend and TCPRecv to edit Variable Data, How?
SXGuy replied to SXGuy's topic in AutoIt General Help and Support
Sorry to bump, but does anyone have an answer? -
I have written a Game Trainer that is distributed between friends. I have written inside the trainer the ability to send myself data stored at a certain address inside the process of the game the trainer uses. This data is then sent to my recv console which dumps it into a text file. However, i want to use this data, and read it, then decide on what to do next based on the result. For example, if the recv console brings back valid data, do nothing but store it, if it brings back 0x00000000 (i.e the game has updated and the data has changed to another addresses) then i want the recv console to be able to send back "updates" to my variables, such as, Addresses in the game process to change to read from. For Example. the address to read from is a variable i.e Global $HackedAddress = "0x12345678" My question is, how can i use TCPSend to update this variable with a new address that i set in an ini file or txt file, or whatever i decide to use to store it in. Heres an example of my send function. #include <NomadMemory.au3> TCPStartup() Global $szIPADDRESS = "192.168.1.100";my router address, can be changed to Global i.p when sharing Global $nPORT = 33891 Global $ConnectedSocket = -1 Global $proc = ProcessExists("Game.exe") Global $HackedAddress = "0x12345678" Global $ID = _MemoryOpen($proc) Global $szData While 1 ProcessWait("Game.exe") $proc = ProcessExists("Game.exe") $ID = _MemoryOpen($proc) Do $szData = _MemoryRead($HackedAddress, $ID, "char[64]") Until $szData <> "" _MemoryClose($ID) $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) If $ConnectedSocket = -1 Then Sleep(200) TCPSend($ConnectedSocket, $szData) Call("_Next") ExitLoop If @error Then Sleep(200);ExitLoop WEnd Func _Next() While 1 Sleep(200) WEnd EndFunc ;==>_Next As you can see $HackedAddress is the address the Trainer Reads from, and then sends the data at that address to my recv console. Heres a basic example of how my recv console works.. #include <GUIConstants.au3> Dim $szIPADDRESS = "192.168.1.100" Dim $nPORT = 33891 Dim $GOOEY = GUICreate("My Server (IP: " & $szIPADDRESS & ")",300,200) Global $edit = GUICtrlCreateEdit("",10,10,280,180) GUISetState() TCPStartUp() While 1 $MainSocket = TCPListen($szIPADDRESS, $nPORT,100) Dim $ConnectedSocket = -1 Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket <> -1 Call ("Check") WEnd Func Check() Dim $recv $recv = TCPRecv( $ConnectedSocket, 2048 ) GUICtrlSetData($edit, _ $recv) TCPShutdown() FileOpen ( "Test.txt", 16 ) Sleep(1000) FileWrite("Test.txt",guiCtrlRead($edit)) Exit EndFunc So what i want to do from here, is check the info sent to my recv console from $HackedAddress, if the data is 0x00000000 (meaning the game has updated and the address has changed, send back a new address to replace the one in my trainer. I already know, it would be easy to create an ini and store any new addresses i want there, then have my recv console read from it, but i want to then send the new address back to my trainer and update $HackedAddress, save any changes and close the socket. Another problem i sometimes find is, the data sent back is abit buggy, id say, 1 outta 10 times im actually able to grab the data, any advice on tidying up this to work better would be greatful also.
-
hehe, correct me if im wrong, but i think Notepad.exe doesnt have pointers either. EDIT: suggestion to your code, change $pid = WinGetProcess("Spider Solitaire") to $pid = ProcessExists("Spider.exe") I think its better universally if you get the pid based on process name rather than window, not everything may have a window name
-
Wow that is a very old tutorial hehe
-
This is brilliant. I think more people will find an excuse to use it, if they need to get an address of a dll loaded into a process memory, i know i do! For example, if your looking to change something at a certain address of a dll, which gets loaded by another process, that address will always change, since it doesnt get loaded the exact same time or place right? the offset remains the same but the address doesnt. For example Game.exe may load a dll called MyDll. The address you want to change might be MyDll.dll+20C1. Now using cheat engine you can just go to the address MyDll.+20C1 and it will take you to the correct address, but when writing an autoit script, you want to rely on cheat engine as little as possible dont you. So previously, we would need to use GetModualHandle and EnumProcesses, one of which isnt included in autoit, and i personally didnt fancy writing it haha. But using this method, i can now always find the base address of MyDll.dll and just add the offset to it afterwards
-
haha its cool, its an easy mistake! happens all the time