Path: utzoo!mnetor!uunet!munnari!murdu!u3369429 From: u3369429@murdu.OZ (Michael Bednarek) Newsgroups: comp.os.vms Subject: Re: Getting DCL prompt within program Message-ID: <1337@murdu.OZ> Date: 18 Jan 88 23:56:15 GMT References: <248*l_andenes@avh.unit.uninett> <1223@nmtsun.nmt.edu> Followup-To: comp.os.vms Organization: I.A.E.S.R., Melbourne University Lines: 60 Summary: why? In article <1223@nmtsun.nmt.edu> hydrovax@nmtsun.nmt.edu (M. Warner Losh) writes: >In article <248*l_andenes@avh.unit.uninett>, l_andenes%avh.unit.uninett@TOR.NTA.NO (Leiv Arild Andenes) writes: >> I wonder if anyone out there could tell me if there exists a system >> (or Run Time Library) routine to get the DCL prompt string. >I would also like to know if there is a sanktioned interface to go >through. Later in this article I give a method to "get the job done". >I posted a request just before Christmas, and haven't seen a single >responce. In article <8801110532.AA06010@ucbvax.Berkeley.EDU> WEIRAUCH@iravcl.ira.UKa.de ("Stefan Weirauch, IRA, Uni Karlsruhe") gave a response. :Maybe, this little goody is of general interest... :GET_PROMPT.MAR and DO_CMD.PAS : [...] :The example pascal program reads a line with that DCL prompt, and executes it :with lib$do_command - may be, you want to write a program, which takes that :line as password and if it is not correct makes the user think, the program :did nothing ? ;-) : :Have fun. ??? I can't see anything funny about the suggested use of these routines. > [Explains the MACRO code to get/set the prompt. It needs CMKRNL to set, > and may break under future VMS releases.] > >so I could use it for a "SD" command that was written in 'C', that >intelligently set your prompt to the current directory. I know I'm a bit thick at times, and I'm biased towards DCL, but can somebody explain why a program would want to change the prompt? If God wanted programs to change prompts, He had given us `$SET_PROMPT', no? As it is, we have `SET PROMPT'/ `F$ENVIRONMENT("PROMPT")'. Why not use the tools He provided? Why write a `SD' program when the same can be done in DCL? > There don't appear to be (at least to my >eye) any trojan activity going on. If you find any, LET ME KNOW ASAP. Well, think about Weirauch's comment: : may be, you want to write a program, which takes that :line as password and if it is not correct makes the user think, the program :did nothing ? ;-) Sounds pretty trojan to me. However, remember that there are several ways to find out whether DCL or a (simple) Trojan Horse is running: o The most obvious: press CTRL/T o Try up-arrow (command recall) more than once. o Try keys which were defined with `DEFINE/KEY' Michael Bednarek Institute of Applied Economic and Social Research (IAESR) Melbourne University, Parkville 3052, AUSTRALIA, Phone : +61 3 344 5744 Domain: u3369429@{murdu.oz.au | ucsvc.dn.mu.oz.au} or mb@munnari.oz.au "bang": ...UUNET.UU.NET!munnari!{murdu.oz | ucsvc.dn.mu.oz}!u3369429 "POST NO BILLS."