@echo off title 進(jìn)程管理 color 3F echo 進(jìn)程管理 批處理小型化版 echo. echo lxsea 基拉 freedom echo 適用于任務(wù)管理器無法打開的簡單操作和平時(shí)的病毒判斷 echo www.lxsea.com tasklist pause color B1 echo 保存資料(將在此目錄下生成.csv文件) echo. echo 如果你以前保存過資料 將會(huì)對現(xiàn)在和以前的資料進(jìn)行比較 請注意看比較結(jié)果 echo. echo 每使用一次 就會(huì)對進(jìn)程的文件進(jìn)行更新 echo. echo 第二次使用會(huì)把tasklist1改為tasklist0 ,下一次進(jìn)行就會(huì)把tasklist0刪除,循環(huán)往復(fù) pause if exist tasklist0.csv del /q tasklist0.csv if exist tasklist1.csv ren tasklist1.csv tasklist0.csv tasklist/fo:csv>tasklist1.csv if exist tasklist0.csv fc tasklist1.csv tasklist0.csv echo 停止進(jìn)程 根據(jù)PID結(jié)束 echo 進(jìn)程ID可看上表的數(shù)據(jù) echo 停止有危險(xiǎn) 請慎重選擇 echo 如不想操作 請直接關(guān)閉 color FC set Output= set /p Enter=請輸入PID: NTSD -C Q -P %Enter% echo 歡迎光臨理想技術(shù)論壇 www.lxsea.com pause :end
這個(gè)是用于比較文件的批處理(現(xiàn)在看來簡直幼稚啊):
復(fù)制代碼 代碼如下:
@echo off color FC title 檢查C:/WINDOWS/system32下的dll文件和exe文件 echo. ------------------------------------------------------------------------------- echo. 檢查 echo. C:/WINDOWS/system32下的dll文件和exe文件 echo. made by 基拉freedom echo. wwww.lxsea.com 歡迎光臨 echo. ------------------------------------------------------------------------------- echo. 第一次運(yùn)行將會(huì)產(chǎn)生0.txt 記錄exe以及dll文件 echo. 第二次將會(huì)產(chǎn)生1.txt 并自動(dòng)與0.txt進(jìn)行比對 echo. 用來判斷是否產(chǎn)生新文件 echo. 這樣做是因?yàn)閟ystem32為病毒喜愛躲藏點(diǎn) if not exist 0.txt goto begin rem 判斷是否有0.txt if exist 1.txt del 1.txt rem 判斷是否有1.txt 有則刪除 ren 0.txt 1.txt rem 將0.txt改為1.txt :begin dir /B /A: C:/WINDOWS/system32/*.exe >0.txt & dir /B /A: C:/WINDOWS/system32/*.dll >>0.txt rem 以上/A:是顯示全部文件的意思 echo. echo. echo ┌────────────────────────────────────┐ set/p= ■<nul for /L %%i in (1 1 20) do set /p a=■<nul&ping /n 1 127.0.0.1>nul echo 100%% echo └────────────────────────────────────┘ IF ERRORLEVEL 1 echo 失敗了 也許是您的系統(tǒng)不是裝在C盤 IF ERRORLEVEL 0 echo 成功創(chuàng)建 if not exist 1.txt goto end set /p s=按回車鍵 進(jìn)行文件的比較 cls color 8F echo. 出現(xiàn)差異 則會(huì)出現(xiàn)(舉例): echo. ***** 0.txt---------文件0.txt echo. ***** 1.TXT---------文件1.txt echo. 123.dll-------------文件0.txt中與1.txt的不同 echo. 12.exe--------------文件0.txt中與1.txt的不同 echo. *****---------------除以上的 1.txt與0.txt的其他內(nèi)容相同 echo. 說明0.txt與1.txt不同的是 0.txt中多了123.dll和12.exe這兩個(gè)文件 這是要注意了! set /p j=按回車鍵 開始 fc 0.txt 1.txt :end set /p =按回車鍵退出
尋找文件(這個(gè)是隨便玩玩的..........其實(shí)用p找文件 不用這么煩的)
復(fù)制代碼 代碼如下:
::code by 基拉freedom @www.lxsea.com ::made in 2009_7_2 @echo off setlocal EnableDelayedExpansion goto new :start set o= set j= set wen= set /p cc= :new echo. echo 幫助你尋找文件 echo. echo 1.查看文件列表(只查看當(dāng)前目錄) echo. echo 2.打開文件(當(dāng)前目錄及內(nèi)部均可) set /p j=請輸入字母序號(直接按回車退出): if %j% equ 1 goto :fin if %j% neq 2 echo 序號錯(cuò)誤&cls&goto :start :wen for /f "delims=" %%a in ('dir /b /s') do echo %%a >>1.txt set /p wen=你要找的文件是什么? for /f "eol=- " %%i in ('find "%wen%" 1.txt') do echo 文件位置:%%i&start %%i set /p o=是否繼續(xù)查找文件(Y/N): if /i %o%=="Y" goto :wen del 1.txt /q cls goto start :fin cls dir /a: set /p o=是否查找文件(Y/N): if /i %o%==Y goto :wen else goto :fin cls if /i %o%==N goto :start pause