REMDoor Remote DOS Maintenance Door Version 2.0 March 13, 1989 Copyright 1988,1989 by Ken Brown INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . 1 FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . 1 WHAT IS MISSING? . . . . . . . . . . . . . . . . . . . . . . 1 REQUIREMENTS . . . . . . . . . . . . . . . . . . . . . . . . 2 INSTALLING REMDoor for BBS USE . . . . . . . . . . . . . . . 2 INSTALLING REMDoor for REMOTE PC ACCESS . . . . . . . . . . 2 CONFIGURING REMDoor . . . . . . . . . . . . . . . . . . . . 3 COLOR . . . . . . . . . . . . . . . . . . . . . . . . . 4 SYN . . . . . . . . . . . . . . . . . . . . . . . . . . 4 DOSCOMMAND . . . . . . . . . . . . . . . . . . . . . . 4 EXCLUDE . . . . . . . . . . . . . . . . . . . . . . . . 5 TIMEOUT . . . . . . . . . . . . . . . . . . . . . . . . 5 PASSWORD . . . . . . . . . . . . . . . . . . . . . . . 5 LOGFILE . . . . . . . . . . . . . . . . . . . . . . . . 6 WATCHDOG . . . . . . . . . . . . . . . . . . . . . . . 6 REBOOT . . . . . . . . . . . . . . . . . . . . . . . . 6 ENTERING COMMANDS . . . . . . . . . . . . . . . . . . . . . 7 EXECUTING COMMANDS . . . . . . . . . . . . . . . . . . . . . 8 OUTPUT REDIRECTION . . . . . . . . . . . . . . . . . . . . . 8 LOCAL SYSOP FUNCTIONS . . . . . . . . . . . . . . . . . . . 9 COMMAND REFERENCE . . . . . . . . . . . . . . . . . . . . . 9 ARCV . . . . . . . . . . . . . . . . . . . . . . . . . 9 CHDIR . . . . . . . . . . . . . . . . . . . . . . . . . 9 CLS . . . . . . . . . . . . . . . . . . . . . . . . . . 9 COPY . . . . . . . . . . . . . . . . . . . . . . . . . 9 DIR . . . . . . . . . . . . . . . . . . . . . . . . . . 10 DOS . . . . . . . . . . . . . . . . . . . . . . . . . . 10 DSZ . . . . . . . . . . . . . . . . . . . . . . . . . . 11 EDIT . . . . . . . . . . . . . . . . . . . . . . . . . 11 ERASE . . . . . . . . . . . . . . . . . . . . . . . . . 15 EXIT . . . . . . . . . . . . . . . . . . . . . . . . . 15 FIND . . . . . . . . . . . . . . . . . . . . . . . . . 15 FGREP . . . . . . . . . . . . . . . . . . . . . . . . . 15 FREE . . . . . . . . . . . . . . . . . . . . . . . . . 16 HELP . . . . . . . . . . . . . . . . . . . . . . . . . 16 MKDIR . . . . . . . . . . . . . . . . . . . . . . . . . 16 MOVE . . . . . . . . . . . . . . . . . . . . . . . . . 16 REFRESH . . . . . . . . . . . . . . . . . . . . . . . . 17 RENAME . . . . . . . . . . . . . . . . . . . . . . . . 17 RMDIR . . . . . . . . . . . . . . . . . . . . . . . . . 17 TIME . . . . . . . . . . . . . . . . . . . . . . . . . 17 TIMEOUT . . . . . . . . . . . . . . . . . . . . . . . . 17 TYPE . . . . . . . . . . . . . . . . . . . . . . . . . 18 UPDATE . . . . . . . . . . . . . . . . . . . . . . . . 18 VER . . . . . . . . . . . . . . . . . . . . . . . . . . 18 WINDOW . . . . . . . . . . . . . . . . . . . . . . . . 19 ZIPV . . . . . . . . . . . . . . . . . . . . . . . . . 19 LICENSE INFORMATION . . . . . . . . . . . . . . . . . . . . 20 DISTRIBUTION . . . . . . . . . . . . . . . . . . . . . . . . 20 WARRANTY INFORMATION . . . . . . . . . . . . . . . . . . . . 21 ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . 21 1 INTRODUCTION REMDoor is designed to allow sysops to perform maintenance on their boards remotely without the problems associated with running CTTY and COMMAND.COM. REMDoor presents the remote sysop with a DOS shell which supports most COMMAND.COM functions. REMDoor echoes all output to both the local screen and the remote screen and accepts keystrokes from either the local or remote keyboard. REMDoor monitors the Carrier Detect signal from the modem and will return to the BBS immediately upon loss of carrier. In addition, all file operations are checked for possible SHARE violations before being performed so REMDoor is fully compatible with multitasking and networked BBS's. REMDoor can be used to access your PC remotely even if you are not running a bulletin board. For example, REMDoor could be set up to allow after hours access to an office PC. FEATURES o A full screen editor. o Chat mode. o Full local echo of all output and local keyboard input. o Full command line editing and command recall pattered after CED. WHAT IS MISSING? o No batch/command language. o The editor is missing a number of useful features (Search/Replace, etc.) which will be added in later releases. 2 REQUIREMENTS o DOS 3.0 or later DOS version. o The communications software used remotely must support ANSI terminal sequences. Support for addition terminal types will be added in later releases. INSTALLING REMDoor for BBS USE Refer to your BBS documentation for information about installing "door" programs. For most BBS's this will involve writing a batch file which calls REMDoor and then restarts the BBS software once REMDoor exits. REMDoor requires the number of the COM port (either COM1 or COM2) as a command line parameter. Set up the batch file which controls the door to call REMDoor with the line REMDOOR 1 or REMDOOR 2. If you plan to use DSZ to do ZMODEM file transfers from REMDoor (see the DSZ command) and are using the COM2 port you should also include the line SET DSZPORT=2 in the batch file before REMDoor is called. This is necessary because the DSZ program defaults to the COM1 port. It is also possible to run REMDoor locally (without an active COM port). To do so type REMDoor -L. INSTALLING REMDoor for REMOTE PC ACCESS To use REMDoor to access a PC remotely it is necessary to use a program which will answer the phone and pass control to REMDoor once a connection has been made. 3 One such program is JaxHost, written by Jack Kilday and usually available on BBS's as JAXHST3A.ZIP. JaxHost initializes the communications port and waits for an incoming call. Once a call is received, JaxHost prompts the remote caller for a password and if the correct password is typed, passes control to REMDoor. The two batch files, HOST.BAT and OFF.BAT, are distributed with REMDoor and are designed replace the batch files which are distributed with JaxHost. (The batch files distributed with JaxHost are designed to call CTTY and then run COMMAND.COM.) To install REMDoor with JaxHost first install JaxHost using the directions in the JaxHost documentation. Next copy the following files into the JaxHost directory: REMDOOR.EXE HOST.BAT OFF.BAT REMDOOR.CFG (if used) REMDOOR.TXT (if used) When you want to setup your PC for remote access change to the JaxHost directory and type 'HOST'. CONFIGURING REMDoor REMDoor supports a number of configuration options which are set in a file called REMDOOR.CFG. The configuration file, if present, is read immediately after REMDOOR begins execution. REMDOOR.CFG is an ASCII file which may be created and modified using any text editor. The configuration file is entirely optional. The configuration file consists of a series of lines in the form: PARAMETER=VALUE 4 The following parameters are available: COLOR=foreground[/background] The COLOR parameter defines the screen colors you wish to use when running REMDOOR. Colors are selected from the list of colors which are defined for ANSI terminals: BLACK BLUE RED MAGENTA GREEN CYAN YELLOW WHITE For example, the line COLOR=BLUE/WHITE in the configuration file would set the screen to blue text on a white background. The background color is optional, if it is omitted the background color defaults to BLACK. SYN=synonym replacement This parameter allows you to set up CED-like synonyms for REMDoor. The syntax is similar to that used by CED. The line SYN=LS DIR /W would define LS as a synonym for 'DIR /W'. The command line LS *.exe would be expanded to DIR /W *.exe DOSCOMMAND=dos_command This parameter defines a DOS program that will be automatically recognized by REMDoor. Once a command 5 has been defined as a DOSCOMMAND it is not necessary to use the "DOS" prefix when telling REMDoor to run the program. It is also possible to use the DOSCOMMAND parameter to override an internal REMDoor command. For example, if the configuration file contains the line "DOSCOMMAND=FGREP" REMDoor would replace the internal FGREP command with a DOS program named FGREP. EXCLUDE=list_of_drive_letters The EXCLUDE parameter gives you a way to exclude certain disk drives from use by REMDoor. REMDoor attempts to insure that a specified drive is available before attempting to access the drive. Some computers and/or versions of MS-DOS will report a non-existent drive as being valid. If this happens you can use the EXCLUDE parameter to signal that a drive letter is never valid. For example, to exclude the A: drive and the G: drive the parameter would be EXCLUDE=AG. TIMEOUT=n (n in seconds) Setting the TIMEOUT parameter changes the default keyboard timeout value which is 600 seconds. PASSWORD=password If you need an additional level of security for gaining access to REMDOOR you can use the PASSWORD parameter. If the PASSWORD parameter is set when REMDoor starts it will first display the file REMDOOR.TXT, if it exists, and then display a password prompt. REMDOOR.TXT could be used to display a message to the remote caller letting them know that if they don't know the password they shouldn't be running REMDoor. The user will have three attempts to enter the password correctly. If they can not supply the password they will be disconnected and REMDoor will recycle to the BBS. If the LOGFILE parameter (see below) is set invalid password attempts will be logged in the log file. 6 LOGFILE=ON or LOGFILE=OFF [default] Setting the LOGFILE parameter causes REMDoor to write messages to the file REMDOOR.LOG. In this version the only messages being recorded are the time the door is opened and closed and invalid password attempts. Additional log file messages will probably be added in future versions. WATCHDOG=ON or WATCHDOG=OFF [default] Setting WATCHDOG=ON causes REMDoor to monitor the carrier detect signal while running DOS programs. If the carrier detect signal is dropped while a DOS program is running REMDoor will halt the DOS program and return control of the computer to the BBS software. The method used by REMDoor to regain control of the computer if the carrier detect signal is dropped may not be compatible with all multitasking programs. If you are running REMDoor under multitasking software and wish to use the WATCHDOG option you may wish to test your configuration at a time when someone is available to reboot the computer if WATCHDOG should cause the computer to "hang". REBOOT=ON or REBOOT=OFF [default] Setting REBOOT=ON causes REMDoor to monitor the carrier detect signal while running DOS programs. Unlike the WATCHDOG parameter, setting REBOOT=ON does not attempt to regain control of the computer, it simply reboots the machine if carrier is lost. If it is safe to reboot (no multitasking, etc.) then this is probably the "cleanest" way to regain control of the computer. 7 ENTERING COMMANDS REMDoor includes a command line editor which is patterned after Chris Dunford's command line editor CED. The following keys are supported (the remote keys are based on the WordStar "diamond"): Remote Keyboard Local Keyboard Function Backspace (^H) same deletes the character to the left of the cursor Delete or ^G DEL or ^G deletes the character under the cursor ESC same erase the entire command ^S Left Arrow move the cursor one position to the left ^D Right Arrow move the cursor one position to the right ^A Ctrl-Left Arrow move the cursor one word to the left ^F Ctrl-Right Arrow move the cursor one word to the right ^QS HOME move the cursor to the first character in the line ^QD END move the cursor to the end of the line The command editor also supports a command recall buffer which contains the last 20 commands (commands 8 of 2 characters are not remembered). You may scroll through the recall buffer using the following keys: Remote Keyboard Local Keyboard Function ^E Up Arrow Scroll backward ^X Down Arrow Scroll forward EXECUTING COMMANDS Most REMDoor commands will pause after every page of output (see the WINDOW command). In addition XON/XOFF flow control is fully supported for internal REMDoor commands. Any internal REMDoor command can be halted at any point (either remotely or locally) by typing ^C, many external DOS programs can also be halted by typing ^C. OUTPUT REDIRECTION REMDoor supports the DOS redirection operators '>' and '>>'. Output from most internal commands and all external DOS programs can be redirected. Certain internal commands do not allow redirection. For example: CLS >tmp.dat will produce an error message. This is different that the result you would get from DOS which would dump the ANSI clear screen sequence into the file. Also commands which would normally produce "paged" output such as DIR automatically switch to continuous output when the output is redirected to a file. Redirection of output to a device, such as LPT1, is not allowed. Input redirection is not supported. 9 LOCAL SYSOP FUNCTIONS The following function keys are active at the local keyboard. F10 - chat mode (ESC to exit chat mode). COMMAND REFERENCE ARCV [options] file_spec1 [file_spec2 ...] option switches: -N (non-stop display) overrides the current WINDOW setting. ARCV displays the contents of one or more archive files. ARCV is a shameless clone of Vern Buerg's excellent ARCV program. CHDIR [directory] or CD [directory] The CD command functions just like the DOS CD command. CD with no directory argument returns the current directory. CLS Clears the screen and homes the cursor. COPY [options] file_spec1 [file_spec2 ...] [destination] option switches: -P prompt with the name of each file found before coping. -O overwrite existing files without prompting. 10 Functions just like the DOS copy command except that the "concatenate" mode is not supported. Wildcards are fully supported. In addition it is possible to copy multiple sets of files to a single destination. If destination is a file name then source_file must not contain a wild card. COPY will ask for confirmation before overwriting an existing file unless the '-O' option switch is given. DIR [options] [file_spec1 file_spec2 ...] option switches: -W similar to the DOS /W option. -N (non-stop display) overrides the current WINDOW setting. -A display all files (including hidden files) and file attributes in addition to the other information (column listing only). DIR with no options looks just like the DOS dir command. DIR differs from the DOS dir command in that it supports multiple file_spec's. When displaying files DIR displays all files matching file_spec1 followed by all files matching file_spec2 ... No attempt is made to eliminate duplicates caused by overlapping file specs. DOS dos_command_line or !dos_command_line The DOS command allows you to execute DOS programs from inside REMDoor. Any DOS program which allows output to be redirected to the communications port can be run from inside REMDoor. Obviously, programs which write directly to the PC screen or take control of the keyboard interrupt can not be run remotely. Also, while all internal REMDoor commands are fully SHARE 11 compatible, many DOS programs are not. Be aware of the possibility of SHARE violations when running DOS programs remotely. DSZ dsz_command_line DSZ allows you to execute the DSZ program to transfer files while running REMDoor. REMDoor calls DSZ passing dsz_command_line to DSZ. It is not necessary to use the DSZ parameter "CON" since REMDoor does not redirect the screen output to the communications port. EDIT file_name EDIT is a simple line-oriented editor (no word-wrap, paragraph formatting, etc). Lines are limited to 254 characters in length, longer lines will be truncated. The commands are based on WordStar, but only a very limited set of WordStar commands are currently implemented. EDIT edits files in memory so the size of the files which may be edited is limited by the available memory. On a 640K machine with few TSR's the limit is greater than 100K [your milage may vary]. In a multitasking environment it is possible for a file to be altered by another user while it is being edited. EDIT checks the size of the file and the time stamp before resaving it. If either have changed you will be warned and allowed to save the file under another name. If a file is locked by another user when you try to save it you will also be given the opportunity to save the file under another name. The size of the editing window is controlled by the current WINDOW setting. The edit window will be the same size as the WINDOW setting and display window_size - 2 lines of text. This allows you to limit the number of lines EDIT displays which cuts down on the time it takes to redraw the screen. This can be useful if you are connected at low baud rates. 12 The commands which are currently implemented are: File commands Remote Keyboard Local Keyboard Function ^KX same save file and exit ^KQ same quit without saving file ^KS same save file and continue editing ^KR same read a file adding the text above the current line Block commands Remote Keyboard Local Keyboard Function ^KB same mark the beginning of a block ^KK same mark the end of a block ^KH same turn off the block markers ^KC same copy marked block to the current line ^KM same move marked block to the current line ^KY same delete marked block ^KW same write a marked block to a file 13 Cursor movement commands Remote Keyboard Local Keyboard Function ^S Left Arrow move the cursor one position to the left ^D Right Arrow move the cursor one position to the right ^E Up Arrow move the cursor one line up ^X Down Arrow move the cursor one line down ^A Ctrl-Left Arrow move the cursor one word to the left ^F Ctrl-Right Arrow move the cursor one word to the right ^QS HOME move the cursor to the first character in the line ^QD END move the cursor to the end of the line ^QE same move the cursor to the first screen line ^QX same move the cursor to the last screen line ^R PgUp page up one screen ^C PgDn page down one screen ^W same scroll the screen up one line ^Z same scroll the screen down one line 14 ^QR same move the cursor to the first line of the file ^QC same move the cursor to the last line of the file ^QG same go to line # Character editing commands Remote Keyboard Local Keyboard Function Backspace (^H) same deletes the character to the left of the cursor Delete or ^G DEL or ^G deletes the character under the cursor ^V ^V or INS toggle between Insert and Typeover mode Line editing commands Remote Keyboard Local Keyboard Function ^N same insert a line below the current line ^Y same delete the current line Misc commands ^KF same find a string in the file ^L same refresh the remote screen 15 ERASE [options] file_spec1 [file_spec2 ...] or DEL [options] file_spec1 [file_spec2 ...] option switches: -A (include all files) include hidden files which match the file_spec -P prompt with the name of each file found before erasing. ERASE functions just like the DOS erase command but allows you to erase multiple files with one command. EXIT Return control to the BBS software. FIND [options] file_spec1 [file_spec2 ...] option switches: -N (non-stop display) overrides the current WINDOW setting. FIND searches all available hard disks for files matching the file_spec's. FGREP [options] string file_spec1 [file_spec2 ...] option switches: -C (case sensitive) make the search case sensitive -F display only names of files which contain a match -O (zero) display file name only, not matching lines -N (non-stop display) overrides the current WINDOW setting. 16 FGREP scans all files matching the file_spec's and displays lines which contain the pattern string (only the first 80 characters of the line is displayed). Strings which contain spaces must be enclosed in quotes. FREE [drive_spec] FREE reports the available space for a disk drive. With no arguments it reports for all available drives. HELP [command name] HELP with no arguments displays a list of all REMDoor commands. HELP followed by a command name gives specific help for that command. MKDIR directory_name or MD directory_name MKDIR functions just like the DOS mkdir command. MOVE [options] file_spec1 [file_spec2 ...] destination option switches: -P prompt with the name of each file found before moving. Functions just like the DOS move command would operate if IBM had chosen to implement it. Wildcards are fully supported. The destination must be a directory or drive_spec. MOVE as a rename function is not supported. MOVE will not overwrite existing files. 17 REFRESH REFRESH redraws the remote screen. This can be useful if line noise garbles the remote display. RENAME old_file_name new_file_name or REN old_file_name new_file_name RENAME functions just like the DOS rename command except that wild cards are not supported. RMDIR directory_name or RD directory_name Functions just like the DOS rmdir command. TIME TIME displays the time of day and the elapsed time that REMDoor has been active. TIMEOUT [n] The TIMEOUT command sets the keyboard inactivity timeout to n seconds. If n is equal to 0 then REMDoor will not drop carrier after extended periods of inactivity. The default TIMEOUT value is 600 seconds (10 minutes). TIMEOUT with no argument displays the current timeout value. NOTE: One use for the TIMEOUT command is to allow for "unattended" file transfers. First set TIMEOUT to some small value. Then use the DSZ command to start a file transfer. After the transfer is completed REMDoor will timeout and return control to the BBS software. 18 TYPE [options] file_spec1 file_spec2 option switches: -N (non-stop display) overrides the current WINDOW setting. TYPE functions just like the DOS type command except that it supports multiple file_spec's. Files are displayed in the order found with no attempt to remove duplicates caused by overlapping file_spec's. UPDATE [file_mask] destination UPDATE copies files from the current directory to the destination directory if: 1) The file exists in both the current and destination directory. and 2) The copy in the current directory is newer than the one in the destination directory. UPDATE will attempt to copy all files which need to be updated keeping track of any files which can not be copied because one or the other copy is currently locked by another user. It will then try up to 5 more times to copy any that are locked waiting between each try for a chance for the other process to unlock the file. If the file_mask is omitted the default is to test all files in the current directory. VER VER displays the REMDoor version number. 19 WINDOW [n] (n must be between 0 and 24) The WINDOW command set the current page length to n. If n is equal to 0 then REMDoor will not pause after each page of output (continuous display). WINDOW with no argument displays the current window size. ZIPV [options] file_spec1[.ZIP] [file_spec2[.ZIP] ... ] option switches: -N (non-stop display) overrides the current WINDOW setting. ZIPV displays the contents of one or more ZIP files. It uses the same output format as the internal ARCV command. 20 LICENSE INFORMATION REMDoor is shareware. The program and its accompanying documentation ("software") are not public domain. The software is fully protected by copyright and all rights are reserved. You are hereby granted a license, without charge, to use the software for a period of time sufficient for evaluation and testing. Continued use of the software after this reasonable trial period requires payment of a shareware license fee in the amount of $ 20. Individuals who pay the shareware license fee may use the software on all machines that they use or own. Corporations should contact the author at the address below for site licensing information. Registered REMDoor users will receive notification of major program revisions and will receive telephone support from the author. To register your copy of REMDoor send a check or money order to: Ken Brown 5707 Jamestown Rd, Apt 2 Hyattsville, MD 20782 DISTRIBUTION You are encouraged to share copies of the software with others so that they may evaluate REMDoor so long as the following conditions are met: (1) The program and its accompanying documentation must be distributed without modification of any kind; (2) No remuneration may be received in exchange for the software. This does not preclude electronic information services or bulletin board systems that charge fees from distributing the software so long as no amount beyond customary access charges or membership fees is associated with download of REMDoor. 21 Users groups and other not-for-profit organizations that distribute REMDoor may charge a reasonable fee to cover duplication and related costs. No for-profit organization is authorized to charge any amount for distribution of copies of the software, to include copies of the software with sales of their own products or to include the software on any media for which money is charged. WARRANTY INFORMATION This software is distributed without warranties of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. No representation or other affirmation of fact, including but not limited to statements regarding suitability for use, or performance of the programs, shall be or be deemed a warranty by the licensor for any purpose, nor give rise to any liability or obligation of the licensor whatever. In particular, no statement in program documentation shall be deemed a representation or warranty that the programs will perform in any particular manner, or perform in any manner whatsoever, or that the programs are suitable for any particular use or any use at all. ACKNOWLEDGEMENTS WordStar is a registered trademark of Micropro International Corporation. DSZ is a trademark of Omen Technology Inc. CED is a trademark of The Cove Software Group. ARCV is a trademark of Vernon Buerg. JaxHost is a trademark of Jack Kilday. Thanks to Bob Blacher, sysop of the Computer Connection BBS, who came up with the idea for REMDoor. All I did was code it, right Bob?