password query fails - Protocols

This is a discussion on password query fails - Protocols ; Hello, fist of all, iam a kermit newbie. I want to write a script that restarts every night the Accesspoints of our University (round about 40). It seems to be easy, but i have a few problems: The password query ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: password query fails

  1. password query fails

    Hello,

    fist of all, iam a kermit newbie.

    I want to write a script that restarts every night the Accesspoints of our
    University (round about
    40). It seems to be easy, but i have a few problems:

    The password query works a few times only , sometimes it works, sometimes it
    fails (But if the
    password query was successfull, the rest of the script works fine). I dont
    know why (If i set a
    pause between in+output it fails to 100 percent). If i take a look at
    \v(input) it shows no
    diferrence between a succesfull login or a bad login. It shows always:
     <- It seems to be
    strange to me, why is it so cryptic, why is it not "password:"??

    OS -> AIX, C-Kermit 800209, here is my script:

    #!/opt/bin/kermit +
    # Restart mit Argumentenliste

    # Logfile wird angelegt und geoeffnet
    ..filename := \v(home)command.log
    fopen /append \%c \m(filename)
    fwrite /line \%c \v(date) - \v(time) - Host=\%1 - \%2 \13

    # Fehler Routine
    define errmsg {
    fwrite /line \%c \%1 \%2 \13
    fclose \%c
    close
    exit
    }

    set input echo on
    set exit warning off

    clear
    set host /nowait \%1
    if fail errmsg Err_No_Verbindung

    input 10 password:
    if fail errmsg no_passwortprompt \v(input)
    output mypwd\13

    input 10 \fpattern(*admin]>)
    if fail errmsg no_mainmenu \v(input)

    output 3

    input 10 \fpattern(*admin]>)
    if fail errmsg no_configmenu \v(input)
    output 5

    input 10 "Are you sure [y/n] ? "
    if fail errmsg no_restartprompt \v(input)
    output y\13

    fwrite /line \%c Success \v(input) \13
    fclose \%c
    close
    clear
    exit

    Any Ideas?

    Kind regards,

    Michael Poser

    --
    Michael Poser,
    Goethe Universitaet Frankfurt am Main
    Hochschulrechenzentrum - Abteilung Netze
    Germany



  2. Re: password query fails

    In article , Michael Poser wrote:
    : fist of all, iam a kermit newbie.
    :
    : I want to write a script that restarts every night the Accesspoints of
    : our University (round about 40). It seems to be easy, but i have a few
    : problems:
    :
    : The password query works a few times only , sometimes it works,
    : sometimes it fails (But if the password query was successfull, the rest
    : of the script works fine). I dont know why (If i set a pause between
    : in+output it fails to 100 percent). If i take a look at \v(input) it
    : shows no diferrence between a succesfull login or a bad login. It shows
    : always:

    :  <- It seems to be strange to me, why is it so cryptic,
    : why is it not "password:"??
    :
    This is explained in "Using C-Kermit" on page 429 (English edition).
    In some cases, escape sequences can interfere with INPUT matching.
    You have to write your INPUT command in a way that allows for the
    escape sequences. To find out what the host is really sending and in
    what sequence, use "log session" to record your login, and then write
    your script according to what you find there.

    An easier to do this might be to let Kermit write the script for you:

    learn /on script.ksc

    then perform the login sequence by hand, then:

    learn /close

    Then look at the script.ksc file to see what it wrote.

    - Frank

+ Reply to Thread