Yeik Posted March 3, 2008 Share Posted March 3, 2008 I know sometimes while browsing, people tend to get bugs on their computers, or viruses, some are harmless, but not all are caught by the AV, if you notice a process you can't kill, or you kill and respawns, you can never quite get it unless you reboot into safe mode. Here is a concept script to help get rid of such files, i made it so the code sends the file to the recycling bin, so that if you wanted to see the file, instead of totally delete it you could restore it, and send it to the Av company or an adware company. Its very simple, let me know what everybody thinks, if people like it i will look into making sure it either sets attributes to the file so it can't be executed, and also checking files that get set so they can't be deleted, and digging through for child processes. #include <Process.au3> _getprocname() func _getprocname() local $procid $PROCNAME =InputBox("Kill Process", "process name", "", "") $procid = ProcessExists($PROCNAME) If $procid Then _KILLPROC(_ProcessGetLocation($procid), $procid, _ProcessGetName($procid)) EndFunc Func _ProcessGetLocation($iPID) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If $aProc[0] = 0 Then Return SetError(1, 0, '') Local $vStruct = DllStructCreate('int[1024]') DllCall('psapi.dll', 'int', 'EnumProcessModules', 'hwnd', $aProc[0], 'ptr', DllStructGetPtr($vStruct), 'int', DllStructGetSize($vStruct), 'int*', 0) Local $aReturn = DllCall('psapi.dll', 'int', 'GetModuleFileNameEx', 'hwnd', $aProc[0], 'int', DllStructGetData($vStruct, 1), 'str', '', 'int', 2048) If StringLen($aReturn[3]) = 0 Then Return SetError(2, 0, '') Return $aReturn[3] EndFunc func _KILLPROC($Proclocation, $procid, $procname) local $ds ProcessClose($procid, 1) $ds=FileRecycle($Proclocation) MsgBox(4096, "process", $Proclocation & " "& $ds) $PID = ProcessExists($procname) EndFunc func get_quote() local $quote switch random(1, 3, 1) case 1 $quote = '"' & "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, " & _ "design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give " & _ "orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, " & _ "fight efficiently, die gallantly. Specialization is for insects." & '"' & " Robert A. Heinlein" case 2 $quote = '"' & "Within each of us lies the power of our consent to health and sickness, to riches and poverty, to freedom " & _ "and to slavery. It is we who control these, and not another." & '"' & " Richard Bach (Illusions)" case 3 $quote ='"' & "Don't handicap your children by making their lives easy." & '"' & " Robert A. Heinlein" EndSwitch MsgBox(0, "Quote for the moment", $quote & @CRLF) EndFunc get_quote() Link to comment Share on other sites More sharing options...
WolfWorld Posted March 4, 2008 Share Posted March 4, 2008 Very nice or you can send it to a place that not it origin place and it will not respawns or just rename it. and create a blank file instead of it then kill the process and it will not respawns also Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! 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