[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

499.0. "username login notification?" by RDGE23::MLSUS2 () Fri Jun 12 1987 04:55

    Hows about a routine that will inform the one user that another
    has logged in? Something along the lines of a message like
    "USER X HAS JUST LOGGED IN ON NODE XXXXXX::"
    user X having been specified when the routine was called.
    
    So far as I know, there is no way of doing this...anyone want to
    enlighten me?
    
    I am working in an operators account with minimal privileges.
    
    			Mark H
T.RTitleUserPersonal
Name
DateLines
499.1Try NETWATCH.COM...CAM2::GALVINThe Night StalkerFri Jun 12 1987 06:12122
Re:.0
    
    Got just the thing for you.  Try this command file by Manny Hernandez.
    
    
    Rob 'Galv' Galvin
    -----------------
    
    (.com after the form-feed)
    
$ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ !                                                             !
$ !                      NETWATCH.COM                           !
$ !                                                             !
$ !     DCL procedure to alert you of users as they log on      !
$ !             to any VMS system on the Easynet                !
$ !                                                             !
$ !           ( spawn this in your login.com )                  !
$ !                                                             !
$ !      $ spawn/nowait/notify @netwatch nodenmae username      !
$ !                                                             !
$ !                  By Manny Hernandez                         !
$ !                                                             !
$ !     Any comments please forward to PARVAX::HERNANDEZ        !
$ !                                                             !
$ !                         V1.2                                !
$ !								!
$! V1.3 23-feb-1986 PRSIS3::DTL modified to display message only!
$!				once, and also at logout.	!
$!				fixed a couple of bugs in the   !
$!				loop causing overflow.		!
$ !                                                             !
$ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ ! set nocontrol so spawn won't terminate on normal interrupt
$ set nocontrol
$ long_node_name = f$logical("sys$node")
$ new_node_name = f$extract(1,10,long_node_name)
$ edit_node_name = f$edit(new_node_name,"trim")
$ node_long = f$len(edit_node_name)
$ node_length = node_long-2
$ node_name = f$extract(0,node_length,edit_node_name)
$ if p1 .eqs. "" then goto begin
$ if p2 .eqs. "" then goto ask_user
$ goto net_watch
$begin:
$ inq p1 "Node of user [''node_name'] "
$ if p1 .eqs. "" then p1  = "''node_name'"
$ask_user:
$ inq p2 "User to watch for "
$ if p2 .eqs. "" then goto ask_user
$net_watch:
$ error_status = %x1001C002
$ open/read/write slave 'p1'::"29="
$ present_status = $status
$ if present_status .eq. error_status then goto down_sys
$ local_user := 'f$logical("sys$node")''f$getjpi("","username")'
$ request_dir = ""
$ request_dir[0,8] = 15
$ request_dir = request_dir + local_user
$ write slave request_dir
$ count = 0
$loop:
$ read/end=done/error=error_on_system slave username
$ if username .eqs. "" then goto done
$ write slave request_dir
$ match = f$extract(16,12,username)
$ trimmed = f$edit(match,"trim")
$ if "''trimmed'" .eqs. "''p2'" then goto there
$ goto loop
$done:
$ return = ""						!init
$ return[0,8] = 13   
$ return = return + local_user
$ write slave return
$ flag = "''P1'_''P2'$status"				!node_user$status (1/0)
$ set message/nof/nos/noi/not				!disable DCL warning
$ on warning then goto init				!init status if first
$ flag = 'flag'						! time the user logs in
$ set message/f/s/i/t					!restore DCL messages
$ if "''flag'" .eqs. "1" then goto no_more_there	!was here, but no more
$ goto close
$init:
$ set message/f/s/i/t					!restore DCL messages
$ 'P1'_'P2'$status == "0"				!no more logged in
$ goto close
$down_sys:
$ write sys$output "
$ write sys$output "  Node ''p1' is not currently reachable "
$ exit
$error_on_system:
$ write sys$output "
$ write sys$output "  NETWATCH-F-LOOKUP, error while attempting link."
$ close net_file
$close:
$ local_user = ""					!clear username field 
$ close slave
$ !
$ ! wait 30 seconds before looking again
$ !
$ wait 00:00:30
$ goto net_watch
$there:
$ flag = "''P1'_''P2'$status"				!get user status name
$ set message/nof/nos/noi/not				!disable DCL warnings
$ verb = "has"						!tricky French detail
$ on warning then verb = "*is*"				! to correct message..
$ flag = 'flag'						!get user status value
$ set message/f/s/i/t					!restore DCL messages
$ if "''flag'" .eqs. "1" then goto close		!already notified. skip
$ write sys$output -
 " User ''P2' ''verb' logged onto node ''p1' "
$ 'P1'_'P2'$status == "1"				!set status user logged
$ goto close						! in
$no_more_there:
$ flag = "''P1'_''P2'$status"
$ flag = 'flag'
$ if "''flag'" .eqs. "0" then goto close
$ write sys$output -
 " >> User ''P2' has logged off node ''p1' << "
$ 'P1'_'P2'$status == "0"
$ goto close
    
499.2Briliant!!RDGE23::MLSUS2Fri Jun 12 1987 09:036
    Just the job...when I got the login.com commands sussed.
    
    Ta very much.
    
    			MH
    
499.3Not everybody has a PHONE...NAC::J_MICHAUDJeff MichaudFri Jun 12 1987 19:149
    Of course the remote node must have a PHONE server...
    
    	speaking of, besides VMS which of the following supports
    	PHONE (as a product or in-house hack)?
    
    		RSX
    		RSTS
    		TOPS-10/20
    		....
499.4TOPS-20 has it nowVINO::RASPUZZIMichael RaspuzziTue Jun 16 1987 11:034
    We have an in house PHONE which is not too much of a hack running
    on TOPS-20. The copy we have is from England written by Paul Kelsey.
    
    Mike
499.5Not yet for RSTS3363::HERBERTTue Jun 16 1987 12:197
    RSTS doesn't have a phone server yet, but we do have an internal
    hack to do PHONE DIR's of arbitrary nodes.
    
    RSTS has TLK and LSN, the "old" protocol which RT11, RSTS, and RSX
    use.

    Kevin
499.6LET's write a new PHONE specNAC::J_MICHAUDJeff MichaudTue Jun 16 1987 15:0518
    .-1
    
    You mean there was an OLD protocol.  The current protocol looks
    like an old protocol to me.  Why use 2 half-duplex links?  Also
    passing the the sending users host name, instead of his node
    number kinda sucks, when the local node knows itself by one
    name, and the remote node knows you by another name (which is
    perfectly legal, and a problem I ran into where this was true).
    
    There are a few other points too that I won't mention here.
    What I would like to see is a new protocol, especially as we
    move closer to phase 5.  How do we go about this?  Anyone
    know?  Is there another NOTES-FILE that would be more appropriate
    for this?
    
    				Jeff
    
    ps: my PHONE is for DECnet-Ultrix
499.7There is nothing to keep us from doing it...3363::HERBERTTue Jun 16 1987 16:5111
    Well, the TLK and LSN protocol was far more reasonable than phone
    (it uses the correct number of links), but it is line oriented rather
    than video oriented. TLK and LSN uses the OLD protocol; PHONE uses
    the stupid protocol. :-)
    
    Since none of these things are architected, there is nothing to
    keep anyone from designing a new phone protocol and writing new
    implementations. Getting the base systems interested in shipping
    the new PHONEs would be the difficult part.
    
    Kevin
499.8ERIS::CALLASI have nothing to say, but it&#039;s okayWed Jun 17 1987 09:356
    Or you could always send your resum� to some friendly person in VMS
    development and volunteer to work on PHONE. The reason PHONE is so
    primitive is that no one has wanted to do anything with it. It's an
    orphan. 
    
	Jon 
499.9Ultrix phone?VINO::RASPUZZIMichael RaspuzziTue Jul 14 1987 20:174
    Anyone out there have a PHONE for Ultrix (preferably written in
    C)? Please let me know by mail. Thanks.
    
    Mike
499.10SYRAH::THOMASThe Code WarriorTue Jul 21 1987 01:405
    Unfortunately, PHONE can't be under Ultrix because of misfeature
    (bug) of DECnet-Ultrix.  You can't send 0 length packets.  Since
    Phone uses 0 length packets.
    
    matt
499.11DECnet-Ultrix zero-length write()NAC::J_MICHAUDJeff MichaudTue Jul 21 1987 19:1219
  Re: .-1
    
    try doing a "dir netrix::" while in phone.  netrix is
    running DECnet-Ultrix.
    
    It is true you can read zero-length sequenced packets
    but can not send them under DECnet-Ultrix.  I have
    been told that the bug is not in our code, but in
    the BSD socket interface code (which we do not own).
    I have also been told that UEG won't make the one minor
    change (I think it is 2 lines of code) because they
    want to keep the code the EXACT same as BSD.
    
    Oh yea, if you are useing the directory feature of PHONE
    to find somebody, and you want it to also find them if
    they are on a DECnet-Ultrix system, don't depend on
    it being in the same fixed format as VMS does it.  I
    just fork() off a "/usr/ucb/finger" and feed that
    to the Master requesting a directory.