Peter221 Posted February 14, 2015 Share Posted February 14, 2015 Hey, i would like to check for some debuggers in my script but it's not working.. here is the script expandcollapse popupwhile True If ProcessExists("Wireshark.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("ollydbg.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("idaq.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("fiddler.exe") = True then call ("_exit") EndIf WEnd while If ProcessExists("spyxx.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("devenv.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("wpe.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("wpepro.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("wpepro.net.exe") = True then call ("_exit") EndIf WEnd while True If ProcessExists("ProcessHacker.exe") = True then call ("_exit") EndIf WEnd Can anyone help me? Link to comment Share on other sites More sharing options...
water Posted February 14, 2015 Share Posted February 14, 2015 Welcome to AutoIt and the forum! What do you mean by "not working"? Can you please describe what you try to achieve with your script? Most of the time there are multiple ways to get what you want. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 (edited) Welcome to AutoIt and the forum! What do you mean by "not working"? Can you please describe what you try to achieve with your script? Most of the time there are multiple ways to get what you want. The AutoIt Script is not working when i add the Debugger check.. It says /ErrorStdOut.. I think its a stack overflow but i don't know how to fix it. Edited February 14, 2015 by Peter221 Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 Peter221, Can you post all of the console output from the run? Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 >"F:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "W:*** Source Code********* ***Stable-Sicherheitskopie-Sicherheitskopie-obfuscated.au3" >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 6.875 Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 (edited) Peter221, ProcessExists("something") is never going to equal "True" so you are stuck in the while...wend loop. You get stuck at the first while...wend loop where the program is not running. Try it this way... local $aProcesses = [ _ "Wireshark.exe", _ "ollydbg.exe", _ "idaq.exe", _ "fiddler.exe", _ "spyxx.exe", _ "devenv.exe", _ "wpe.exe", _ "wpepro.exe", _ "wpepro.net.exe", _ "ProcessHacker.exe" _ ] for $1 = 0 to UBound($aProcesses) - 1 if processexists($aProcesses[$1]) then _exit() next ConsoleWrite('No Debuggers running!' & @CRLF) func _exit() ConsoleWrite('Exiting due to debugger = ' & $aProcesses[$1] & @CRLF) Exit endfunc kylomas Edited February 14, 2015 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
water Posted February 14, 2015 Share Posted February 14, 2015 Peter221, You always need to provide as much information as possible for us to help you. This includes the full script (not just a part) so we can reproduce the problem; error messages, console output; the AutoIt version you run; the OS version plus bitness etc. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 (edited) Peter221, ProcessExists("something") is never going to equal "True" so you are stuck in the while...wend loop. You never exit the while...wend loop if one of the debuggers is not running... Try it this way... local $aProcesses = [ _ "Wireshark.exe", _ "ollydbg.exe", _ "idaq.exe", _ "fiddler.exe", _ "spyxx.exe", _ "devenv.exe", _ "wpe.exe", _ "wpepro.exe", _ "wpepro.net.exe", _ "ProcessHacker.exe" _ ] for $1 = 0 to UBound($aProcesses) - 1 if processexists($aProcesses[$1]) then _exit() next ConsoleWrite('No Debuggers running!' & @CRLF) func _exit() ConsoleWrite('Exiting due to debugger = ' & $aProcesses[$1] & @CRLF) Exit endfunc kylomas Working fine but only when i open the Debugger before i start the Program.When i start the Program first and then the Debugger the Program runs nevertheless further. When i bind it into a loop i get the same error: >"F:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "W:****** Source Code*********Stable-Sicherheitskopie-Sicherheitskopie.au3" >Exit code: 0 Time: 0.6043 Edited February 14, 2015 by Peter221 Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 Are you saying that you want to monitor for these processes in a loop? Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
water Posted February 14, 2015 Share Posted February 14, 2015 Can you please tell us why you need to check for debuggers before and while running a program? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 Awaiting your answer to water's question... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 Can you please tell us why you need to check for debuggers before and while running a program? Its a programm that connects to a website and checks a user and their password after this step its downloading 2 files from a webspace. With Fiddler your can edit the Windows Hosts file to a local database and make a echo "True" php to skip the login.. Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 Sounds like you are trying to circumvent a Web sites login. Will wait for a moderator to weigh in. Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2015 Moderators Share Posted February 14, 2015 Peter221, Its a programm that connects to a website and checks a user and their passwordCare to explain just what you are doing here? And if you have the username and password why do you want to skip the login? It all sounds very fishy to me. 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...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 (edited) Sounds like you are trying to circumvent a Web sites login. Will wait for a moderator to weigh in. Peter221, Care to explain just what you are doing here? And if you have the username and password why do you want to skip the login? It all sounds very fishy to me. M23 WTF Guys? I will block this programm in my programm.. func _DebuggerCheck() local $aProcesses = [ _ "Wireshark.exe", _ "ollydbg.exe", _ "idaq.exe", _ "fiddler.exe", _ "spyxx.exe", _ "devenv.exe", _ "wpe.exe", _ "wpepro.exe", _ "wpepro.net.exe", _ "ProcessHacker.exe" _ ] for $1 = 0 to UBound($aProcesses) - 1 if processexists($aProcesses[$1]) then _exit() next EndFunc Edited February 14, 2015 by Peter221 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2015 Moderators Share Posted February 14, 2015 Peter221,Things become clearer - fiddler.exe is a process you wish to block because it can bypass a login. Do I take it that your basic script is the one passing the username/password to a website to download some files and you do not want these intercepted? 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...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 Peter221, Things become clearer - fiddler.exe is a process you wish to block because it can bypass a login. Do I take it that your basic script is the one passing the username/password to a website to download some files and you do not want these intercepted? M23 I dont want that people find out our Webserver through the Launcher. expandcollapse popupFunc _getInformation() $VersionsInfo = "*********dl=1" $newVersion = "0.0" $Ini = InetGet($VersionsInfo,@TempDir & "\news.ini") ;download news.ini If $Ini = 0 Then ;was the download of version.ini successful? GUICtrlSetData($Label3, "ERROR: The news Server is currently offline.") Else $newVersion = IniRead (@TempDir & "\news.ini","Version","Version","") ;reads the new version out of news.ini GUICtrlSetData($Label3, $newVersion) EndIf EndFunc Func _getFiles() $VersionOne = "h*********" $VersionTwo = "h*********" $IniOne = InetGet($VersionOne,@ScriptDir & "\*********") ;download script1 $IniTwo = InetGet($VersionTwo,@ScriptDir & "\*********") ;download script2 If $IniOne = 0 Then ;was the download of version.ini successful? MsgBox(0,"ERROR","Update Server is down") EndIf If $IniTwo = 0 Then ;was the download of version.ini successful? MsgBox(0,"ERROR","Update Server is down") EndIf EndFunc Func validateacc($username, $password) $myid = ($hardwareid) $ac = "username=" $pw = "&password=" $hwid = "&HWID=" $windowsname = "&Windowsname=" $http = ObjCreate("winhttp.winhttprequest.5.1") $http.open("POST", "*********", False) $http.setrequestheader("Content-Type", "application/x-www-form-urlencoded") $http.send($ac & $username & $pw & $password & $hwid & $myid & $windowsname & $windowsnames) $received = $http.responsetext $http.close() Return $received EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2015 Moderators Share Posted February 14, 2015 (edited) Peter221,Understood. M23P.S. And I have lifted your "new member" 10 post limit - we have already used up most of them! Edited February 14, 2015 by Melba23 Fixed BB tags 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...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 (edited) Peter221, I am assuming that you want to check for the running processes iteratively. The following construct does just that. You will need to integrate it into your code. expandcollapse popup; array of process to monitor local $aProcesses = [ _ "Wireshark.exe", _ "ollydbg.exe", _ "idaq.exe", _ "fiddler.exe", _ "spyxx.exe", _ "devenv.exe", _ "wpe.exe", _ "wpepro.exe", _ "wpepro.net.exe", _ "ProcessHacker.exe" _ ] ; switch set in adlib / monitored in main loop local $bDBG = false ; check for debugger every second adlibregister('_chkdbg',1000) main() func main() while 1 ; ; going along doing whatever the main loop is doing ; if $bDBG Then ; ; oh oh, found a debugger, do something, possible just kill it ; $bDBG = false ; reset switch for next iteration EndIf sleep(1000) wend endfunc ; adlib routine / sets DBG switch at first instance of a debugger and returns func _chkdbg() for $1 = 0 to UBound($aProcesses) - 1 if processexists($aProcesses[$1]) then $bDBG = True Return endif next endfunc func _exit() Exit endfunc Edited February 14, 2015 by kylomas Peter221 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Peter221 Posted February 14, 2015 Author Share Posted February 14, 2015 Peter221, I am assuming that you want to check for the running processes iteratively. The following construct does just that. You will need to integrate it into your code. expandcollapse popup; array of process to monitor local $aProcesses = [ _ "Wireshark.exe", _ "ollydbg.exe", _ "idaq.exe", _ "fiddler.exe", _ "spyxx.exe", _ "devenv.exe", _ "wpe.exe", _ "wpepro.exe", _ "wpepro.net.exe", _ "ProcessHacker.exe" _ ] ; switch set in adlib / monitored in main loop local $bDBG = false ; check for debugger every second adlibregister('_chkdbg',1000) main() func main() while 1 ; ; going along doing whatever the main loop is doing ; if $bDBG Then ; ; oh oh, found a debugger, do something, possible just kill it ; $bDBG = false ; reset switch for next iteration EndIf sleep(1000) wend endfunc ; adlib routine / sets DBG switch at first instance of a debugger and returns func _chkdbg() for $1 = 0 to UBound($aProcesses) - 1 if processexists($aProcesses[$1]) then $bDBG = True Return endif next endfunc func _exit() Exit endfunc Working fine... Awesome man. Thanks!! 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