File: nouser

package info (click to toggle)
efingerd 1.3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 180 kB
  • ctags: 36
  • sloc: sh: 297; ansic: 278; makefile: 62
file content (44 lines) | stat: -rwxr-xr-x 564 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

. /etc/efingerd/log 

echo
if [ $1 = '(null)' ]; then
  echo Hello $2,
else 
  echo Hello $1\@$2,
fi

if [ $3 = 'time' ]; then
  echo The time is...
  date
  exit 0
fi

if [ $3 = 'ping' ]; then
  echo 'PONG!'
  ping -c 5 $2
  exit 0
fi

if [ $3 = 'fortune' ]; then
  /usr/games/fortune
  exit 0
fi

if [ $3 = 'uptime' ]; then
  /usr/bin/uptime
  exit 0
fi

if [ $3 = 'uname' ]; then
  /bin/uname --all
  exit 0
fi

cat <<EOM
You tried to finger non existant user!!!
Your attempt is logged and sent to C.I.A., K.G.B. and S.I.S.
Expect a visit soon.

EOM