Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/01/2011 in all areas

  1. I've done a few versions of this idea, think I may have posted one a while back, but this is my latest take on it. I use it to help remove spyware that likes to keep popping up, and that like to suppress other apps from running. To use it, just run it and double-click the process you want killed, and click as many as you need to kill. For a little extra "bang", run it with the "/nuke" switch and it will kill everything not set as an exception in an effort to kill whatever may prevent it from starting normally. $exceptionList has many, but probably not all, vital processes for WinXP and Win7, I have not tested it on WinVista but can't imagine there would be problems. However, anybody who has suggestions on additions/removals from the exception list please let me know. For that matter, any improvements at all are welcome. I compile this as PPK3, if you are going to compile it as something different, make sure you replace "PPK3.exe" in the $exceptionList or it will kill itself as soon as possible Enjoy #NoTrayIcon #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Run_Tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** ;~ Coded by Ian Maxwell (llewxam) ;~ AutoIt 3.3.6.1 #include <WindowsConstants.au3> ;needed for $WS_CAPTION, $WS_VSCROLL, $WM_COMMAND #include <array.au3> ;needed for _ArrayAdd, _ArrayDelete, _ArrayUnique, _ArraySort, _ArrayBinarySearch #include <ProgressConstants.au3> ;needed for $PBS_SMOOTH, $PBS_MARQUEE #include <GuiListBox.au3> ;needed for $LBS_NOTIFY, $LBS_SORT, $LBS_NOSEL, $GUI_RUNDEFMSG, _GUICtrlListBox_* functions AdlibRegister("_Alive", 50) AdlibRegister("_Scan") $exceptionList = "PPK3.exe,[System Process],System,smss.exe,csrss.exe,wininit.exe,csrss.exe,services.exe,winlogon.exe,lsass.exe,lsm.exe,svchost.exe,atiesrxx.exe,audiodg.exe,CTAudSvc.exe,atieclxx.exe,spoolsv.exe,taskhost.exe,dwm.exe,explorer.exe,rundll32.exe,GoogleCrashHandler.exe,MOM.exe,CCC.exe,SearchIndexer.exe,wmpnetwk.exe,SearchProtocolHost.exe,SearchFilterHost.exe,dllhost.exe,mpcmdrun.exe,msiexec.exe,unsecapp.exe,vds.exe,WmiPrvSE.exe" $exceptions = StringSplit($exceptionList, ",") ;list of what not to kill Local $pList[1] ;list of running processes $pListOld = $pList ;to compare a previous process list, so $liveProc is only updated if the process list changes Local $killList[1] ;list of processes to kill $liveProcCount = 0 ;tally of processes running $killProcCount = 0 ;tally of processes to be killed $killListTrimmed = False ;flag for detecting when $killList has been trimmed $goNuclear = False ;flag set by /nuke command line switch $started = False ;used in Nuke mode to avoid crashes due to no GUI ;check for and run nuke If $CmdLine[0] Then ;many viruses/spyware apps suppress EXEs from running, nuke mode is meant to sneak For $c = 1 To $CmdLine[0] ;PPK in before it can be suppressed. Just run "ppk /nuke" or "ppk nuke" repeatedly until it starts If StringLower($CmdLine[$c]) == "/nuke" Or StringLower($CmdLine[$c]) == "nuke" Then $goNuclear = True Next EndIf If $goNuclear == True Then $pListRaw = ProcessList() If @error Then MsgBox(48, "ERROR", "The process list could not be built!") Exit EndIf Local $pListTemp[1] ;used to get the list of running processes down to a 1-dimensional array For $a = 1 To $pListRaw[0][0] _ArrayAdd($pListTemp, $pListRaw[$a][0]) Next _ArrayDelete($pListTemp, 0) $pList = _ArrayUnique($pListTemp) If $pList[0] > 0 Then Local $killList[1] For $a = 1 To $pList[0] For $b = 1 To $exceptions[0] If StringLower($pList[$a]) == StringLower($exceptions[$b]) Then ContinueLoop (2) Next _Execute($pList[$a]) _ArrayAdd($killList, $pList[$a]) Next EndIf _ArrayDelete($killList, 0) $goNuclear = False EndIf ;configure GUI $vert = ((@DesktopHeight - 80) / 3) - 40 $PPKGUI = GUICreate("Persistent Process Killer", 200, @DesktopHeight - 70, @DesktopWidth - 205, 0, $WS_CAPTION) $alive = GUICtrlCreateProgress(5, 5, 190, 20, BitOR($PBS_SMOOTH, $PBS_MARQUEE)) ;just to let the user know the app is still running $aliveStatus = 0 $closeButton = GUICtrlCreateButton("Close", 75, 35, 50, 20) $liveProcLabel = GUICtrlCreateLabel("Running Processes:", 5, 65, 190) $liveProc = GUICtrlCreateList("", 5, 80, 190, $vert, BitOR($WS_VSCROLL, $LBS_NOTIFY, $LBS_SORT)) $killProcLabel = GUICtrlCreateLabel("Processes to Kill:", 5, $vert + 85, 190) $killProc = GUICtrlCreateList("", 5, $vert + 100, 190, $vert, BitOR($WS_VSCROLL, $LBS_NOTIFY, $LBS_SORT)) GUICtrlCreateLabel("Errors:", 5, $vert * 2 + 105) $errors = GUICtrlCreateList("", 5, $vert * 2 + 120, 190, $vert, BitOR($WS_VSCROLL, $LBS_SORT, $LBS_NOSEL)) GUISetState(@SW_SHOW, $PPKGUI) GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") WinSetOnTop("Persistent Process Killer", "", 1) ;perform initial scan for running processes $pListRaw = ProcessList() If @error Then MsgBox(48, "ERROR", "The process list could not be built!") Exit EndIf Local $pListTemp[1] For $a = 1 To $pListRaw[0][0] _ArrayAdd($pListTemp, $pListRaw[$a][0]) Next _ArrayDelete($pListTemp, 0) $pList = _ArrayUnique($pListTemp) If $pList[0] > 0 Then For $a = 1 To $pList[0] For $b = 1 To $exceptions[0] If StringLower($pList[$a]) == StringLower($exceptions[$b]) Then ContinueLoop (2) Next GUICtrlSetData($liveProc, $pList[$a]) $liveProcCount += 1 Next EndIf GUICtrlSetData($liveProcLabel, "Running Processes: " & $liveProcCount) For $a = 1 To UBound($killList) - 1 GUICtrlSetData($killProc, $killList[$a]) $killProcCount += 1 Next GUICtrlSetData($killProcLabel, "Processes to Kill: " & $killProcCount) $started = True ;now all GUI controls will be used ;main loop Do $msg = GUIGetMsg() If $msg = $closeButton Then _Exit() For $a = 1 To UBound($killList) - 1 ;placed this check at beginning and end of loop so when $killList is decreased an out-of-range error will be avoided If $killListTrimmed == True Then $killListTrimmed = False ExitLoop EndIf If ProcessExists($killList[$a]) Then _Execute($killList[$a]) EndIf If $killListTrimmed == True Then $killListTrimmed = False ExitLoop EndIf Next Until 1 = 2 Func _Scan() If $started == True Then $pListOld = $pList $pListRaw = ProcessList() If @error Then MsgBox(48, "ERROR", "The process list could not be built!") Exit EndIf Local $pListTemp[1] For $a = 1 To $pListRaw[0][0] _ArrayAdd($pListTemp, $pListRaw[$a][0]) Next _ArrayDelete($pListTemp, 0) $pList = _ArrayUnique($pListTemp) If $pList[0] > 0 Then $refresh = False ;assume a refresh of $liveProc is not needed If $pList[0] <> $pListOld[0] Then $refresh = True ;different number of elements = refresh needed Else For $z = 1 To $pList[0] If $pList[$z] <> $pListOld[$z] Then $refresh = True ;something is not matching up, so a refresh is needed Next EndIf If $refresh = True Then $liveProcCount = 0 _GUICtrlListBox_BeginUpdate($liveProc) _GUICtrlListBox_ResetContent($liveProc) For $a = 1 To $pList[0] For $b = 1 To $exceptions[0] If StringLower($pList[$a]) == StringLower($exceptions[$b]) Then ContinueLoop (2) Next _GUICtrlListBox_AddString($liveProc, $pList[$a]) $liveProcCount += 1 Next _GUICtrlListBox_EndUpdate($liveProc) GUICtrlSetData($liveProcLabel, "Running Processes: " & $liveProcCount) EndIf EndIf EndIf Return EndFunc ;==>_Scan Func _Execute($victim) $killed = False $delay = TimerInit() Do ProcessClose($victim) If @error Then $status = @error Else $killed = True ExitLoop EndIf Sleep(50) Until TimerDiff($delay) > 1000 If $killed = False Then If $started == True Then GUICtrlSetData($errors, $victim & " could not be killed! (" & $status & ")") _ArraySort($killList) $index = _ArrayBinarySearch($killList, $victim) _ArrayDelete($killList, $index) _GUICtrlListBox_BeginUpdate($killProc) _GUICtrlListBox_ResetContent($killProc) For $a = 1 To UBound($killList) - 1 GUICtrlSetData($killProc, $killList[$a]) Next _GUICtrlListBox_EndUpdate($killProc) $killProcCount -= 1 GUICtrlSetData($killProcLabel, "Processes to Kill: " & $killProcCount) $killListTrimmed = True EndIf EndIf Return EndFunc ;==>_Execute Func _liveProc_DoubleClick() $sListItem = GUICtrlRead($liveProc) If $sListItem <> "" Then _ArrayAdd($killList, $sListItem) $killProcCount += 1 GUICtrlSetData($killProc, $sListItem) GUICtrlSetData($killProcLabel, "Processes to Kill: " & $killProcCount) EndIf Return EndFunc ;==>_liveProc_DoubleClick Func _killProc_DoubleClick() $sListItem = GUICtrlRead($killProc) If $sListItem <> "" Then $killProcCount = 0 _ArraySort($killList) $index = _ArrayBinarySearch($killList, $sListItem) _ArrayDelete($killList, $index) _GUICtrlListBox_BeginUpdate($killProc) _GUICtrlListBox_ResetContent($killProc) For $a = 1 To UBound($killList) - 1 GUICtrlSetData($killProc, $killList[$a]) $killProcCount += 1 Next _GUICtrlListBox_EndUpdate($killProc) GUICtrlSetData($killProcLabel, "Processes to Kill: " & $killProcCount) $killListTrimmed = True EndIf Return EndFunc ;==>_killProc_DoubleClick Func _WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0xFFFF) Local Const $LBN_DBLCLK = 2 Switch $nID Case $liveProc Switch $nNotifyCode Case $LBN_DBLCLK _liveProc_DoubleClick() EndSwitch Case $killProc Switch $nNotifyCode Case $LBN_DBLCLK _killProc_DoubleClick() EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>_WM_COMMAND Func _Alive() If $started = True Then $aliveStatus += 2 If $aliveStatus > 102 Then $aliveStatus = 0 GUICtrlSetData($alive, $aliveStatus) EndIf Return EndFunc ;==>_Alive Func _Exit() $reallyQuit = MsgBox(4, "Quit?", "Are you sure you want to quit?") If $reallyQuit = 6 Then Exit Return EndFunc ;==>_Exit
    1 point
  2. Please see my second suggestion with compiling the code as an EXE. Edit: Typo.
    1 point
  3. So you want your GUI to launch the "DynDns Updater" whenever a specific button is pressed in your GUI? Your program to launch a different program? Just trying to understand exactly what you're wanting
    1 point
  4. Where did you 'take' the code from? Please post the link. About your question you firstly can't use Run how you're trying to do it, Run is used for running an external program not code.You firstly need to learn the basics of AutoIt before you should continue. I would suggest learning about Functions in the Help file & reading these tutorials >> http://www.autoitscript.com/wiki/Tutorials OR Compile that code and then rename it as 'DNSSomething.exe' and then use Run.
    1 point
  5. wraithdu

    Latest Beta

    Looks like he mangled the structure, based on his comments. He needs to fix that back to the API's spec and with respect to nested structures in the AutoIt betas, ie the DllStructCreate keywords STRUCT/ENDSTRUCT.
    1 point
  6. bumitrue93, I am afraid I cannot help with the IE questions - but I can with the "immoveable GUI" part. You need to intercept the SC_MOVE message like this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate("") GUISetState() GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) If BitAND($wParam, 0xFFF0) = 0xF010 Then Return False ; $SC_MOVE Return $GUI_RUNDEFMSG EndFuncIf you are not too familar with GUIRegisterMsg I recommend the GUIRegisterMsg tutorial in the Wiki. M23
    1 point
  7. According to the help file: "Both $s_LocalFile and $s_RemoteFile may be partial or fully qualified names relative to the current directory." So I think it is best to specifiy the whole path for the file to be transmitted. On the FTP server I think you just want the filename + extension. Example: The User selects "C:temptest.txt" so the statement will resolve to: $Ftpp = _FTP_FilePut($Conn, "C:temptest.txt", "/numeroussilhouettes/UploadFolder/temp.txt") Make a small test script with the code and try if it works as you expect.
    1 point
  8. Not tested but this should allow to transfer a single file. FileOpenDialog returns the full path of the selected file. Therefore you have to split it into pieces using _PathSplit.#include <file.au3> Global $sDrive, $sDir, $sFName, $sExt ;Uploading Features If StringInStr($msg, "UPLOAD:") Then $Uploadvar = FileOpenDialog($uploadmessage, @WindowsDir & "", "Music (*.mp3;*.zip)") If @error Then MsgBox(4096, "", "No File(s) chosen") Else MsgBox(0, "", "You chose " & $Uploadvar) _PathSplit($Uploadvar, $sDrive, $sDir, $sFName, $sExt) $Open = _FTP_Open('AcruX-FTP') $Conn = _FTP_Connect($Open, $server, $username, $pass, $i_Passive, $port) $Ftpp = _FTP_FilePut($Conn, $Uploadvar, "/numeroussilhouettes/UploadFolder/" & $sFName & $sExt) $Ftpc = _FTP_Close($Open) EndIf EndIf
    1 point
  9. Tutorials - AutoIt Wiki
    1 point
  10. This worked for me. IE ver. 8, AutoIt ver. 3.3.4.0. #include <IE.au3> $oIE = _IECreate("http://www.origin.com/us/change-id") _IELinkClickByText ($oIE, "Login")
    1 point
  11. Doesn't netstat -f provide you with basic information you need?
    1 point
  12. Hello i dont know, who know it, or who dont know, but i created a script what update your script.You can add it to a button or just when started. IniWrite(@ScriptDir "\ver.ini", "section", "key", "1.0") ;------------------------------------------------------- if you created the ini delete that line!!!! InetGet("YOURWEBSITELINK/VER.INI", @ScriptDir & "\ver.ini") $ver = IniRead(@ScriptDir & "\ver.ini", "section", "key", "1.0") If $ver > "0.9" Then InetGet("YOURWEBSITELINK/YOURPROGRAM.EXE", @ScriptDir & "\YOURPROGRAM.EXE") EndIf So.It is downloads an ini, and in the ini 1.0. If $ver bigger than 0.9 then downloads your exe, and overwrites your program. Sorry for my bad english.
    1 point
  13. Hmm, .. free language, non paid people who give you this language to use as you see fit and ask nothing of you..I think you should choose your words more carefully. I don't think your whining wishes should really be aired in the General Help section. I'll say no more and move on!
    1 point
  14. mmm that too (that is what happens with the lengthy script ... you only look at it briefly and make stupid remarks)
    1 point
  15. Valik

    Asking for source

    This is regards to the much debated "asking for source" topic. Until further notice, here's how it works. You ask for the source to somebodies script or say something along the lines "no source, I'm not running it" you are going to get a 3 day ban. If you don't want to run something because it doesn't have source code, fine, we don't care so don't post telling us about it. Remember, YOU do not make the rules on this forum. YOU do not dictate what can and can not be posted. YOU do not own the rights to people's work and YOU do not tell people what they can do with their intellectual property. People have the right to post scripts on this forum without posting the source. If you don't agree with that policy, well, too bad, nobody cares so keep it quiet. This is your warning. Violators will be shot, et cetera.
    1 point
×
×
  • Create New...