#!/bin/csh -f # # Author: Ram Samudrala (me@ram.org) # Version: O1.0 # Detail: # June 26, 1993. # # See the URL above for more information. # # logfinger: This is a script that is started up by the plan program # when someone is fingering you. It looks up the netstat # table for the IP address of the host from which the # finger request originates and proceeds to finger the host # back. It then looks up a nameserver for the character # address of the IP address. All these queries are stored # in the file defined by the variable FINGERLOG set FINGERLOG = "~/.fingerlog" set NAMESERVER = "dove.nist.gov" echo "logfinger: `date`" >> $FINGERLOG foreach host (`netstat -n | awk '/.79 / {print $5}' | awk -F. '{print $1"."$2"."$3"."$4}'`) echo "`hostname`: fingering $host...\n" >> $FINGERLOG finger @$host >> $FINGERLOG echo "" >> $FINGERLOG nslookup $host $NAMESERVER >> $FINGERLOG echo "" >> $FINGERLOG end echo "-----------------------------------------\n" >> $FINGERLOG #