Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with transmit to serial port

Status
Not open for further replies.

ccpjim

Vendor
Sep 25, 2008
10
US
I am creating a simple aspect script in Procomm to find the installer password to an Mitel SX200 system. The installer is out of business and in short of paying to relicense I want to just submit numeric access codes into the system. I created a for next loop and add 1 to the number, but I can't get it to send to serial port using transmit. I can display the variable on the screen but can't send it out to the serial port. This is what I have:

proc main
integer Num ; Integer variable to increment.
for Num = 998 upto 9999 by 1 ; Init variable and define loop.
transmit "^M"
waitfor "SELECT A TERMINAL TYPE : "
transmit "1^M"
waitfor "SELECT AN APPLICATION ( OR QUIT TO START OVER ) : "
transmit "2^M"
waitfor "ENTER USERNAME : "
transmit "INSTALLER^M"
waitfor "ENTER PASSWORD : "
usermsg "Num = %d" Num
transmit "Num"
waitfor "Authorization failure"
endfor

endproc

It would also be nice that if it is successful that it logs the password or at least stops. That is why the
waitfor "Authorization failure" is there.
Any help is greatly appreciated.
 
Yes, All commands work manually. I have taken even another laptop with a null modem cable and when I run the script I get "Num" instead of the number I'm trying to transmit. When I view the screen from the usermsg "Num = %d" Num, I do get the numbers being sent. If I use the comwrite command I get binary characters being sent.
 
I belive you problem can be in the line:
Code:
transmit "Num"
which only sends the literal word "Num", and not the
value of Num (an integer between 999 and 9999).

Think you need to add something like this into your script:
Code:
string number
integer Num
for Num = 998 upto 9999

strfmt number "%d^M" Num   ; Make "number" = Num followed by a CR
transmit number            ; and then transmit it

HTH :)
 
Thanks to geirendre for the follow up. This was what I needed to piece together the following script for cracking the Mitel SX200 password.
proc main
string number
integer Num
for Num = 1000 upto 9999 ; Numeric value to transmit
strfmt number "%d^M" Num ; Make "number" = Num followed by a CR
transmit "^M"
waitfor "SELECT A TERMINAL TYPE : "
transmit "1^M"
waitfor "SELECT AN APPLICATION ( OR QUIT TO START OVER ) : "
transmit "2^M"
waitfor "ENTER USERNAME : "
transmit "INSTALLER^M"
waitfor "ENTER PASSWORD : "
transmit number ; and then transmit it
waitfor "Authorization failure"
mspause 100 ; pause for dispay of Authorization failure
statmsg "Num = %d" Num ; Display value of var on status line.
mspause 100 ; pause for statmsg "Num = %d" Num
endfor
endproc

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top