mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Let nsock use /bin/sh instead of Bash for testing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# nsock regression test suite
|
||||
# Same license as nmap -- see http://nmap.org/book/man-legal.html
|
||||
@@ -51,29 +51,29 @@ then
|
||||
fi
|
||||
|
||||
|
||||
function setup_echo_udp() {
|
||||
setup_echo_udp() {
|
||||
$NCAT -l --udp --sh-exec cat 127.0.0.1 $PORT_UDP &
|
||||
pid_udp=$!
|
||||
echo "started UDP listener on port $PORT_UDP (pid $pid_udp)"
|
||||
}
|
||||
|
||||
function setup_echo_tcp() {
|
||||
setup_echo_tcp() {
|
||||
$NCAT -l --keep-open --sh-exec cat 127.0.0.1 $PORT_TCP &
|
||||
pid_tcp=$!
|
||||
echo "started TCP listener on port $PORT_TCP (pid $pid_tcp)"
|
||||
}
|
||||
|
||||
function setup_echo_tcpssl() {
|
||||
setup_echo_tcpssl() {
|
||||
$NCAT -l --ssl --keep-open --sh-exec cat 127.0.0.1 $PORT_TCPSSL &
|
||||
pid_tcpssl=$!
|
||||
echo "started TCP SSL listener on port $PORT_TCPSSL (pid $pid_tcpssl)"
|
||||
}
|
||||
|
||||
function cleanup_all() {
|
||||
cleanup_all() {
|
||||
kill -s KILL $@ 2>&1 >> /dev/null
|
||||
}
|
||||
|
||||
function main() {
|
||||
main() {
|
||||
setup_echo_udp $PORT_UDP
|
||||
setup_echo_tcp $PORT_TCP
|
||||
setup_echo_tcpssl $PORT_TCPSSL
|
||||
|
||||
Reference in New Issue
Block a user