Wed, 08 Feb 2012 20:07:00 +0200
Update version, adapt patch, correct PID writing, correct build on newer
FreeBSD releases, and most importantly introduce new patch to try to
avoid segfault caused by multiple network interfaces with the same (or
no) address. This is common when configuring bridges and tunnels.
michael@574 | 1 | #! /bin/sh |
michael@574 | 2 | ## |
michael@574 | 3 | ## honeyd.service -- small honeyd(8) service faking script |
michael@574 | 4 | ## Copyright (c) 2003 The OpenPKG Project <http://www.openpkg.org/> |
michael@574 | 5 | ## |
michael@574 | 6 | |
michael@574 | 7 | # honeyd(8) provides: |
michael@574 | 8 | # $HONEYD_PERSONALITY |
michael@574 | 9 | # $HONEYD_IP_SRC, $HONEYD_SRC_PORT |
michael@574 | 10 | # $HONEYD_IP_DST, $HONEYD_DST_PORT |
michael@574 | 11 | |
michael@574 | 12 | service="$1" |
michael@574 | 13 | shift |
michael@574 | 14 | |
michael@574 | 15 | case $service in |
michael@574 | 16 | http ) |
michael@574 | 17 | line="true" |
michael@574 | 18 | while $line; do |
michael@574 | 19 | read line |
michael@574 | 20 | done |
michael@574 | 21 | echo "HTTP/1.1 404 Not Found" |
michael@574 | 22 | echo "Date: `date`" |
michael@574 | 23 | echo "Server: Apache" |
michael@574 | 24 | echo "Connection: close" |
michael@574 | 25 | echo "Content-Type: text/plain; charset=iso-8859-1" |
michael@574 | 26 | echo "" |
michael@574 | 27 | echo "Error: 404 Not Found" |
michael@574 | 28 | exit 0 |
michael@574 | 29 | ;; |
michael@574 | 30 | ssh ) |
michael@574 | 31 | echo "SSH-1.5-2.40" |
michael@574 | 32 | read line |
michael@574 | 33 | echo "Protocol mismatch." |
michael@574 | 34 | exit 0 |
michael@574 | 35 | ;; |
michael@574 | 36 | esac |
michael@574 | 37 |