|
|
xinetd-gopher-request-filter.sh - geomyidae - A small C-based gopherd. |
|
|
 |
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ (git://bitreich.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
Tags |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
|
xinetd-gopher-request-filter.sh (381B) |
|
|
|
--- |
|
|
|
1 #!/bin/sh |
|
|
|
2 # |
|
|
|
3 # Copy me if you can. |
|
|
|
4 # |
|
|
|
5 # Change to fit to your original running geomyidae instance. |
|
|
|
6 dstserver="localhost" |
|
|
|
7 dstport="7070" |
|
|
|
8 |
|
|
|
9 read -r request |
|
|
|
10 request="$(printf "%s\n" "${request}" | tr -d '\r')" |
|
|
|
11 case "${request}" in |
|
|
|
12 *bill-gates*|*cia*) |
|
|
|
13 printf "3The request cannot be handled\terror\t70\r\n" |
|
|
|
14 ;; |
|
|
|
15 *) |
|
|
|
16 printf "%s\r\n" "${request}" | nc "${dstserver}" "${dstport}" |
|
|
|
17 ;; |
|
|
|
18 esac |
|
|
|
19 |
|