|
这么笼统,没任何测试信息吗?
@echo off
color 1f
Title XP端口-进程查询——-andysky
setlocal enabledelayedexpansion
echo.
echo ╔- -╗
echo 本机开放的端口及使用该端口的进程
echo ╚- -╝
echo ------------------------------------
echo 端口号 进程名称
ECHO TCP协议:
for /F "usebackq skip=4 tokens=2,5" %%i in (`"netstat -ano -p TCP"`) do (
call :Assoc %%i TCP %%j
echo !TCP_Port! !TCP_Proc_Name!
)
ECHO UDP协议:
for /F "usebackq skip=4 tokens=2,4" %%i in (`"netstat -ano -p UDP"`) do (
call :Assoc %%i UDP %%j
echo !UDP_Port! !UDP_Proc_Name!
)
echo.
echo ————————————————————————
echo ※※※※※ andysky设计 ※※※※※
echo ————————————————————————
echo.
echo 按任意键退出程序,产生的临时文件自动清理。
pause>nul
del C:\百宝箱6.0简体\del.bat
echo.
:Assoc
for /F "tokens=2 delims=:" %%e in ("%1") do (
set %2_Port=%%e
)
for /F "skip=2 usebackq delims=, tokens=1" %%a in (`"Tasklist /FI "PID eq %3" /FO CSV"`) do (
set %2_Proc_Name=%%~a
)
'-----------------------------------------------------------------------------------------------------
@echo off
:star
cls
color 1A
title 隐藏磁盘驱动器
echo.
echo.
echo ●█〓██▄▄▄▄▄▄ ●●●●●● 攻陷靖国神厕
echo ▄▅██████▅▄▃▂
echo ██████████████
echo ◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲◤
echo.
echo 选择需隐藏或者显示的磁盘
echo.
echo (1) 隐藏本地 C盘
echo (2) 隐藏本地 D盘
echo (3) 隐藏本地 E盘
echo (4) 隐藏本地 F盘
echo (5) 隐藏本地所有磁盘
echo (6) 显示所有磁盘
echo (7) 退出程序
echo.
set /p ii=请填入相应的数字:
set ii=%ii:~-1%
if #%ii%==#1 goto c
if #%ii%==#2 goto d
if #%ii%==#3 goto e
if #%ii%==#4 goto f
if #%ii%==#5 goto all
if #%ii%==#6 goto alll
if #%ii%==#7 goto end
cls
echo.
echo.
echo 请输入数字
pause>null
goto star
:c
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:04,00,00,00 >>1.reg
echo "NoViewOnDrive"=hex:04,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo.
echo 已隐藏C盘
goto end
:d
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:08,00,00,00 >>1.reg
echo "NoViewOnDrive"=hex:08,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo.
echo 已隐藏D盘
goto end
:e
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:10,00,00,00 >>1.reg
echo "NoViewOnDrive"=hex:10,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo.
echo 已隐藏E盘
goto end
:f
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:20,00,00,00 >>1.reg
echo "NoViewOnDrive"=hex:20,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo.
echo 已隐藏F盘
goto end
:all
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:ff,ff,ff,ff >>1.reg
echo "NoViewOnDrive"=hex:ff,ff,ff,ff >>1.reg
regedit /s 1.reg
del /f 1.reg
echo.
echo 已隐藏所有磁盘
goto end
:alll
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:00,00,00,00 >>1.reg
echo "NoViewOnDrive"=hex:00,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo 已显示所有磁盘
:end
pause
del C:\百宝箱5.0简体\hide.bat
全是自定义函数吗?是否会涉及版本与系统问题?
自己各项检查核对下可执行性吧......
|
|