AWVS、Nessus 一键启动-停止BAT脚本(一键启动停止程序)

目前Nessus 和 AWVS都是以windows服务形式进行启动、关闭的,默认开机自动启动,但是并不是每天工作都要使用这两者,所以设置开机不启动;
需要开启时候需要到Windows服务中进行手动启动或者使用DOS命令启动,比较麻烦,参考网上资料弄个脚本来控制Nessus 和 AWVS服务的启动关闭。

AWVS、Nessus 一键启动-停止脚本.bat

@echo off

mode con lines=30 cols=60

color 2f

:main

cls



echo.-----------------------------------------------------------

echo.请选择使用:

echo.

echo. 1.启动Awvs (即在下面输入1)

echo.

echo. 2.停止Awvs (即在下面输入2)

echo.

echo. 3.启动Nessus (即在下面输入3)

echo.

echo. 4.停止Nessus (即在下面输入4)

echo.-----------------------------------------------------------



if exist "%SystemRoot%\System32\choice.exe" goto Win7Choice



set /p choice=请输入数字并按回车键确认:



echo.

if %choice%==1 goto A

if %choice%==2 goto B

if %choice%==3 goto C

if %choice%==4 goto D



cls

"set choice="

echo 您输入有误,请重新选择。

goto main



:Win7Choice

choice /c 1234 /n /m "请输入相应数字:"

if %errorlevel% == 4 goto D

if %errorlevel% == 3 goto C

if %errorlevel% == 2 goto B

if %errorlevel% == 1 goto A

cls

goto main



:A

cls

color 2f

net start Acunetix

net start "Acunetix Database"

echo.-----------------------------------------------------------

echo.

echo 成功启动 "Acunetix","Acunetix Database" 服务!

echo.

goto end





:B

cls

color 2f

net stop Acunetix

net stop "Acunetix Database"

echo.-----------------------------------------------------------

echo.

echo 成功关闭 "Acunetix","Acunetix Database" 服务!

echo.

goto end





:C

cls

color 2f

net start "Tenable Nessus"

echo.-----------------------------------------------------------

echo.

echo 成功启动 "Tenable Nessus" 服务!

echo.

goto end





:D

cls

color 2f

net stop "Tenable Nessus"

echo.-----------------------------------------------------------

echo.

echo 成功关闭 "Tenable Nessus" 服务!

echo.

goto end





:end

echo 请按任意键退出。

@Pause>nul

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注