Jump to content

Grayhat

Members
  • Posts

    14
  • Joined

  • Last visited

Grayhat's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Sorry Jos... I just didn't think I would have to copy the code here... It was just to explain the situation.
  2. Hello. I'm trying to port an Autoit Code to c++ and got stucked in this case: In Au3 I have: $pointer1 = (an arbitrary memory location) $pointer2 = (an arbitrary memory location) $pointer3 = (an arbitrary memory location) $struct1 = DllStructCreate("byte[" & $size & "]", $pointer1 + $pointer2) $struct2 = DllStructCreate("byte[" & $size & "]", $pointer3) DllStructSetData($struct1, 1, DllStructGetData($struct2, 1)) By doind this, AutoIt is copying the memory from address (pointer1 + pointer2) and moving it to pointer3, right? How can I achieve the same result in C++? I tried this: PVOID pointer1, pointer2, pointer3; ... memcpy(pointer1, pointer2 + pointer3, iSize); but still no success... I'd appreciate any help. Thanks in advance
  3. If you see a string like this: [T][e][t][0] [T][e][t][0][0][0] they are the same.
  4. As you may know, strings must be NULL terminated ('0'). Not in AU3, as $String1 = BinaryToString("0x74657374") $String2 = BinaryToString("0x746573740000") MsgBox(64, "Equals", $String1 == $String2) returns False.
  5. HotKeySet("{.}", "more") HotKeySet("{,}", "less") HotKeySet("{;}", "close") HotKeySet("{m}", "toggle") Global $toggle = false Global $time = 1000 ;seconds Global $x = 100 ;pixels Global $y = 100 ;pixels while (1) if $toggle then MouseClick("left", $x, $y) sleep($time) EndIf WEnd func toggle() $toggle = $toggle == false ToolTip("Running: " & $toggle) EndFunc func more() $time += 10 ToolTip("Time: " & $time) EndFunc func less() $time -= 10 ToolTip("Time: " & $time) EndFunc func close() exit EndFunc
  6. I have an input control, and I need this: When the user press a key and it's have the focus, show a messagebox and don't pass the pressed key into it. When I click a button to set the text in the input (GuiCtrlSetData), don't show the messagebox. I've tried WM_COMMAND, but the button click to set data and the keypress returns the same message code. Global Const $WM_COMMAND = 0x0111 Local $hWnd = GUICreate("Test", 225, 100) Local $hInput = GUICtrlCreateInput("", 10, 25) Local $hButton = GUICtrlCreateButton("Change", 10, 60) GUIRegisterMsg($WM_COMMAND, "MyCommand") GUISetState(@SW_SHOWNORMAL, $hWnd) While WinExists($hWnd) Switch GUIGetMsg() case -3 Exit case $hButton GUICtrlSetData($hInput, GUICtrlRead($hInput) & Random(1, 10, 1)) EndSwitch WEnd Func MyCommand($hWnd, $Msg, $wParam, $lParam) if $lParam = GUICtrlGetHandle($hInput) then ConsoleWrite($wParam & @CRLF & $lParam & @CRLF & $Msg & @CRLF & @CRLF) EndFunc Thanks in advance.
  7. And it's root is?
  8. Yes, it isn't but, is so harder to get the pass from a CPP Dll than an au3 script that you just drag into a 3rd party decompiler and get all source in a sec.
  9. I was just thinking, and even tried to do but unsuccessful. I compiled and au3 sctipt into exe. Then, I got the a3x part (real encrypted script appended to autoItSC.bin file) and encrypted it. Then, I Injected a DLL into the AutoItSc.bin to hook the "ReadFile" function, and don't just read the file, but Read, Decrypt and run script. It didn't work with big scripts, but, for my own surprise, did with a simple "MsgBox()" that wouldn't be decompiled! This fact gives me hope, for, maybe onde day, we can possibly secure the autoIt Compiled exe files Best regards, busTer
  10. He told his code wasn't based on Execute() (Y) was just a Joke, take it easy Jos
  11. Execute($data[$i]) Geeezz! \o/
  12. I see... i wasn't thinkin' abt write in autoit ;] thanks for answers. c ya
  13. but i dont need the information in the script... I just want to modify the data that the target read itself... the target structure is: Main code gen separator data code the main code slipt itself at separator and process the data code... but I want to modify the data code in runtime, so the main code should process the 'patched' code, no the actual code... it need to be made in runtime... possible?
  14. How to hook, for example a Kernel32's ReadFile API in a remote process? I have a program that read a file and load it into a variable... is possible to remote hook the "ReadFile" to my own ReadFile Function? I mean, my own readFile needs to replace some chars in the file read, so the 'patched' data should stay in the variable, but modified.
×
×
  • Create New...