Tracert determines the path by sending the first Echo Request message with a TTL of 1 and
incrementing the TTL by 1 on each subsequent transmission until either the target host
responds or the maximum number of hops is reached.
This process relys on intermediate routers to return ICMP
Time Exceeded
messages. However,
some routers
do not return
Time Exceeded
messages for packets with expired TTL values and
are invisible to the tracert command. In this case, a row of asterisks (*) is displayed for that hop.
Firewalls
Many firewalls will block ICMP traffic by default. If an attacker is able to forge ICMP redirect
packets, he or she can alter the routing tables on the host and possibly subvert the security of
the host by causing traffic to flow via a path you didn't intend.
Examples
TRACERT www.doubleclick.net
TRACERT 123.45.67.89
TRACERT local_server
Get your kicks on ROUTE 66 ~ Jack Kerouac.
TYPE
Display the contents of one or more text files.
Syntax
TYPE [
drive:]
pathname(s)
If more than one file is specified the filenames are included in the output.
If a wildcard is used the filenames are not displayed.
Output can be redirected into a new file:
TYPE file.txt > Newfile.txt
Output can be appended to an existing file:
TYPE file.txt >> ExistingFile.txt
To do the same with user console input :
TYPE CON > Newfile.txt
This will require typing a CTRL-Z to indicate the end of file.
When using redirection to SORT a file the TYPE command is used implicitly
For example:
SORT < MyFile.txt
Create an empty (zero byte) file:
TYPE nul >filename.log
Check filesize during a download (to monitor progress of a large download) Since TYPE won't
lock
the file, this does not pose a threat to the download completing successfully:
TYPE
file_being_downloaded >NUL
DIR
file_being_downloaded
Convert an ASCII (Windows1252) file into a Unicode (UCS-2 le) text file:
For /f "tokens=2 delims=:" %%G in ('CHCP') do Set _codepage=%%G
CHCP 1252 >NUL
CMD.EXE /D /A /C (SET/P=ÿþ)
unicode.txt 2>NUL
CMD.EXE /D /U /C TYPE ascii_file.txt >> unicode.txt
CHCP %_codepage%
The technique above (based on a
script
by Carlos M.) first creates a file with a
Byte Order
Mark
(BOM) and then appends the content of the original file.
CHCP
is used to ensure the
session is running with the Windows1252 code page so that the characters 0xFF and 0xFE (
ÿþ
)
are interpreted correctly.
It is also possible to convert files from Unicode to ASCII with TYPE or MORE see the
redirection
syntax
page for details.
TYPE is an
internal
command.
“Writing is easy; all you do is sit staring at a blank sheet of paper until the drops of blood form
on your forehead” ~ Gene Fowler
VER
Display the current operating system version.
Syntax
VER
“Always be a first-rate version of yourself, instead of a second-rate version of somebody else”
~ Judy Garland
VERIFY
To check that files are saved to disk correctly; the system can re-read the disk when saving and
verify (compare) with the data in memory.
Syntax
VERIFY [ON | OFF]
By default the CMD shell has verify OFF
Windows Explorer will always copy with verify ON
Copying files can be up to twice as fast with verify OFF.
VERIFY without a parameter will display the current setting.
"VERIFY dummy_text" will set %ERRORLEVEL% to 1
VERIFY is an
internal
command.
“Women might be able to fake orgasms. But men can fake whole relationships” ~ Sharon Stone
VOL
Display the volume label of a disk.
Syntax
VOL [drive:]
If the drive exists, VOL will display it's disk
label
and serial number and will return an
%ERRORLEVEL% of 0.
If the drive does not exist VOL will return an %ERRORLEVEL% of 1.
If the drive is a CD/DVD drive with no disk loaded then VOL will return "The device is not ready"
and will return an %ERRORLEVEL% of 1.
VOL is an
internal
command.
“I've found the Nobel label very handy because who'd want to hear anything from Betty
Williams, ordinary housewife?” ~
Betty Williams
Nobel Prize 1976
WinDiff (Windows SDK)
Compare the contents of two files or sets of files with a graphical interface.
Syntax
windiff [
path1] [
path2]
Key
path Individual files to compare
or a directory of files to compare
If either
path
is not specified it will default to the current directory (or a matching file in the
current directory)
If nothing is specified, the GUI will appear - select files to compare with the menus.
White background = parts common to both files.
Red background = parts that belong to the file listed on the left .
Yellow background = parts that belong to the file listed on the right .
Registry files (exported with
regedit
) can also be compared. Also see the help file Windiff.hlp.
Chia sẻ với bạn bè của bạn: