mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
Add automatic authbind detection (#1047)
This commit is contained in:
committed by
Michel Oosterhof
parent
ab1355edf4
commit
6010a4c0b0
10
bin/cowrie
10
bin/cowrie
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#Change the below to yes if you are using authbind to listen to port 22
|
|
||||||
AUTHBIND_ENABLED=no
|
|
||||||
|
|
||||||
# To override the default virtual enviroment, either set COWRIE_VIRTUAL_ENV or
|
# To override the default virtual enviroment, either set COWRIE_VIRTUAL_ENV or
|
||||||
# activate it before starting Cowrie
|
# activate it before starting Cowrie
|
||||||
@ -102,6 +100,14 @@ cowrie_start() {
|
|||||||
echo 2>&1 "Not using Python virtual environment"
|
echo 2>&1 "Not using Python virtual environment"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Automatically check if the authbind is enabled or not
|
||||||
|
authfile="/etc/authbind/byport/22"
|
||||||
|
if [ -x authfile ]; then
|
||||||
|
AUTHBIND_ENABLED=yes
|
||||||
|
else
|
||||||
|
AUTHBIND_ENABLED=no
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Starting cowrie: [twistd ${TWISTEDARGS} cowrie ${COWRIEARGS}]..."
|
echo "Starting cowrie: [twistd ${TWISTEDARGS} cowrie ${COWRIEARGS}]..."
|
||||||
if [ "$AUTHBIND_ENABLED" = "no" ]
|
if [ "$AUTHBIND_ENABLED" = "no" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user