@echo off title 進程管理 color 3F echo 進程管理 批處理小型化版 echo. echo lxsea 基拉 freedom echo 適用于任務管理器無法打開的簡單操作和平時的病毒判斷 echo www.lxsea.com tasklist pause color B1 echo 保存資料(將在此目錄下生成.csv文件) echo. echo 如果你以前保存過資料 將會對現(xiàn)在和以前的資料進行比較 請注意看比較結果 echo. echo 每使用一次 就會對進程的文件進行更新 echo. echo 第二次使用會把tasklist1改為tasklist0 ,下一次進行就會把tasklist0刪除,循環(huán)往復 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 停止進程 根據PID結束 echo 進程ID可看上表的數據 echo 停止有危險 請慎重選擇 echo 如不想操作 請直接關閉 color FC set Output= set /p Enter=請輸入PID: NTSD -C Q -P %Enter% echo 歡迎光臨理想技術論壇 www.lxsea.com pause :end
這個是用于比較文件的批處理(現(xiàn)在看來簡直幼稚啊):
復制代碼 代碼如下:
@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. 第一次運行將會產生0.txt 記錄exe以及dll文件 echo. 第二次將會產生1.txt 并自動與0.txt進行比對 echo. 用來判斷是否產生新文件 echo. 這樣做是因為system32為病毒喜愛躲藏點 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=按回車鍵 進行文件的比較 cls color 8F echo. 出現(xiàn)差異 則會出現(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的其他內容相同 echo. 說明0.txt與1.txt不同的是 0.txt中多了123.dll和12.exe這兩個文件 這是要注意了! set /p j=按回車鍵 開始 fc 0.txt 1.txt :end set /p =按回車鍵退出
尋找文件(這個是隨便玩玩的..........其實用p找文件 不用這么煩的)
復制代碼 代碼如下:
::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.查看文件列表(只查看當前目錄) echo. echo 2.打開文件(當前目錄及內部均可) set /p j=請輸入字母序號(直接按回車退出): if %j% equ 1 goto :fin if %j% neq 2 echo 序號錯誤&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
這個是最近寫的 禁止程序運行 用的是ws2_32.dll法 IFEO懶得寫了..........
復制代碼 代碼如下:
::madeby基拉freedom 批處理之家 20090812 @echo off&setlocal ENABLEDELAYEDEXPANSION title 利用WS2_32.dll來阻止文件運行 批處理之家 echo. echo 利用ws2_32.dll阻止程序運行 echo. echo 程序并不完美 只是厭倦了IFEO而做的 echo. echo 對于綠色程序 或不調用此dll的無效 echo. :new echo 1.禁用程序 echo 2.查看禁用列表 echo 3.刪除禁用程序 set cho= set /p cho=輸入1~3: if %cho% equ 1 goto mdd if %cho% equ 2 goto viewd if %cho% equ 3 goto deld echo 你沒有乖乖輸入哦 goto new :qs echo 都有了還耍我啊~換個地址 :mdd set place= :check set /p place=輸入文件所在的目錄地址(如D:/exe): if exist c:/bad find "%place%" c:/bad.txt>nul &&goto qs if not exist "%place%" goto check md "%place%"/ws2_32.dll/fr../ echo %place%>>c:/bad.txt echo 建立完了~~~~~~ pause>nul cls goto new :bads echo 沒有這個程序哎 看看表吧 pause>nul :viewd if not exist "c:/bad.txt" goto wro type c:/bad.txt pause>nul cls goto new :wro echo 你沒有運行過這個程序或者文檔已丟失 不好意思啊~~ pause>nul cls goto new :deld set kill= set /p kill=輸入要刪除的程序的路徑: find "%kill%" c:/bad.txt>nul ||goto bads rd "%kill%/ws2_32.dll" /s /q echo. >tem.txt @for /f "tokens=* delims=" %%i in ('findstr /i /v /c:%kill% c:/bad.txt') do ( set var=%%i echo !var!>>tem.txt ) copy tem.txt c:/bad.txt >nul echo 完成啦 pause>nul cls goto new