finger

command module
v0.0.0-...-80eeb43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

README

An implementation of finger and fingerd in go

fingerd

The finger server

Options

  • -e: path to the finger executable, intended to be use as a way to make your front facing finger server customizable
  • -p: Change the default port (7979), this implementation of finger doesn't use the port 79 has root rights are required instead we encourage redirectng port 79 to port 7979 as most client doesn't support custom ports
  • -l: Change the host the server listen on by default the server listen to localhost, set this flag to 0.0.0.0 to make the server public
  • -f: Enable querying remote servers, this functionality is disabled by default as it is considered insecure by the protocol specifications

finger

A finger network and local client

Locally this finger server only show information on user that have a .finger file in their home directory. this file is read when the -l flag is passed.

Warning: As of now the local part only works on due to differences between UNIXes /etc/passwd file format, this may change down the line.

Exemples :

$ finger
Login	Name		Home		Shell
striker	striker.sh	/home/striker	/bin/ksh

$ finger striker

Login: striker		Name:striker.sh
Home: /home/striker	Shell: /bin/ksh

$ finger -l striker
Login: striker		Name:striker.sh
Home: /home/striker	Shell: /bin/ksh
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
id est laborum.

$ finger @sdf.org

Setting up an account at SDF is quick and easy, but to do so you must connect
via an SSH (Secure Shell) or TELNET client and login as the 'new' user.  You
will be asked a few questions including that agree to abide by our AUP.

- MacOS X users, try: ssh://new@sdf.org
- Microsoft Windows users may use our HTML5 SSH client: https://ssh.sdf.org
- Linux/UNIX users can type 'ssh new@sdf.org' at their shell prompts.

For Windows users we highly recommend the free SSH client putty.exe.  If you
do not want to use putty, you can try the built in Windows TELNET Client.

If you have any questions or cannot figure out how to use SSH, live help is
available on IRC via irc.sdf.org in the #helpdesk channel.

Options

  • -p change the port of the server the client connects to, by default 79
  • -l Intended as a flag to produce multi-line output is used locally for a more verbose output, and isn't handled by all finger servers

How to make your custom finger client for your server

Here is a template to make your own finger client in shell:

Like this you could even serve dynamic content for exemple here we can get Paris weather via wttr.in

#!/bin/sh
# basic template to show how one can make their own custom finger client to be used by the server

intro() {
cat <<EOF
Welcome to my custom finger server

Things you can finger:
me:         get to know me
wttrin:     get weather in Paris

EOF
exit
}

[ "$1" = "-l" ] && verbose=true && shift

[ -z "$1" ] && intro

case "$1" in
    me)
        cat <<EOF
I'm x and my hobbies are y
you can checkout out my gemsite here: gemini://x.y
EOF
;;
    wttrin)
        curl -s 'https://www.wttr.in/Paris' ;;
    *)
        echo "are you lost?";;
esac

Supposing that you called your script mycustomfinger.sh you just have to lunch your server this way:

$ fingerd -e customfinger.sh

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL