Windows OS

网络 [edit]

Netstat [edit]

利用中のポート番号を確認する

Netstat -nao

arp [edit]

arp -a 或者是 arp -g 就得到一个IP地址和Mac地址的对应表

arp -a 192.168.1.2

接口: 192.168.1.2 --- 0x3
  Internet 地址         物理地址              类型
  192.168.1.2           00-88-1f-24-87-48     动态

查看局域网中的计算机 [edit]

 net view

查看远程计算机的详细信息 [edit]

此命令需要知道远程桌面RDP服务的用户名和密码

systeminfo /s 192.168.0.2 /u administrator /p 123

Host Name:                 DESKTOP-NH96BIF
OS Name:                   Microsoft Windows 10 专业版
OS Version:                10.0.19043 N/A Build 19043
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          N/A
Registered Organization:   N/A
Product ID:                00331-10000-00001-AA151
Original Install Date:     2022/04/12, 17:17:25
System Boot Time:          2022/11/26, 10:17:03
System Manufacturer:       System Manufacturer
System Model:              System Product Name
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 165 Stepping 3 GenuineIntel ~3504 Mhz
BIOS Version:              American Megatrends Inc. 1203, 2021/10/27
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             zh-cn;Chinese (China)
Input Locale:              zh-cn;Chinese (China)
Time Zone:                 (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi
Total Physical Memory:     7,973 MB
Available Physical Memory: 3,784 MB
Virtual Memory: Max Size:  10,149 MB
Virtual Memory: Available: 5,513 MB
Virtual Memory: In Use:    4,636 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\DESKTOP-NH96BIF
Hotfix(s):                 4 Hotfix(s) Installed.
                           [01]: KB4601554
                           [02]: KB5000736
                           [03]: KB5001330
                           [04]: KB5001405
Network Card(s):           2 NIC(s) Installed.
                           [01]: Realtek RTL8191SU Wireless LAN 802.11n USB 2.0 Network Adapter
                                 Connection Name: WLAN
                                 Status:          Media disconnected
                           [02]: Intel(R) Ethernet Connection (14) I219-V
                                 Connection Name: 以太网 3
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.0.1
                                 IP address(es)
                                 [01]: 192.168.0.2
                                 [02]: fe80::14ce:8977:5edb:bc3a
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: No
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

从IP地址(192.168.0.102)查询计算机名称 [edit]

 nbtstat -a 192.168.0.102
以太网:
节点 IP 址址: [192.168.1.207] 范围 ID: []

           NetBIOS 远程计算机名称表

       名称               类型         状态
    ---------------------------------------------
    DESKTOP-4S8ELLF<20>  唯一          已注册
    DESKTOP-4S8ELLF<00>  唯一          已注册
    WORKGROUP      <00>  组           已注册

    MAC 地址 = 1C-1B-0D-F5-60-3C

tracert [edit]

路由跟踪实用程序

tracert 106.185.189.239
C:\Users\xx>tracert 61.135.169.125

Tracing route to 61.135.169.125 over a maximum of 30 hops

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2    43 ms    23 ms     3 ms  27.223.89.89
  3     2 ms     2 ms     2 ms  119.167.125.241
  4     3 ms     *        3 ms  119.167.87.181
  5    17 ms     6 ms     3 ms  119.167.86.161
  6    15 ms    16 ms    16 ms  219.158.4.253
  7    17 ms    20 ms    16 ms  202.96.12.34
  8    24 ms    46 ms    16 ms  202.106.34.214
  9   101 ms    14 ms    14 ms  123.125.248.94
 10     *        *        *     Request timed out.
 11     *        *        *     Request timed out.
 12    15 ms    15 ms    15 ms  61.135.169.125

Trace complete.

ping多个地址 [edit]

在命令行里面直接复制粘贴下面的命令,回车后使用

::for /L %i in (开始,间隔,结束) do ping -n 1 -2 60 IP地址 %是代表该段所有地址 | find "回复" >> 结果.txt
for /L %i in (1,1,255) do ping -n 1 -w 60 192.168.1.%i | find "回复" >>pingall.txt

安全 [edit]

windows10 家庭版 启用administrator用户 [edit]

net user administrator /active:yes

其他 [edit]

xcopy [edit]

其实SMB共享支持断电续传的,就这个命令:

copy /z \\server\folder\file.ext D:\downloads\file.ext
  1. 使用copy 命令复制文件,首先会在目标位置创建一个和源文件大小相同的文件,然后进行填充;
  2. 在复制过程中断开网络或者关闭远程主机,copy /z会停止复制,但目标位置的文件仍然存在;不使用/z开关的copy会停止复制,但目标位置的不完整的文件会被删除;
  3. 恢复网络后,使用copy /z复制同一个文件可以实现断点续传;
  4. 在复制过程中使用Ctrl+C中断,目标位置文件被删除,再次copy /z时复制同一个文件时,无法无法断点续传,只能从头开始。

综上所述,copy /z直接使用目标文件,没有所谓的“临时文件”,另外Ctrl+C中止copy /z运行后,并不能断点续传。


コメント:



(画像の文字列を入力して下さい)

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS