mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 16:43:08 +01:00
17 lines
520 B
Bash
Executable File
17 lines
520 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Use nmap from podman to check for open SSH ports on local subnet.
|
|
if test -x "$(command -v podman)"; then
|
|
if sudo podman image exists localhost/nmap; then
|
|
sudo podman run -it --rm \
|
|
--cap-add=NET_RAW \
|
|
--cap-add=NET_ADMIN \
|
|
--network host \
|
|
--name nmap \
|
|
nmap -sV -p 22 -open 10.0.0.0/24
|
|
else
|
|
echo "localhost/nmap image does not exist"
|
|
echo "Build it from github.com/hyperreal64/containerfiles"
|
|
fi
|
|
fi
|