Discussion:
[rancid] h3clogin
N K Krishnan
2011-02-21 22:06:24 UTC
Permalink
ran into the same problem and after staring at the debug output for a while,
moved the sending of the "\r" to after the expect block.


# we are logged in, now figure out the full prompt
# send "\r"
expect {
-re "\[\r\n]+" { exp_continue; }
-re "^.+$prompt" { set junk $expect_out(0,string);
regsub -all "\[\]\[]" $junk {\\&} prompt;
}
-re "^.+> \\\(enable\\\)" {
set junk $expect_out(0,string);
regsub -all "\[\]\[]" $junk {\\&} prompt;
}
}
send "\r"

and that seemed to have the desired result.
Jethro R Binks
2011-02-21 22:50:45 UTC
Permalink
Post by N K Krishnan
ran into the same problem and after staring at the debug output for a
while, moved the sending of the "\r" to after the expect block.
I have just tonight 'finished' some major work re-writing all this stuff,
and I've had a couple of people testing it - sorry I didn't say anything
maybe a day or two sooner, and saved you some staring effort!

At the moment I'm updating the website and I'll upload the new versions
presently, but I will also send you the current h3clogin privately so you
can test with your equipment.

Thanks particularly to Ugo Bellavance who has patiently tested various
versions and sent me debug output and commentary, and to Alexander
Belokopytov who gave me remote access to some equipment which proved
useful at one point.

Jethro.


. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.

Loading...