I am in a situation where I need to connect to a list of devices that are using either telnet or ssh.
I want to try to telnet, if I receive any of the following I want to attempt ssh :
hai all,
i have an tcl script in which i have been reading the DUT Command prompt of an cisco switch as
DUT Command Prompt : cisco*
and running the test case of stp now the problem is if i have given any blank space in between the cisco or at the startup then the Expect is not identifying the... (0 Replies)
Does anyone know of an expect/tcl forum that is as helpful as this one is for shell scripting?
Or if anyone has any expect knowledge, can you please provide some guidance on how to write to a local error log based on output from a ssh session?
I have something like this:
foreach host... (2 Replies)
In the following "for" loop I assume the the script will expect "anyway", "first" NOT in any paticular order and send "yes" when there found, breaking out of the loop when "$prompt" is found. The way it is working is like 3 individual expect lines, and they MUST be in cronological order. ANY help... (0 Replies)
Can someone identify what is the problem here?.
no children
while executing
"exp_wait -nowait -i -1"
(procedure "logOptions" line 45)
invoked from within
"logOptions"
(procedure "doExecute" line 98)
invoked from within
"doExecute"
(procedure "main" line 32)
... (7 Replies)
Somewhat long story:
I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage.
This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
So here is what I am trying to do. I have a large # of switches and routers I am trying to log into. Unfortunately some have ssh only, some have telnet only. and some i have never logged into with ssh. I first want it to SSH, if i have never logged into the box it will ask for adding the ssh key. I... (0 Replies)
hi, I am new in Expect.
I have a question about expect timeout.
suppose I have a structure of
expect { ".."{
send"............"}
timeout{
...............
}
}
The silly question is if I reach timeout, how can I store the error message showing on the screen to... (2 Replies)
Hi gurus, I am trying to do some expect/TCL magic. My goal is to write some kind of password guessing script (nearly similar to dictionary attack against ssh). I read that this could be possible with expect/TCL, I am newbie in this language, its function and its terms so please be patient ;)
... (3 Replies)
The below error message I started seeing using Ubuntu 14.04 and was wondering if the forum has seen it because I cant seem much on the net for this:
perl -e 'use IO::Socket::SSL qw(debug3);IO::Socket::SSL->new(PeerAddr=>"10.0.0.100",PeerPort=> 443,Proto=>"TCP") or die $!'
DEBUG:... (1 Reply)
Discussion started by: metallica1973
1 Replies
10. Forum Support Area for Unregistered Users & Account Problems
Neo
Thanks for your reply to my original post, entitled "Problem changing the email address associated with my unix.com account".
I am unable to reply to you in that thread, as I am unable to log-on to unix.com!
From what you said about purging dormant accounts, it is likely that my account... (1 Reply)
Discussion started by: irb
1 Replies
LEARN ABOUT DEBIAN
poe::component::client::mpd::connection
POE::Component::Client::MPD::Connection(3pm) User Contributed Perl Documentation POE::Component::Client::MPD::Connection(3pm)NAME
POE::Component::Client::MPD::Connection - module handling the tcp connection with mpd
VERSION
version 1.121670
DESCRIPTION
This module will spawn a poe session responsible for low-level communication with mpd. It is written as a POE::Component::Client::TCP,
which is taking care of everything needed.
Note that you're not supposed to use this class directly: it's one of the helper class for POE::Component::Client::MPD.
ATTRIBUTES
host
The hostname of the mpd server. Mandatory, no default.
port
The port of the mpd server. Mandatory, no default.
id
The POE session id of the peer to dialog with. Mandatory, no default.
max_retries
How much time to attempt reconnection before giving up. Defaults to 5.
retry_wait
How much time to wait (in seconds) before attempting socket reconnection. Defaults to 2.
METHODS
my $id = POE::Component::Client::MPD::Connection->spawn( \%params );
This method will create a POE::Component::Client::TCP session responsible for low-level communication with mpd.
It will return the poe id of the session newly created.
PUBLIC EVENTS ACCEPTED
disconnect( )
Request the pococm-connection to be shutdown. This does not shut down the MPD server. No argument.
send( $message )
Request pococm-conn to send the $message over the wires. Note that this request is a POE::Component::Client::MPD::Message object properly
filled up, and that the "_commands()" attribute should not be newline terminated.
PUBLIC EVENTS FIRED
The following events are fired from the spawned session.
mpd_connected( $version )
Fired when the session is connected to a mpd server. This event isn't fired when the socket connection takes place, but when the session
has checked that remote peer is a real mpd server. $version is the advertised mpd server version.
mpd_connect_error_fatal( $errstr )
Fired when the session encounters a fatal error. This happens either when the session is connected to a server which happens to be
something else than a mpd server, or if there was more than "max_retries" (see "spawn()" params) connection retries in a row. $errstr will
contain the problem encountered. No retries will be done.
mpd_connect_error_retriable( $errstr )
Fired when the session has troubles connecting to the server. $errstr will point the faulty syscall that failed. Re-connection will be
tried after $retry_wait seconds (see "spawn()" params).
mpd_data( $msg )
Fired when $msg has been sent over the wires, and mpd server has answered with success. The actual output should be looked up in
"$msg-"_data>.
mpd_disconnected( )
Fired when the socket has been disconnected for whatever reason. Note that this event is not fired in the case of a programmed shutdown
(see "disconnect()" event above). A reconnection will be automatically re-tried after $retry_wait (see "spawn()" params).
mpd_error( $msg, $errstr )
Fired when $msg has been sent over the wires, and mpd server has answered with the error message $errstr.
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-15 POE::Component::Client::MPD::Connection(3pm)