/////////////////////////////// RUNME1ST.SLT ///////////////////////////////// // // DESCRIPTION: This script will create the iNet Password file needed for // proper operation of INET-ON.SLT. This password file will be created in // your Telix Script directory (defined with the Telix command, under // 'Filenames and Paths'), and will be named INETPASS.WRD. // // CREDITS: This script is modelled after a script originally created by // Robert Wolfe. // // INSTRUCTIONS: Compile the script by typing 'CS RUNME1ST' from DOS. This // will produce a file call RUNME1ST.SLC, which should be copied into your // Telix Script directory if necessary. Then execute the file from Telix by // typing RUNME1ST. ( signifies holding the Alt key and typing // a G). // // The script INET-ON.SLT that accompanys this file must be modified with your // text editor or word processor (in ASCII, or DOS Text file mode) before // compiling. Simply load the INET-ON.SLT file into your text editor, and // follow the instructions inside. // ////////////////////////////////////////////////////////////////////////////// main() { int c, f, i, x = 4, y, digit, spchar; str s[80], password_file[64]; if (!_script_dir) { prints("No Script Directory defined. Please define and save the directory where your"); prints("Telix scripts are locates with the Telix command, and retry."); return(0); } else { fnstrip(_script_dir, 0, s); strupper(s); c = strlen(s); if (subchr(s, c - 1) != '\') copystr("\", s, c, 1); // add slash if necessary _script_dir = s; } password_file = _script_dir; // Telix script directory"); strcat(password_file, "INETPASS.WRD"); if (filefind(password_file)) { clear_scr(); printsc("^GAn iNet password file already exists. Replace it ? "); gets(s, 1); c = tolower(subchr(s, 0)); if (c != 'y') { prints("^M^JScript aborted."); return(0); } } f = fopen(password_file, "w"); if (!f) { prints("Error creating password file. Aborting..."); return(0); } fputs("003", f); // set pointer to start of passwords clear_scr(); prints("Please enter 12 iNet passwords in the following format:^M^J"); prints("1) Each password must be 6 to 8 characters long."); prints("2) The first character must be alphabetic or numeric."); prints("3) At least one character must be numeric."); prints("4) At least one character must be special, !, ?, %, *, etc."); pstraxy(" Please enter your CURRENT iNet password. ",0,10,112); while (x < 80) { digit = spchar = 0; pstraxy("ÕÍÑÍÑÍËÍ͸", x, y+12, 2); pstraxy("³ ³", x, y+13, 2); pstraxy("ÔÍÏÍÏÍÊÍ;", x, y+14, 2); if (getsxy(s, 8, x+1, y+13, 2) == -1) // Esc key hit? { fclose(f); s = "DEL "; strcat(s, password_file); dos(s, 2); // Delete password file (incomplete) clear_scr(); prints("Script aborted. INETPASS.WRD not created."); return(0); } c = subchr(s, 0); if (!isalnum(c)) continue; if (strlen(s) < 6) continue; for (i = 0; i <= strlen(s); ++i) { c = subchr(s,i); if (isdigit(c)) digit = 1; // numeric found if (!iscntrl(c) && !isalnum(c)) spchar = 1; // special found } if (!digit || !spchar) continue; fputs(s, f); fputs("^J", f); // line feed as delimeter pstraxy(" Please enter your next password in the box. ",0,10,112); y = y + 4; if (y > 9) { y = 0; x = x + 20; } } fclose(f); clear_scr(); printsc(_script_dir); prints("INETPASS.WRD created. Script complete."); prints("^M^JPlease refer to the instructions in the INET-ON.SLT file for the next step."); return(1); } //////////////////////////////// End of file /////////////////////////////////