File: nouser

package info (click to toggle)
efingerd 1.6.2.5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 276 kB
  • ctags: 35
  • sloc: sh: 344; ansic: 254; makefile: 62
file content (99 lines) | stat: -rwxr-xr-x 1,416 bytes parent folder | download | duplicates (9)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh

. /etc/efingerd/log 

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

if [ "$3" = "/W" ]; then
  /usr/bin/finger
  exit 0
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" = "traceroute" ]; then
  /usr/sbin/traceroute -n -q 2 "$2"
  exit 0
fi

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

if [ $3 = 'users' ]; then
  /usr/bin/finger | grep -v garabik
  exit 0
fi

if [ $3 = 'who' ]; then
  who -iwH | grep -v garabik
  exit 0
fi

if [ $3 = 'date' ]; then
  date
  exit 0
fi

if [ $3 = 'w' ]; then
  w | grep -v garabik
  exit 0
fi

if [ $3 = 'cal' ]; then
  cal
  exit 0
fi

if [ $3 = 'calendar' ]; then
  calendar
  exit 0
fi

if [ $3 = 'help' ]; then
cat <<EOM

Help me if you can,
I'm feeling down

              (The Beatles)

try:
finger command@melkor.dnp.fmph.uniba.sk, where command is one of:

  fortune  : some wise words
  ping     : test the net
  help     : heeeeelp !!!
  users    : display selected users logged in
  who      : ditto
  w        : tritto
  date     : what's the day today?
  cal      : and yesterday and tommorow?
  calendar : there is always a reason to drink
EOM
  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