mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-17 22:14:19 +01:00
Merge branch 'master' of https://github.com/micheloosterhof/cowrie
This commit is contained in:
@@ -43,12 +43,12 @@ cowrie_status() {
|
|||||||
cowrie_start() {
|
cowrie_start() {
|
||||||
# Start Cowrie
|
# Start Cowrie
|
||||||
activate_venv "cowrie-env"
|
activate_venv "cowrie-env"
|
||||||
echo "Starting cowrie with extra arguments [$XARGS] ..."
|
echo "Starting cowrie with extra arguments [$XARGS $DAEMONIZE] ..."
|
||||||
if [ $AUTHBIND_ENABLED = "no" ]
|
if [ $AUTHBIND_ENABLED = "no" ]
|
||||||
then
|
then
|
||||||
twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile ${PIDFILE} cowrie
|
twistd $XARGS $DAEMONIZE -l log/cowrie.log --umask 0077 --pidfile ${PIDFILE} cowrie
|
||||||
else
|
else
|
||||||
authbind --deep twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile cowrie.pid cowrie
|
authbind --deep twistd $XARGS -l log/cowrie.log --umask 0077 --pidfile ${PIDFILE} cowrie
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class command_echo(HoneyPotCommand):
|
|||||||
# FIXME: Wrap in exception, Python escape cannot handle single digit \x codes (e.g. \x1)
|
# FIXME: Wrap in exception, Python escape cannot handle single digit \x codes (e.g. \x1)
|
||||||
try:
|
try:
|
||||||
self.write(escape_fn(re.sub('(?<=\\\\)x([0-9a-fA-F]{1})(?=\\\\|\"|\'|\s|$)', 'x0\g<1>',
|
self.write(escape_fn(re.sub('(?<=\\\\)x([0-9a-fA-F]{1})(?=\\\\|\"|\'|\s|$)', 'x0\g<1>',
|
||||||
''.join(args).replace('\\\\x', '\\x'))).strip('\"\''))
|
''.join(args).replace('\\\\x', '\\x')).strip('\"\'')))
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
log.msg("echo command received Python incorrect hex escape")
|
log.msg("echo command received Python incorrect hex escape")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user