Chatin and chatout strings
The probe uses chatin and chatout strings to log into and out of the target system.
Use the ChatinString property to specify the chatin string used to log in to the target system and the ChatoutString property to specify the chatout string used to disconnect from the target system.
Chat strings are contained in a single line. Chatin and chatout strings use the following expect-send and send-expect formats:
ChatinString
: expect send expect send
ChatoutString :
send expect send expect
Each element in a chat string is separated by white space. To send or expect a character sequence that includes white space, surround the sequence with single quotes. The expect string can use any regular expression. The send string can include any character, including control characters that use standard UNIX/C escape sequences.
This is an example of a typical chatin script:
.*login.*:.*anu\r\n.*password.*:.*anu\r\n
Escape codes
You can use C-style escape codes in the values of the ChatinString and ChatoutString properties.
For
example, the following chatin string sends a carriage return character
(\r
) after the user name and password:
ChatinString
: ".*: user\r .*: passwd\r .*:"
\\
), single quote (\'
),
and double quote (\"
) characters must be double-escaped.
For example, to send a backslash character (\
), use \\\\
.Escape code |
Character |
---|---|
|
Backspace character. |
|
Form-feed character. |
|
New-line character. |
|
Carriage return character. |
|
Tab character. |
|
Backslash character. |
|
Single quote character. |
|
Double quote character. |