dos

defend dos attack [closed]

情到浓时终转凉″ 提交于 2019-12-13 04:05:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . my website is crippled due to simple request from many ranges of ips, tens of thousands or more request per second. Is there a way to defend this kind of attack? Is there a way to trace back to the attacker? 回答1: Yes. apt-get install mod-dosevasive But this question belongs on serverfault. 来源: https:/

Batch file :: if lss is not working properly

≯℡__Kan透↙ 提交于 2019-12-13 03:56:41
问题 My code is pretty much self explanatory : @echo off set /a n=0 :doitagain set /a n+=1 echo Pinging : 10.0.0.%n% ping 10.0.0.%n% if %n% lss 255 goto doitagain pause >nul but it always pinging 10.0.0.1 so I guess tiny tweak needed here... 回答1: As npocmaka stated in his comment you always need delayed expansion when you are working with variables which are modified inside a loop. The first step is to add SETLOCAL EnableDelayedExpansion somwhere at teh beginning of your code. The second step is

TASM checking arguments when cx is modified

时光怂恿深爱的人放手 提交于 2019-12-13 02:59:50
问题 I need to check whether good amount of arguments is given. Currently my program knows when there are no arguments and when there are more than two arguments given. If one is given, then it is bad, but my program doesn't recognise it. I can't do simple check because there is one possibility when it is allowed (when /? is argument) and cx changes with loop. For example, if I call it prog /?, it should print description, when I call it prog arg1 arg2, it should be allowed, but prog arg1 shouldn

Why are these DOS Variables Empty? (e.g. %DATE%, %ERRORLEVEL%)

故事扮演 提交于 2019-12-13 01:47:55
问题 I am using Windows XP SP3. If I open a Command Prompt window, and type ECHO %DATE% I get: 14-08-2018 like I should. But If I exit Windows and boot my computer from a bootable USB Flash Drive that has DOS (real DOS, not the command prompt inside Windows), and enter the same command, then %DATE% seems to be empty. The command ECHO %DATE% replies ECHO is On Because it thinks that I just wrote ECHO , since the value returned from %DATE% is "". I tried it with 2 different DOS Versions.. Win98's

DOS FOR loop - Can I use an entire word as a delimiter (multi-character-delimiter)

不问归期 提交于 2019-12-13 01:29:54
问题 I have a source file that would look something like this: Name SerialNumber \\.\PHYSICALDRIVE1 000000002027612 \\.\PHYSICALDRIVE0 000000002027476 \\.\PHYSICALDRIVE2 00000000202746E \\.\PHYSICALDRIVE3 00000000202760E Using FOR loops in dos I need to be able to parse out just the number associated with each PHYSICALDRIVE entry to be used later in the bat file. eg: 1,0,2 and 3) From what I gather the delims= only looks at one character at a time. Since I can't say delims= PHYSICALDRIVE and have

Why does it open command prompt when i excute start hurry.bat?

时光怂恿深爱的人放手 提交于 2019-12-13 01:26:35
问题 This is about the START command in batch-files. start notepad \\ opens the notepad but not the command prompt start www.google.com \\ opens the google.com but not the command prompt start hurry.bat\\ starts executing the batch file but opens the command prompt Why so? Any reason ? Thank you in advance. 回答1: notepad.exe is a graphic user inteface (GUI) program: it interacts with the user in GUI and doesn't need the console window (command prompt). www.google.com is interpreted as an internet

Count of Files in a Directory With Count of Files in Sub Directories Also Reported

痴心易碎 提交于 2019-12-12 20:41:57
问题 I want the DOS command to find the count of files in a given directory (the count should have separate entries for the sub directories under this directory). For eg, if Tech is a directory and it has 2 files, and 2 sub-directories (Info Tech, Services), and the sub-directories have 2 files each, the my result should look like Tech 6 Info Tech 2 Services 2 It would be great if someone could help me with such a command line... 回答1: Your requirements are not clear. I'm assuming that for each

Pass by value and pass by reference in Assembly

为君一笑 提交于 2019-12-12 20:13:46
问题 I'm trying to solve this problem: Create a PROC procedure that takes one parameter as Pass by Value and prints the number of 'X' according to the number passed as a parameter. Before printing, make sure parameter is a positive number, at end of program you need to change the registers that have been used back to their first values . If the input to the procedure is 5 then the output on the console should be: XXXXX This is my code: var db 5 ;In the dataseg push [var] ;in the codeseg proc

script to move all files from one location to another location

落爺英雄遲暮 提交于 2019-12-12 17:19:05
问题 can someone help me with a dos script to move all files from one location to another location 回答1: move <sourcepath>\*.* <destpath> IE, if you wanted to move all files from c:\test\ to c:\test2 move c:\test\*.* c:\test2 if you want to suppress the prompt to overwrite files move /Y c:\test\*.* c:\test2 If you want to move from the current directory, you can specify just the *.* . Also you can do relative paths. So if you want to move the current directory's files up one directory, you'd do

(MS-DOS) Time Delays

吃可爱长大的小学妹 提交于 2019-12-12 17:17:54
问题 I came past a few ways to cause a time delay such as pings and dirs. Though none of them are really precise, is there anny proper way to cause a time delay? I heard about a few things though they don't work on all computers, not on my Windows XP nor the Windows NT at college. It takes ages going through all files on Google finding a good answer, and since I didn't yet find the question on Stack Overflow I thought it might be good to just create the question myself ;) 回答1: Sleep It will allow