1
2
3
4
netstat -np tcp
netstat -np udp

sudo nmap -sV -p T:22 --host-timeout 30 127.0.0.1

xquic
unordered_dense
nmap
zmap
monitor
sockdoc

capture/filter

PcapPlusPlus
libpcap
npcap

protocol

ntp
awesome-nostr
src
kNet -> udp
msgpack-c

awesome-crawler
FrameworkBenchmarks
robdns
xrdp
Transfer

双网卡

https://www.cnblogs.com/xuyaowen/p/ping_specify_interface.html

1
2
3
ping -S 10.106.33.215  www.google.com
# -S 指定源地址 (macOS/Windows)
# -I interface (Linux)

https://djangocas.dev/blog/linux/linux-SO_BINDTODEVICE-and-mac-IP_BOUND_IF-to-bind-socket-to-a-network-interface/

网速和带宽测试

1
2
3
4
iperf https://sourceforge.net/projects/iperf2/
iperf3 https://github.com/esnet/iperf

dperf https://github.com/baidu/dperf
1
nmap -sT -p3389 10.106.19.1/24 | grep -A1 -B4 open
1
2
3
4
5
6
7
8
9
10
3个过程全部完成叫全开扫描,最后一步不做,叫半开扫描。在实际过程中,半开扫描应用的最多,半开扫描不容易被目标电脑日志记录。半开扫描需要加参数-sS,全开扫描需要加参数-sT。
半开扫描:nmap -sS 192.168.152.130
全开扫描:nmap -sT 192.168.152.130

仅使用Ping协议进行主机发现
nmap -sP nmap -PN 10.106.19.75/24
跳过Ping扫描阶段(无ping扫描)
nmap -PN 10.106.19.75/24
ARP协议扫描只适用于局域网内,使用ARP,不仅速度快,而且结果也会更加准确。
nmap -PR 10.106.19.75/24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local function nmap_service(protocal, port, time_out)
local args = "nmap -sV"
local tail = ""
if protocal == "tcp" then
tail = "127.0.0.1"
args = args .. " -p " .. "T:" .. tostring(port)
elseif protocal == "udp" then
tail = "127.0.0.1"
args = args .. " -sU -p " .. "U:" .. tostring(port)
elseif protocal == "tcp6" then
tail = "-6 ::1"
args = args .. " -p " .. "T:" .. tostring(port)
elseif protocal == "udp6" then
tail = "-6 ::1"
args = args .. " -sU -p " .. "U:" .. tostring(port)
else
return -1, nil
end

if type(time_out) ~= "number" then
time_out = 30
end

-- set timeout
args = args .. " --host-timeout " .. tostring(time_out)
args = args .. " " .. tail

local nmap = agent.require "nmap"
local ret, nmap_output = nmap.exec(args)
if ret == 0 then
return ret, cjson.decode(nmap_output)
else
agent.error_log("nmap exec failed! args=" ..
tostring(args) .. " ret=" .. tostring(ret) .. " agent.nmap: " .. nmap_output)
end

return ret, nil
end
local ret, msg = nmap_service("tcp", "22", 30)
print(ret, msg)