mirror of
https://github.com/inspec/inspec
synced 2024-09-21 15:02:01 +00:00
formatted lsof mockup
This commit is contained in:
parent
3211071b9f
commit
b363e1d147
2 changed files with 65 additions and 0 deletions
|
@ -137,6 +137,8 @@ class MockLoader
|
|||
'/sbin/sysctl -q -n net.ipv4.conf.all.forwarding' => cmd.call('sbin_sysctl'),
|
||||
# ports on windows
|
||||
'Get-NetTCPConnection | Select-Object -Property State, Caption, Description, LocalAddress, LocalPort, RemoteAddress, RemotePort, DisplayName, Status | ConvertTo-Json' => cmd.call('get-net-tcpconnection'),
|
||||
# lsof formatted list of ports (should quite cross platform)
|
||||
'lsof -nP -i -FpctPn' => cmd.call('lsof-nP-i-FpctPn'),
|
||||
# ports on mac
|
||||
'lsof -nP -iTCP -iUDP -sTCP:LISTEN' => cmd.call('lsof-np-itcp'),
|
||||
# ports on linux
|
||||
|
|
63
test/unit/mock/cmd/lsof-nP-i-FpctPn
Normal file
63
test/unit/mock/cmd/lsof-nP-i-FpctPn
Normal file
|
@ -0,0 +1,63 @@
|
|||
p697
|
||||
cUserEvent
|
||||
tIPv4
|
||||
PUDP
|
||||
n*:*
|
||||
p6835
|
||||
cVBoxHeadl
|
||||
tIPv4
|
||||
PTCP
|
||||
n127.0.0.1:2022
|
||||
tIPv4
|
||||
PUDP
|
||||
n*:61197
|
||||
p2022
|
||||
cjava
|
||||
tIPv6
|
||||
PTCP
|
||||
n192.168.1.66:51098->172.18.1.63:22
|
||||
p8708
|
||||
csshd
|
||||
tIPv4
|
||||
PTCP
|
||||
n*:22
|
||||
tIPv6
|
||||
PTCP
|
||||
n*:22
|
||||
p13451
|
||||
cssh
|
||||
tIPv4
|
||||
PTCP
|
||||
n192.168.1.66:46951->192.168.1.80:22
|
||||
p24137
|
||||
cntpd
|
||||
tIPv4
|
||||
PUDP
|
||||
n*:123
|
||||
tIPv6
|
||||
PUDP
|
||||
n*:123
|
||||
tIPv4
|
||||
PUDP
|
||||
n127.0.0.1:123
|
||||
tIPv4
|
||||
PUDP
|
||||
n192.168.1.66:123
|
||||
tIPv4
|
||||
PUDP
|
||||
n172.17.42.1:123
|
||||
tIPv6
|
||||
PUDP
|
||||
n[2602:30a:c0d0:e070:8e70:5aff:fe66:6ebc]:123
|
||||
tIPv6
|
||||
PUDP
|
||||
n[::1]:123
|
||||
tIPv6
|
||||
PUDP
|
||||
n[fe80::8e70:5aff:fe66:6ebc]:123
|
||||
tIPv6
|
||||
PUDP
|
||||
n[2602:30a:c0d0:e070:b1e3:fa7c:c1cd:e1dd]:123
|
||||
tIPv4
|
||||
PUDP
|
||||
n9.48.126.170:123
|
Loading…
Reference in a new issue