shell 模块

2021-09-27 111

用于简单处理连接问题

  • Windows 端口占用相关
  1. 查找
    netstat -ano| findstr 8080

1:协议 2:本地地址 3: 外部地址 4: 状态 5: PID

获取上面的 [pid]

  1. 杀死进程
    taskkill /F /PID [pid]
  • Windows 批处理adb connect自动扫描内网IP和指定端口号

  • Windows 扫描端口相关
    方案1:for /l %%i in (90,1,100) do adb connect 192.168.0.%%i:5555

FOR /L%variable IN (start,step,end) DO command [command-parameters]

Linux 下自动扫描指定端口开放的主机ip

方案2:
ping
arp :获取 MAC

方案3:telnet批量检测远程端口小记

参考:Windows奇技淫巧之网络命令行

高效实现扫描局域网IP、主机名、MAC和端口, 比较全的工具和编码过程