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!

My company switched to putty. What do I use for scripts like ASPECT?

Status
Not open for further replies.

chris86t

Technical User
Jun 13, 2008
41
US
My company recently switched to putty because of SSH. I have several aspect scripts I use daily that no longer do me any good. My most important one captures text from the screen in procomm and saves it to a file.

I either need to make procomm/aspect capture text from the putty screen, or need to find an alternative scripting program to do this, or find a way to make procomm connect over SSH. Any ideas?
 
Have you tried searching the past posts in this forum? I thought I had seen someone post on how to use Procomm in conjunction with some ssh program (not sure if it was putty). I don't have much experience in this scenario myself.

 
At work, I have to log into a linux drive on our network. This requires using ssh to connect to the drive.

I installed Cygwin on my PC. Cygwin is a free Linux-like environment for Windows.


I setup cygwin as a telnet server, then I use a connection directory in Procom to tlenet to my own PC, login to Cygwin and then ssh from there to the linux drive.

Using this method you can ssh to anything and still use all of Procom's scripting abilities.

Following is a script I use:

Code:
#define _RUSTY      "10.30.248.41"
#define _LOGONID    $USERID     
#define _PW         $PASSWORD   

proc main

    when USEREXIT call ExitProgram         ; if user exits via esc, close etc.
    PWNewTitleProc()

    transmit "^m"
    waitfor "login:" 60
    if SUCCESS
        transmit _LOGONID
        transmit "^m"
        waitfor "password" 5
        if SUCCESS
            transmit _PW
            transmit "^m"
        else
            errormsg "Failed to login to Cygwin"
            exit
        endif
    else
        errormsg "Failed to connect to Cygwin"
        exit
    endif

    waitquiet 1
    strfmt s0 "ssh %s^m" _RUSTY
    transmit s0
    waitfor "password:" 5
    if SUCCESS
        transmit "password"
        transmit "^m"
        waitfor "cacman]$" 5
        if FAILURE
            errormsg "Failed to login to Rusty"
            exit
        endif
    else
        errormsg "Failed to connect to Rusty"
        exit
    endif


endproc

;///////////////////////////////////////////////////////////
;   EXITPROGRAM
;
;   This procedure updates the hint counter and STARTUP.WAX information upon
;   exiting the script.
;
;   Called by: when USEREXIT
;///////////////////////////////////////////////////////////
proc ExitProgram

    termmsg "`r`n"
    termmsg "`r`n"
    termmsg "*****************************************`r`n"
    termmsg "**** User exited script.`r`n"
    termmsg "*****************************************`r`n"
    termmsg "`r`n"
    termmsg "`r`n"

    statclear
    exit

endproc

;///////////////////////////////////////////////////////////
; Display the the name of the Connection Directory entry that
; established the current connection in the title bar for Procomm Plus.
;///////////////////////////////////////////////////////////
proc PWNewTitleProc
    string NewTitleStr                ; New title for Procomm Plus.

    strfmt NewTitleStr "Procomm Plus - %s - %s" $DIALCONNECT,$IPADDRESS
    pwtitlebar NewTitleStr PERMANENT           ; Change Procomm Plus's title.

endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top