File: test

package info (click to toggle)
pnscan 1.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 424 kB
  • sloc: sh: 1,270; ansic: 1,220; makefile: 215
file content (21 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

LOCAL_HOST=127.0.0.1

# Scan all ports in the local host for WEB server
pnscan -w"HEAD / HTTP/1.0\r\n\r\n" -r"Server:" $LOCAL_HOST 1:65525

if [ x"$?" != x"0" ]; then
	echo "Error in scanning WEB server on all ports"
	exit 1
fi

# Scan the local host on SSH port
pnscan $LOCAL_HOST 22

if [ x"$?" != x"0" ]; then
	echo "Error in scanning the local host on SSH port"
	exit 1
fi