honeyd/svcs.sh

Tue, 28 Aug 2012 18:36:35 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:36:35 +0200
changeset 579
6b18bb69901e
permissions
-rw-r--r--

Correct the paths of patched scripts, refine password generation,
mitigate fdatasync(2) detection problems, correct dependencies, remove
outdated autoconf components, correct conf file paths and attributes,
complete and correct log file rotation handing, and note warnings
useful for diagnosing builds.

     1 #! /bin/sh
     2 ##
     3 ##  honeyd.service -- small honeyd(8) service faking script
     4 ##  Copyright (c) 2003 The OpenPKG Project <http://www.openpkg.org/>
     5 ##
     7 #   honeyd(8) provides:
     8 #   $HONEYD_PERSONALITY
     9 #   $HONEYD_IP_SRC, $HONEYD_SRC_PORT
    10 #   $HONEYD_IP_DST, $HONEYD_DST_PORT
    12 service="$1"
    13 shift
    15 case $service in
    16     http )
    17         line="true"
    18         while $line; do
    19             read line
    20         done
    21         echo "HTTP/1.1 404 Not Found"
    22         echo "Date: `date`"
    23         echo "Server: Apache"
    24         echo "Connection: close"
    25         echo "Content-Type: text/plain; charset=iso-8859-1"
    26         echo ""
    27         echo "Error: 404 Not Found"
    28         exit 0
    29         ;;
    30     ssh )
    31         echo "SSH-1.5-2.40"
    32         read line
    33         echo "Protocol mismatch."
    34         exit 0
    35         ;;
    36 esac

mercurial