Jump to content

lolp1

Active Members
  • Posts

    274
  • Joined

  • Last visited

Everything posted by lolp1

  1. Topic, does anyone know of some method to block WinActivate call from another program?
  2. If you are privileged on XP, does it just run with out any pop ups or anything unlike vista where you get a pop asking if your sure you want to run as a admin?
  3. Hello, I don't have WindowsXP to test it on, but what happens if you run #RequireAdmin on windowsXP and they are not admin, and what happens if they are if anything.(Curios since the command was designed for windows vista but the change log says it can be used for XP to)
  4. Hello, Does anyone have an example of how to use _IsPressed to check for key combos and special chars? For example I went to detect when some one presses Shift + x at the same time, or shift + 2 at the same time - so I can detect special characters. Do I need to write some UDF for this or has it been done?
  5. For what I needed I needed the PID from the window name - I did a google search/auto it help file and found nothing auto it related, hence my fix using the DllFunc call of auto it...
  6. Doh! Well, I found another clever method, wish I'd have known about that 10 minutes ago I used something along the lines of $pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int_ptr", 0) EDIT: I also suggest the Help file be updated, seems like it didn't list many ways and thats why I was confused.
  7. Topic, I am looking for some method to do this but I can't find. Anyone of some help?
  8. Ok, but how is "f" getting the func to click on "Google search"? How do I go about getting the proper form name for the button I want to press?
  9. Hi, need some help using the _IEFormSubmit. On some forums I use, before you make a post you need to of course click the Add Reply button, and I'm trying to auto-mate 1 post. I seem to have some problems with _IEFormSubmit In the example it shows: #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) How ever I'm not sure why it's using, $oForm = _IEFormGetObjByName ($oIE, "f") What is the F for? The button name is Add Reply if thats any help...
  10. Good explaing, works pefect, now I can work on storing my variable. First thing that comes to mind is using FileWriteLine FileReadLine to log them, as well as store a random link once it collects them to a variable, I'll post how it turns out or if I find a better way.
  11. Hi, been a long time since I've used auto it and forgot a lot of stuff. First of all what I'm trying to do here, is get a list of links found by _IELinkGetCollection , and filter them to only ones with a certain text, and then store a random one with the text I specify (theres always several of them). I was able to get the list of all links, and log them to a txt file. How would I go about filtering them by a certain text they have in it so I can store my random variable? EDIT: Example, _IEGetLinkCollection gives this put put: Test.com Test1.com Test2.com Test.net Test2.net I'd like to be able to filter out the .coms and only log the .nets, so I can then select a random one and store it to a variable.
  12. Hi, ccan some one post an example on using autoitx's iniread in a C++ file?
  13. I've reverted to an older version of auto-it and it compiles fine, never did find out what got updated that made it not work....
  14. No... the last param is just the default values
  15. Ya, I made this about a 7 months ago and haven't touched auto it since. I know this compiled then, and I'm 80% sure I never changed anything. Can anyone see any mistakes? #include <GuiConstants.au3> #include <InjectDLL.au3> $Main = GUICreate("DLL Injector", 300, 100,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $InpWin = IniRead("DLLInjector.ini","Main","WindowName","Window Name") $InpDll = IniRead("DLLInjector.ini","Main","DLL","DLL To Inject") $Browse = GuiCtrlCreateButton("Browse", 230, 15, 60, 20) $WinList = GuiCtrlCreateButton("WinList", 230, 50, 60, 20) $Checkbox = GuiCtrlCreateCheckbox("Save Settings?", 10, 70, 90, 30) ;$Save = GuiCtrlCreateButton("Save Settings", 10, 70, 90, 30) $InputDLL = GuiCtrlCreateInput($InpDLL, 10, 15, 150, 20) $InputWindow = GuiCtrlCreateInput($InpWin, 10, 50, 150, 20) $Quit = GuiCtrlCreateButton("Quit", 170, 15, 60, 20) $Inject = GuiCtrlCreateButton("Inject", 170, 50, 60, 20) GUICtrlCreateLabel("O_o Injector O_o", 140, 80, 100, 17); GUICtrlSetFont(-1, 8, 800, 0, "Tahoma"); ActGUI() Func ActGUI() GuiSetState() While 1 $msg = GuiGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Quit() Case $Quit Quit() Case $Browse $dllloc = FileOpenDialog("DLL to Inject",@DesktopDir,"DLL files (*.dll)",1) GUICtrlSetData($InputDLL,$dllloc) Case $Inject InjectDLL() Case $WinList ListWindows() ; Case $Checkbox ;_CheckCheckBox() EndSwitch WEnd Quit() EndFunc Func InjectDLL() $Result = GUICtrlRead($InputWindow) $Result2 = GUICtrlRead($InputDLL) If fileExists(GUICtrlRead($InputDLL)) = 0 AND WinExists(GUICtrlRead($InputWindow)) = 0 Then MsgBox(0,"Bad DLL path and window name","The .DLL " & $Result2 & " does not exists as well as the window name " & $Result & " Does not exists. Please make sure both exists before injecting.") ActGui() ElseIf fileExists(GUICtrlRead($InputDLL)) = 0 Then MsgBox(0,"Bad DLL path", "The .DLL " & "" & $result2 & "" & " does not exists. Please check your .DLL path") ActGUI() Elseif WinExists(GUICtrlRead($InputWindow)) = 0 then MsgBox(0,"Bad Window name" , "The window " & $result & " does not exists. Please make sure the window exists before injecting.") ActGui() endif $success = _InjectDll(WinGetHandle(GUICtrlRead($InputWindow)), GUICtrlRead($InputDLL)); WinGetHandle($switches) $Errorr = @error If $Errorr < 0 Then ; MsgBox(16, $success, $Errorr) TrayTip ( "DLLInjecteor", "Failed!", 10 , 1 ) Else ;MsgBox(64, $success, "DLL Injected sucssfully") TrayTip ( "DLLInjecteor", "DLL Injected sucssfully!", 10 , 1 ) EndIf EndFunc Func Quit() $checkk = GUICtrlRead($Checkbox) ;1 is checked, 4 is unchecked If $checkk = 1 Then ;write to ini $ini_dll = GUICtrlRead($InputDLL) $ini_win = GUICtrlRead($InputWindow) IniWrite("DLLInjector.ini","Main","DLL",$ini_dll) IniWrite("DLLInjector.ini","Main","WindowName",$ini_win) ;MsgBox(0,"O_o" $chk) ;ElseIf $checkk = 4 Then ; IniWrite("DLLInjector.ini","Main","DLL","DLL to inject") ; IniWrite("DLLInjector.ini","Main","WindowName","Window Name") EndIf ; MsgBox(0,"test",$chk) Exit EndFunc Func ListWindows() $main2 = GUICreate ("Window List", 200, 300,700,200) $Windows = GUICtrlCreateListView ("Currently visible windows", 1, 20, 200, 250) $Window = GUICtrlCreateButton ("Select window", 120, 272, -1, -1) $Refresh = GUICtrlCreateButton ("Refresh windows", 10, 272, -1, -1) $var = WinList() For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then GUICtrlCreateListViewItem ($var[$i][0], $Windows) EndIf Next GUISetState (@SW_SHOW, $main2) ;;; While 1 $get= GUIGetMsg () Select Case $get= $GUI_EVENT_CLOSE GUIDelete($main2) ExitLoop ;;; Case $get= $Window $GetWindow= (GUICtrlRead(GUICtrlRead ($Windows))) ; below commented out incase i want to add a warning before selecting the window ; $warning= MsgBox (4 + 48, "WARNING", "Are you sure you want to use this window?") ; If $warning= 6 then GUICtrlSetData($InputWindow , $GetWindow ) GUIDelete($main2) ExitLoop ; Else ; ContinueLoop ;EndIf ;;; Case $get= $Refresh GUIDelete($main2) ListWindows() Exitloop EndSelect WEnd EndFunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc ; below commented incase i want to exit in a regular way #cs Func Quit() Exit Endfunc #ce ; #cs Func InjectDLL() ; Incase I want to add a check for the default inputs and warn the user If ( GUICtrlRead($InputWindow) == "Window Name" ) Or ( GUICtrlRead($InputDLL) == "DLL To Inject" ) Then MsgBox(0,"Error","Can not use this path or window name") ActGUI() EndIf ;GUISetState(@SW_HIDE) #ce Func _CheckCheckBox() $ini_dll = GUICtrlRead($InputDLL) $ini_win = GUICtrlRead($InputWindow) $check = GUICtrlRead($Checkbox) if $check = 1 Then IniWrite("DLLInjector.ini","Main","DLL", $ini_dll) IniWrite("DLLInjector.ini","Main","WindowName",$ini_win) Else IniWrite("DLLInjector.ini","Main","DLL", "DLL To Inject") IniWrite("DLLInjector.ini","Main","Window Name", "Window name") endif ;MsgBox(0,"credits/site" , "Credits: lolp1, DarkShadow, Outshynd. www.edgeofnowhere.cc") ;Case Else EndFunc #cs Case $Save $lol1 = GUICtrlRead($InputWindow) $lol2 = GUICtrlRead($InputDLL) IniWrite("DLLinjector.ini", "Main", "WindowName", $lol1) IniWrite("DLLinjector.ini", "Main", "WindowName", $lol2) ;;; #ceoÝ÷ ØãyËC,¶®¶­sb6æ6ÇVFRÖöæ6P ¤gVæ2ôæ¦V7DFÆÂb33c¶væBÂb33c¶FÆÇF ¶Ö¶R7W&RFRW6W"76VBfÆB&ÖWFW'0 bb33c¶væBfÇC³ÒFVà 6WDW'&÷"Ó &WGW&âfÇ6P VÇ6Tb7G&ætÆVâb33c¶FÆÇFfÇC³ÒB÷"7G&æu&vBb33c¶FÆÇFÂBfÇC²fwC²gV÷C²æFÆÂgV÷C²FVà 6WDW'&÷"Ó" &WGW&âfÇ6P VæD` Æö6Âb33c·BÂb33c·æFÆRÂb33c·Æ%&VÖ÷FRÂb33c¶ÖöDæFÆRÂb33c´ÆöDÆ'&'Âb33c¶F&V@ ¶÷VâFÆÂFBvRb33¶ÆÂ&RW6æp Æö6Âb33c¶¶W&æVÃ3"ÒFÆÄ÷VâgV÷C¶¶W&æVÃ3"æFÆÂgV÷C² ¶vWBFRBg&öÒFRvæF÷r&÷fFV@ b33c·BÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWEvæF÷uF&VE&ö6W74BgV÷C²ÂgV÷C¶væBgV÷C²Âb33c¶væBÂgV÷C¶çE÷G"gV÷C²Â b4'&b33c·BFVà b33c·BÒb33c·E³%Ð VÇ6P 6WDW'&÷"Ó2 &WGW&âfÇ6P VæD` ¶÷VâFR&ö6W72f÷"w&Fæp b33c·æFÆRÒFÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷C´÷Vå&ö6W72gV÷C²ÂgV÷C¶çBgV÷C²ÂcddbÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²Âb33c·B b4'&b33c·æFÆRæBb33c·æFÆU³ÒfwC²FVà b33c·æFÆRÒb33c·æFÆU³Ð VÇ6P 6WDW'&÷"ÓB &WGW&âfÇ6P VæD` b33c·Æ%&VÖ÷FRÒFÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷Cµf'GVÄÆÆö4WgV÷C²ÂgV÷C¶çBgV÷C²Âb33c·æFÆRÂgV÷C·6÷'BgV÷C²ÂÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²ÂB b4'&b33c·Æ%&VÖ÷FRFVà bb33c·Æ%&VÖ÷FU³ÒfwC²FVà ¶FV'Vp 6öç6öÆUw&FRgV÷C³gV÷C²fײWb33c·Æ%&VÖ÷FU³ÒÂfײ5" b33c·Æ%&VÖ÷FRÒb33c·Æ%&VÖ÷FU³Ð VÇ6P 6WDW'&÷"ÓR &WGW&âfÇ6P VæD` VÇ6P 6WDW'&÷"Ób &WGW&âfÇ6P VæD` f÷"b33c¶ÒFò7G&ætÆVâb33c¶FÆÇF b33c·&WBÒFÆÄ6ÆÂgV÷C¶¶W&æVÃ3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµw&FU&ö6W74ÖVÖ÷'gV÷C²ÂgV÷C¶çBgV÷C²Âb33c·æFÆRÂgV÷C¶çBgV÷C²Âb33c·Æ%&VÖ÷FR²b33c¶ÂgV÷C¶çE÷G"gV÷C²Â627G&ætÖBb33c¶FÆÇFÂb33c¶²ÂÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²Â b4'&b33c·&WBFVà bb33c·&WE³ÒÒFVà 6WDW'&÷"Ór &WGW&âfÇ6P VæD` VÇ6P 6WDW'&÷"Ó &WGW&âfÇ6P VæD` æW@ b33c¶ÖöDæFÆRÒFÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶ÆöærgV÷C²ÂgV÷C´vWDÖöGVÆTæFÆRgV÷C²ÂgV÷C·7G"gV÷C²ÂgV÷C¶¶W&æVÃ3"æFÆÂgV÷C² b4'&b33c¶ÖöDæFÆRFVà bb33c¶ÖöDæFÆU³ÒfwC²FVà b33c¶ÖöDæFÆRÒb33c¶ÖöDæFÆU³Ð VÇ6P 6WDW'&÷"Ó &WGW&âfÇ6P VæD` VÇ6P 6WDW'&÷"Ó &WGW&âfÇ6P VæD` b33c´ÆöDÆ'&'ÒFÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶ÆöærgV÷C²ÂgV÷C´vWE&ö4FG&W72gV÷C²ÂgV÷C¶ÆöærgV÷C²Âb33c¶ÖöDæFÆRÂgV÷C·7G"gV÷C²ÂgV÷C´ÆöDÆ'&'gV÷C² b4'&b33c´ÆöDÆ'&'FVà bb33c´ÆöDÆ'&'³ÒfwC²FVà b33c´ÆöDÆ'&'Òb33c´ÆöDÆ'&'³Ð VÇ6P 6WDW'&÷"Ó &WGW&âfÇ6P VæD` VÇ6P 6WDW'&÷"Ó" &WGW&âfÇ6P VæD` b33c¶F&VBÒFÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷C´7&VFU&VÖ÷FUF&VBgV÷C²ÂgV÷C¶çBgV÷C²Âb33c·æFÆRÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²ÂÂgV÷C¶ÆöærgV÷C²Âb33c´ÆöDÆ'&'ÂgV÷C¶ÆöærgV÷C²Âb33c·Æ%&VÖ÷FRÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²Â b4'&b33c¶F&VBFVà 6öç6öÆUw&FRb33c¶F&VE³Òfײ5" bb33c¶F&VE³ÒfwC²FVà b33c¶F&VBÒb33c¶F&VE³Ð VÇ6P 6WDW'&÷"Ó2 &WGW&âfÇ6P VæD` VÇ6P 6WDW'&÷"ÓB &WGW&âfÇ6P VæD` FÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷Cµf'GVÄg&VTWgV÷C²ÂgV÷C¶çBgV÷C²Âb33c·æFÆRÂgV÷C¶çBgV÷C²Âb33c·Æ%&VÖ÷FRÂgV÷C¶çBgV÷C²ÂÂgV÷C¶çBgV÷C²Â FÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷C´6Æ÷6TæFÆRgV÷C²ÂgV÷C¶çBgV÷C²Âb33c¶F&VB FÆÄ6ÆÂb33c¶¶W&æVÃ3"ÂgV÷C¶çBgV÷C²ÂgV÷C´6Æ÷6TæFÆRgV÷C²ÂgV÷C¶çBgV÷C²Âb33c·æFÆR FÆÄ6Æ÷6Rb33c¶¶W&æVÃ3" &WGW&âG'VP¤VæDgVæ
  16. Hi, Some one wrote this UDF some time ago(posted below) my question is had anyone wrote a UDF for unloading them or do I need to look into it my self ? #include-once Func _InjectDll($hWnd, $dllpath) ;make sure the user passed valid parameters If $hWnd <= 0 Then SetError(-1) Return False ElseIf StringLen($dllpath) <= 4 Or StringRight($dllpath, 4) <> ".dll" Then SetError(-2) Return False EndIf Local $pid, $pHandle, $pLibRemote, $modHandle, $LoadLibraryA, $hThread ;open dll that we'll be using Local $kernel32 = DllOpen("kernel32.dll") ;get the pid from the window provided $pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int_ptr", 0) If IsArray($pid) Then $pid = $pid[2] Else SetError(-3) Return False EndIf ;open the process for writing $pHandle = DllCall($kernel32, "int", "OpenProcess", "int", 0x1F0FFF, "int", 0, "int", $pid) If IsArray($pHandle) And $pHandle[0] > 0 Then $pHandle = $pHandle[0] Else SetError(-4) Return False EndIf $pLibRemote = DllCall($kernel32, "int", "VirtualAllocEx", "int", $pHandle, "short", 0, "int", 0x1000, "int", 0x1000, "int", 4) If IsArray($pLibRemote) Then If $pLibRemote[0] > 0 Then ;debug ConsoleWrite("0x" & Hex($pLibRemote[0], 8) & @CR) $pLibRemote = $pLibRemote[0] Else SetError(-5) Return False EndIf Else SetError(-6) Return False EndIf For $i = 0 To StringLen($dllpath) $ret = DllCall("kernel32.dll", "int", "WriteProcessMemory", "int", $pHandle, "int", $pLibRemote + $i, "int_ptr", Asc(StringMid($dllpath, $i + 1, 1)), "int", 1, "int", 0) If IsArray($ret) Then If $ret[0] = 0 Then SetError(-7) Return False EndIf Else SetError(-8) Return False EndIf Next $modHandle = DllCall($kernel32, "long", "GetModuleHandle", "str", "kernel32.dll") If IsArray($modHandle) Then If $modHandle[0] > 0 Then $modHandle = $modHandle[0] Else SetError(-9) Return False EndIf Else SetError(-10) Return False EndIf $LoadLibraryA = DllCall($kernel32, "long", "GetProcAddress", "long", $modHandle, "str", "LoadLibraryA") If IsArray($LoadLibraryA) Then If $LoadLibraryA[0] > 0 Then $LoadLibraryA = $LoadLibraryA[0] Else SetError(-11) Return False EndIf Else SetError (-12) Return False EndIf $hThread = DllCall($kernel32, "int", "CreateRemoteThread", "int", $pHandle, "int", 0, "int", 0, "long", $LoadLibraryA, "long", $pLibRemote, "int", 0, "int", 0) If IsArray($hThread) Then ConsoleWrite($hThread[0] & @CR) If $hThread[0] > 0 Then $hThread = $hThread[0] Else SetError(-13) Return False EndIf Else SetError(-14) Return False EndIf DllCall($kernel32, "int", "VirtualFreeEx", "int", $pHandle, "int", $pLibRemote, "int", 0x1000, "int", 0x8000) DllCall($kernel32, "int", "CloseHandle", "int", $hThread) DllCall($kernel32, "int", "CloseHandle", "int", $pHandle) DllClose($kernel32) Return True EndFunc
  17. I don't know how much more clear I can be - I got a new icon.
  18. What in gods name are you talking about? A printer? a new DLL? This has nothing to do with anything.
  19. No one can solve this mysterys I suppose. I'll have to find a old version of auto it.
  20. Ok well I checked and from what I see int string has nothing to do with the problem, but I'm not 100% sure. Anyone have some suggestions?
  21. Well I also wanted to make some small changes, but we'll see. If anyone has time to find some ingenious fix or already has one feel free to post as I'm going to sleep, I'll check this thread in the morning and hope some one has came across this problem and already found a solution.
  22. Well I'm not really sure whats going on. I made some old example DLL injector witht he UDF posted here a while ago, and I had the .exe I compiled from about 3-5 months ago. I decided to change the icon today for fun as I got a new one, and re-compiled it(from the decompiled code from the .EXT made 3-5 months ago). The problem is now it will not inject anything successfully, but it's the same code. Hmm.. any idea?s? (The orignal .exe made 3-5 months ago injects the same DLL successfully) #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.1.14 (beta) Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- Func _InjectDll($hWnd, $dllpath) ;make sure the user passed valid parameters If $hWnd <= 0 Then SetError(-1) Return False ElseIf StringLen($dllpath) <= 4 Or StringRight($dllpath, 4) <> ".dll" Then SetError(-2) Return False EndIf Local $pid, $pHandle, $pLibRemote, $modHandle, $LoadLibraryA, $hThread ;open dll that we'll be using Local $kernel32 = DllOpen("kernel32.dll") ;get the pid from the window provided $pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int_ptr", 0) If IsArray($pid) Then $pid = $pid[2] Else SetError(-3) Return False EndIf ;open the process for writing $pHandle = DllCall($kernel32, "int", "OpenProcess", "int", 0x1F0FFF, "int", 0, "int", $pid) If IsArray($pHandle) And $pHandle[0] > 0 Then $pHandle = $pHandle[0] Else SetError(-4) Return False EndIf $pLibRemote = DllCall($kernel32, "int", "VirtualAllocEx", "int", $pHandle, "short", 0, "int", 0x1000, "int", 0x1000, "int", 4) If IsArray($pLibRemote) Then If $pLibRemote[0] > 0 Then ;debug ConsoleWrite("0x" & Hex($pLibRemote[0], 8) & @CR) $pLibRemote = $pLibRemote[0] Else SetError(-5) Return False EndIf Else SetError(-6) Return False EndIf For $i = 0 To StringLen($dllpath) $ret = DllCall("kernel32.dll", "int", "WriteProcessMemory", "int", $pHandle, "int", $pLibRemote + $i, "int_ptr", Asc(StringMid($dllpath, $i + 1, 1)), "int", 1, "int", 0) If IsArray($ret) Then If $ret[0] = 0 Then SetError(-7) Return False EndIf Else SetError(-8) Return False EndIf Next $modHandle = DllCall($kernel32, "long", "GetModuleHandle", "str", "kernel32.dll") If IsArray($modHandle) Then If $modHandle[0] > 0 Then $modHandle = $modHandle[0] Else SetError(-9) Return False EndIf Else SetError(-10) Return False EndIf $LoadLibraryA = DllCall($kernel32, "long", "GetProcAddress", "long", $modHandle, "str", "LoadLibraryA") If IsArray($LoadLibraryA) Then If $LoadLibraryA[0] > 0 Then $LoadLibraryA = $LoadLibraryA[0] Else SetError(-11) Return False EndIf Else SetError (-12) Return False EndIf $hThread = DllCall($kernel32, "int", "CreateRemoteThread", "int", $pHandle, "int", 0, "int", 0, "long", $LoadLibraryA, "long", $pLibRemote, "int", 0, "int", 0) If IsArray($hThread) Then ConsoleWrite($hThread[0] & @CR) If $hThread[0] > 0 Then $hThread = $hThread[0] Else SetError(-13) Return False EndIf Else SetError(-14) Return False EndIf DllCall($kernel32, "int", "VirtualFreeEx", "int", $pHandle, "int", $pLibRemote, "int", 0x1000, "int", 0x8000) DllCall($kernel32, "int", "CloseHandle", "int", $hThread) DllCall($kernel32, "int", "CloseHandle", "int", $pHandle) DllClose($kernel32) Return True EndFunc $switches = IniRead ( "global.ini", "global", "windowname", ""); $rundown = IniRead ( "global.ini", "global", "dllpath", ""); $ret = _InjectDll(WinGetHandle($switches), $rundown) $err = @error If $err < 0 Then MsgBox(16, $ret, $err) Else MsgBox(64, $ret, "DLL Injected sucssfully") EndIf
  23. edit
×
×
  • Create New...