我是Stack Overflow的新手,我有一项可能无法完成的任务,我无法弄明白该怎么做。我想在我的网页上放置一个DoS .bat
文件。我使用Wix.com作为我的域名提供商。我的网页可以使用html
,html5
和.swf
文件,但似乎我无法添加PHP。我没有尝试下载链接,而是交互式批处理文件。批处理文件实质上是对服务器执行ping操作。这是我正在使用的代码(虽然它还没有完成。如果您发现任何可以改进的错误或地方,请告诉我们):
@echo off
:home
cls
@echo off
title Internet Utilities
color 0c
echo devserver) shows statuses of devloper owned servers. type "help_devserver" for more info on this option.
echo example) shows status of a server set up for examples. type "help_example" for more info on this option.
echo traceroute) shows the route to the specified server type "help_tracert" for more info on this option.
echo your server name.com) replace with the name of server you wish to see the status of. This runs a ping in the server you typed in. type "help_ping" for more info on this option.
echo pingloop) directs you to enter the name of a server to run a "pingloop" on. type "help_pingloop" for more info on this option.
echo dev) creates a file named "sourcecode.dev" containing the sourcecode of this software. type "help_dev" for more info on this option.
echo help) directs you to the help menu.
echo.
echo_________________________________________________________________________________________
set /p servername=Type option or a server name:
if '%servername%'=='devserver' goto :devserver
if '%servername%'=='example' goto :example
if '%servername%'=='traceroute' goto :traceroute
if '%servername%'=='pingloop' goto :pingloop
if '%servername%'=='help_devserver' goto :help_devserver
if '%servername%'=='help_example' goto :help_example
if '%servername%'=='help_tracrt' goto :help_tracert
if '%servername%'=='help_ping' goto :help_ping
if '%servername%'=='help_pingloop' goto :help_pingloop
if '%servername%'=='help_dev' goto :help_dev
if '%servername%'=='help' goto :help
goto :pingserver
rem if a user enters a servername, they will be directed to :pingserver automatically.
:help
cls
:help_tracrt
cls
:help_dev
cls
:help_ping
cls
:help_example
cls
:help_devserver
cls
:help_pingloop
cls
:pingloop
cls
set /p pingloop=Enter the ip or name of server you wish to do a pingloop on:
echo creating pingloop files
echo @echo off>>pingloop1.bat
echo :pingloop>>pingloop1.bat
echo title Pingloop instance 1 of 4
echo ping %pingloop%>>pingloop1.bat
echo goto :pingloop>>pingloop1.bat
echo pingloop files 1 of 5 created
echo @echo off>>pingloop2.bat
echo :pingloop>>pingloop2.bat
echo title Pingloop instance 2 of 4
echo ping %pingloop%>>pingloop2.bat
echo goto :pingloop>>pingloop2.bat
echo pingloop files 2 of 5 created
echo @echo off>>pingloop3.bat
echo :pingloop>>pingloop3.bat
echo title Pingloop instance 3 of 4>>pingloop3.bat
echo ping %pingloop%>>pingloop3.bat
echo goto :pingloop>>pingloop.bat
echo pingloop files 3 of 5 created
echo @echo off>>pingloop4.bat
echo :pingloop>>pingloop4.bat
echo title Pingloop instance 4 of 4
echo ping %pingloop%>>pingloop4.bat
echo goto :pingloop>>pingloop4.bat
echo pingloop files 4 of 5 created
echo @echo off>>pingloop_closer.bat
echo echo closing Pingloops>>pingloop_closer.bat
echo del pingloop1.bat>>pingloop_closer.bat
echo del pingloop2.bat>>pingloop_closer.bat
echo del pingloop3.bat>>pingloop_closer.bat
echo del pingloop4.bat>>pingloop_closer.bat
echo del pingloop_closer.bat>>pingloop_closer.bat
echo taskkill /IM pingloop1.bat /F>>pingloop_closer.bat
echo taskkill /IM pingloop2.bat /F>>pingloop_closer.bat
echo taskkill /IM pingloop3.bat /F>>pingloop_closer.bat
echo taskkill /IM pingloop4.bat /F>>pingloop_closer.bat
echo exit>>pingloop_closer.bat
echo starting pingloop. Open pingloop_closer.bat to cancell the pingloops. do not press the red X on the windows
timeout /t 5
start pingloop1.bat
start pingloop2.bat
start pingloop3.bat
start pingloop4.bat
exit
:example
cls
echo Examples of PING reply
echo Fri 01/1/2001 01:01:01 Reply from 192.192.192.192: bytes=32 time=8ms TTL=47
pause
rem developer server status veiwer from here to end
rem ----------------------------------------------------------------------
:devserver
@echo off
cls
echo Preparing PING for required servers. Please wait.
echo If requested, your token number is %random%%random%%random%.
timeout /t 3
rem FTP server checker
:ftpserver
cls
set /p devservername= ftp.ftpdownloadservername.com
set logfile=%devservername%.data
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %devservername% -n 1 ') do (
echo
type Log_%devsevername%.log
rem END OF DEVELOPER SERVER TEST
rem -----------------------------------------------------------------------
:pingserver
cls
ping %servername%
echo directing you to home
pause
goto home
:traceroute
cls
echo please enter the name of the server you wish to trace a route to.
set /p traceserver=Enter name:
cls
tracert %traceserver%
pause
rem end of script'