MyFlight
Technical User
- Feb 4, 2002
- 193
HELP,
I have been tasked with changing passwords in our PBX’s. I have started a script file, but ran out of idea’s (oh yeah and kind of reached my limitation too). Any help provided would be greatly appreciated.
Here is what I need to do:
1. Provide an Edit Box to Enter the New Password assigned to the String TextStr
2. Log into the PBX with the Known Logon $USERID and Password $PASSWORD.
3. Next enter the Modify Login_Profile Command "MOD LOGIN_PROFILE^M".
4. The system Prompts you for the New Password "PASSWORD: ", then asks you to confirm it "RETYPE PASSWORD: ". Enter the String TextStr for Both Prompts.
5. Next the Families and Sections section comes up (Shows the Administrator authorizations for this particular Login). A PERIOD and Ctrl-J Steps through this section. Once completed you are automatically moved to the next section (Step-5)
6. The Verbs and Nouns Section comes up (this is a list of the specific Commands authorized). I need to Step though this Section by entering a PERIOD and Ctrl-J (this is done until the “MD “ at the Start of the Line changes to a “CR “). Entering a PERIOD and Ctrl-J , completes this task and takes you back to the “COMMAND:” Prompt.
7. Finally entering a “BYE^M” takes you to the % (Percent) Prompt.
8. The PBX,if it has a Standby CPU installed will run Backups (shown by: AUTO STANDBY UPDATES IN PROGRESS, once the Backups are Completed (AUTO STANDBY UPDATES COMPLETED) enter “BYE^M” to move back to the Login Screen.
9. Hang Up
10. Is there a way I can Update the Dialing Directory automatically (ie. Set TextStr = $PASSWORD)??
Below is an Example of the Prompts from my Capture File:
COMMAND: MOD LOGON_PROFILE
NAME (1-12 CHARS): TRAFFIC
PASSWORD:
RETYPE PASSWORD:
F A M I L I E S A N D S E C T I O N S
FAMILY SEC FAMILY SEC FAMILY SEC
--------------- --- --------------- --- --------------- ---
MD SYSTEM_ADMIN ALL SYSTEM_MAINT ALL DATA_MANAGER ALL
MD DATA_MAINT ALL ACD_ADMIN ALL
CR .
V E R B S A N D N O U N S
VERB NOUN NOUN NOUN
--------------- ------------------ ------------------ ------------------
MD LIST SPEED FEAT_CODE FIRST_DIGIT
MD LIST .ARAM COS_FEAT SLI
MD .ODIFY TRAF_INTERVAL
MD .OUNT SPEED FEAT_CODE FIRST_DIGIT
MD .OAD STBY
MD .LEAR ERRH TRAF RPET
MD .ET TRAF
MD .ONITOR TRAF EXTEN TRK
MD .IAG
MD .NFG
CR .
Here is the Script File I Have so Far:
proc main
string TextStr
integer Event
if $CONNECTOPEN ; check for connection...
WHEN TARGET 0 "NO MATCH" CALL iLogoff
WHEN TARGET 1 " F A M I L I E S A N D S E C T I O N S" CALL CtrlJ
WHEN TARGET 2 " V E R B S A N D N O U N S" CALL CtrlJ
WHEN TARGET 3 "AUTO STANDBY UPDATES IN PROGRESS - CNFG ACTIVITY WILL BE SUSPENDED." Call WaitLogoff
; Define and display dialog with edit box.
dialogbox 0 286 116 127 55 11 " Enter the NEW Password"
editbox 1 18 12 91 12 TextStr
pushbutton 2 40 31 50 14 "OK"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
else
usermsg "No text entered."
endif
usermsg "Proceed to the COMMAND Prompt!"
transmit "MOD LOGON_PROFILE^M"
waitfor "NAME (1-12 CHARS): ^]"
transmit "TRAFFIC^M"
waitfor "PASSWORD: ^]"
if nullstr TextStr
Transmit "LONESTAR^M"
waitfor "RETYPE PASSWORD: ^]"
Transmit "LONESTAR^M"
else
strcat TextStr "^M"
Transmit TextStr
waitfor "RETYPE PASSWORD: ^]"
transmit TextStr
endif
waitfor "COMMAND: ^]"
transmit "by^M"
waitfor "% ^]"
transmit "by^M"
else
errormsg " The modem has lost the connection.. Please Reconnect."
halt
endif
hangup
endproc
proc CtrlJexit
transmit ".^J"
endproc
proc CtrlJ
string CmdPrmpt
integer i
CmdPrmpt = "COMMAND: ^]"
WHEN TARGET 4 "CR ^]" CALL CtrlJexit
for i = 1 upto CmdPrmpt
transmit ".^J"
endfor
endproc
proc iLogoff
transmit "BYE^M"
waitfor "% ^]"
transmit "BYE^M"
hangup
usermsg "the TRAFFIC Login was NOT Configured!"
halt
endproc
proc WaitLogoff
waitfor "AUTO STANDBY UPDATES COMPLETED" FOREVER
transmit "BYE^M"
hangup
usermsg "the TRAFFIC Login was NOT Configured!"
halt
endproc
Any and all help or suggestions will be greatly appreciated.
I have been tasked with changing passwords in our PBX’s. I have started a script file, but ran out of idea’s (oh yeah and kind of reached my limitation too). Any help provided would be greatly appreciated.
Here is what I need to do:
1. Provide an Edit Box to Enter the New Password assigned to the String TextStr
2. Log into the PBX with the Known Logon $USERID and Password $PASSWORD.
3. Next enter the Modify Login_Profile Command "MOD LOGIN_PROFILE^M".
4. The system Prompts you for the New Password "PASSWORD: ", then asks you to confirm it "RETYPE PASSWORD: ". Enter the String TextStr for Both Prompts.
5. Next the Families and Sections section comes up (Shows the Administrator authorizations for this particular Login). A PERIOD and Ctrl-J Steps through this section. Once completed you are automatically moved to the next section (Step-5)
6. The Verbs and Nouns Section comes up (this is a list of the specific Commands authorized). I need to Step though this Section by entering a PERIOD and Ctrl-J (this is done until the “MD “ at the Start of the Line changes to a “CR “). Entering a PERIOD and Ctrl-J , completes this task and takes you back to the “COMMAND:” Prompt.
7. Finally entering a “BYE^M” takes you to the % (Percent) Prompt.
8. The PBX,if it has a Standby CPU installed will run Backups (shown by: AUTO STANDBY UPDATES IN PROGRESS, once the Backups are Completed (AUTO STANDBY UPDATES COMPLETED) enter “BYE^M” to move back to the Login Screen.
9. Hang Up
10. Is there a way I can Update the Dialing Directory automatically (ie. Set TextStr = $PASSWORD)??
Below is an Example of the Prompts from my Capture File:
COMMAND: MOD LOGON_PROFILE
NAME (1-12 CHARS): TRAFFIC
PASSWORD:
RETYPE PASSWORD:
F A M I L I E S A N D S E C T I O N S
FAMILY SEC FAMILY SEC FAMILY SEC
--------------- --- --------------- --- --------------- ---
MD SYSTEM_ADMIN ALL SYSTEM_MAINT ALL DATA_MANAGER ALL
MD DATA_MAINT ALL ACD_ADMIN ALL
CR .
V E R B S A N D N O U N S
VERB NOUN NOUN NOUN
--------------- ------------------ ------------------ ------------------
MD LIST SPEED FEAT_CODE FIRST_DIGIT
MD LIST .ARAM COS_FEAT SLI
MD .ODIFY TRAF_INTERVAL
MD .OUNT SPEED FEAT_CODE FIRST_DIGIT
MD .OAD STBY
MD .LEAR ERRH TRAF RPET
MD .ET TRAF
MD .ONITOR TRAF EXTEN TRK
MD .IAG
MD .NFG
CR .
Here is the Script File I Have so Far:
Code:
string TextStr
integer Event
if $CONNECTOPEN ; check for connection...
WHEN TARGET 0 "NO MATCH" CALL iLogoff
WHEN TARGET 1 " F A M I L I E S A N D S E C T I O N S" CALL CtrlJ
WHEN TARGET 2 " V E R B S A N D N O U N S" CALL CtrlJ
WHEN TARGET 3 "AUTO STANDBY UPDATES IN PROGRESS - CNFG ACTIVITY WILL BE SUSPENDED." Call WaitLogoff
; Define and display dialog with edit box.
dialogbox 0 286 116 127 55 11 " Enter the NEW Password"
editbox 1 18 12 91 12 TextStr
pushbutton 2 40 31 50 14 "OK"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
else
usermsg "No text entered."
endif
usermsg "Proceed to the COMMAND Prompt!"
transmit "MOD LOGON_PROFILE^M"
waitfor "NAME (1-12 CHARS): ^]"
transmit "TRAFFIC^M"
waitfor "PASSWORD: ^]"
if nullstr TextStr
Transmit "LONESTAR^M"
waitfor "RETYPE PASSWORD: ^]"
Transmit "LONESTAR^M"
else
strcat TextStr "^M"
Transmit TextStr
waitfor "RETYPE PASSWORD: ^]"
transmit TextStr
endif
waitfor "COMMAND: ^]"
transmit "by^M"
waitfor "% ^]"
transmit "by^M"
else
errormsg " The modem has lost the connection.. Please Reconnect."
halt
endif
hangup
endproc
proc CtrlJexit
transmit ".^J"
endproc
proc CtrlJ
string CmdPrmpt
integer i
CmdPrmpt = "COMMAND: ^]"
WHEN TARGET 4 "CR ^]" CALL CtrlJexit
for i = 1 upto CmdPrmpt
transmit ".^J"
endfor
endproc
proc iLogoff
transmit "BYE^M"
waitfor "% ^]"
transmit "BYE^M"
hangup
usermsg "the TRAFFIC Login was NOT Configured!"
halt
endproc
proc WaitLogoff
waitfor "AUTO STANDBY UPDATES COMPLETED" FOREVER
transmit "BYE^M"
hangup
usermsg "the TRAFFIC Login was NOT Configured!"
halt
endproc
Code:
Any and all help or suggestions will be greatly appreciated.