Blame tests/p_vsftpd/vsftpd_anonymous_login.sh
|
Karanbir Singh |
0b5bb2 |
#!/bin/sh
|
|
Karanbir Singh |
0b5bb2 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Karanbir Singh |
0b5bb2 |
|
|
Karanbir Singh |
0b5bb2 |
echo -n "vsFTPd anonymous can login test: "
|
|
Karanbir Singh |
0b5bb2 |
echo -e "user anonymous\npass password\nquit" | nc localhost 21 | grep "230 Login successful." > /dev/null 2>&1
|
|
Karanbir Singh |
0b5bb2 |
if [ $? -eq 0 ]; then
|
|
Karanbir Singh |
0b5bb2 |
echo 'PASS'
|
|
Karanbir Singh |
0b5bb2 |
else
|
|
Karanbir Singh |
0b5bb2 |
echo 'FAIL'
|
|
Karanbir Singh |
0b5bb2 |
exit 1
|
|
Karanbir Singh |
0b5bb2 |
fi
|