mailbox125
Technical User
Here is the script I'm working on, I need this module to get the first line from an Excel spreadsheet and transmit it to the system I'm logged onto. The Excel spreadsheet will just be a list of passwords to be incremented by 1 for every system logged onto. Am I going about this all wrong I already have scripts for each of these sites however they require manual input to get to the Excel DB also. Help How do I get this automated I'd like to start this script before I go home and have it outcall and log into several systems without manual input. Any help would be great.
;*****************************************************************************
;* *
;* Getpass() *
;* The procedure Getpass performs a call to an Excel db for the password *
;* to loggon to the remote system. *
;* *
;* Calls: NONE *
;* Called by: MAIN *
;* Modifies globals: NONE *
;* *
;*****************************************************************************
String Passwfile = " "
Proc Getpass
String F_line
String Passw
Clear
Capture Off
Set Capture File "Current-System.TXT"
Set Capture Overwrite On
Transmit "Set dnldpath `"c:\Passw\Passw.txt`" ^M" ;*Enter Path to Text
;************* Load Text File *****************************************
Waitfor "@PASSWORD:"
If Fopen 0 Passwfile READ TEXT;
While not feof 0
Fgets 0 F_line
Strextract Passw F_line "," 0
Waitquiet 1
Transmit Passw
Transmit "^M"
Waitfor "@"
Transmit "L F^M"
Waitfor "@"
Endwhile
Fclose 0
Else
Errormsg "Invalid Dir File '%s'" Passwfile
Endif
Endproc
;*****************************************************************************
;* *
;* Getpass() *
;* The procedure Getpass performs a call to an Excel db for the password *
;* to loggon to the remote system. *
;* *
;* Calls: NONE *
;* Called by: MAIN *
;* Modifies globals: NONE *
;* *
;*****************************************************************************
String Passwfile = " "
Proc Getpass
String F_line
String Passw
Clear
Capture Off
Set Capture File "Current-System.TXT"
Set Capture Overwrite On
Transmit "Set dnldpath `"c:\Passw\Passw.txt`" ^M" ;*Enter Path to Text
;************* Load Text File *****************************************
Waitfor "@PASSWORD:"
If Fopen 0 Passwfile READ TEXT;
While not feof 0
Fgets 0 F_line
Strextract Passw F_line "," 0
Waitquiet 1
Transmit Passw
Transmit "^M"
Waitfor "@"
Transmit "L F^M"
Waitfor "@"
Endwhile
Fclose 0
Else
Errormsg "Invalid Dir File '%s'" Passwfile
Endif
Endproc