<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tbpindustries.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Heath</id>
	<title>TBP Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tbpindustries.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Heath"/>
	<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Special:Contributions/Heath"/>
	<updated>2026-05-12T22:45:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=115</id>
		<title>Autoexpect</title>
		<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=115"/>
		<updated>2019-05-10T15:18:15Z</updated>

		<summary type="html">&lt;p&gt;Heath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Autoexpect''' is a built-in script with expect [[https://wiki.tbpindustries.com/index.php?title=Expect]] that auto-generates an expect script from watching a session, basically autoexpect watches you interacting with another program and creates an Expect script that reproduces your interactions.&lt;br /&gt;
&lt;br /&gt;
Simply run &amp;lt;code&amp;gt;autoexpect&amp;lt;/code&amp;gt; and a new session will start. autoexpect will then begin recording your interactions until you stop it.&lt;br /&gt;
&lt;br /&gt;
This has the downside of recording full output and putting them into an expect field. This can be avoided by using the &amp;lt;code&amp;gt; - p &amp;lt;/code&amp;gt; flag which will put auto expect into prompt mode. In this mode, autoexpect will only look for the the last line of program output - which is usually the prompt. This handles the date problem (see above) and most others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See Also: Expect [[https://wiki.tbpindustries.com/index.php?title=Expect]]&lt;/div&gt;</summary>
		<author><name>Heath</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=114</id>
		<title>Autoexpect</title>
		<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=114"/>
		<updated>2019-05-10T15:17:54Z</updated>

		<summary type="html">&lt;p&gt;Heath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Autoexpect''' is a built-in script with expect [[https://wiki.tbpindustries.com/index.php?title=Expect]] that auto-generates an expect script from watching a session, basically autoexpect watches you interacting with another program and creates an Expect script that reproduces your interactions.&lt;br /&gt;
&lt;br /&gt;
just type &amp;lt;code&amp;gt;autoexpect&amp;lt;/code&amp;gt; and a new session will start. autoexpect will then begin recording your interactions until you stop it.&lt;br /&gt;
&lt;br /&gt;
This has the downside of recording full output and putting them into an expect field. This can be avoided by using the &amp;lt;code&amp;gt; - p &amp;lt;/code&amp;gt; flag which will put auto expect into prompt mode. In this mode, autoexpect will only look for the the last line of program output - which is usually the prompt. This handles the date problem (see above) and most others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See Also: Expect [[https://wiki.tbpindustries.com/index.php?title=Expect]]&lt;/div&gt;</summary>
		<author><name>Heath</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=113</id>
		<title>Autoexpect</title>
		<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Autoexpect&amp;diff=113"/>
		<updated>2019-05-10T15:17:44Z</updated>

		<summary type="html">&lt;p&gt;Heath: Created page with &amp;quot;'''Autoexpect''' is a built-in script with expecthttps://wiki.tbpindustries.com/index.php?title=Expect that auto-generates an expect script from watching a session, basica...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Autoexpect''' is a built-in script with expect[[https://wiki.tbpindustries.com/index.php?title=Expect]] that auto-generates an expect script from watching a session, basically autoexpect watches you interacting with another program and creates an Expect script that reproduces your interactions.&lt;br /&gt;
&lt;br /&gt;
just type &amp;lt;code&amp;gt;autoexpect&amp;lt;/code&amp;gt; and a new session will start. autoexpect will then begin recording your interactions until you stop it.&lt;br /&gt;
&lt;br /&gt;
This has the downside of recording full output and putting them into an expect field. This can be avoided by using the &amp;lt;code&amp;gt; - p &amp;lt;/code&amp;gt; flag which will put auto expect into prompt mode. In this mode, autoexpect will only look for the the last line of program output - which is usually the prompt. This handles the date problem (see above) and most others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See Also: Expect [[https://wiki.tbpindustries.com/index.php?title=Expect]]&lt;/div&gt;</summary>
		<author><name>Heath</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tbpindustries.com/index.php?title=Expect&amp;diff=112</id>
		<title>Expect</title>
		<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Expect&amp;diff=112"/>
		<updated>2019-05-10T15:14:53Z</updated>

		<summary type="html">&lt;p&gt;Heath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Expect&amp;lt;/strong&amp;gt; is a program that talks to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script. &lt;br /&gt;
&lt;br /&gt;
=ssh=&lt;br /&gt;
Expect can be used to do most things. Setting up ssh to auto connect using a command, such as &amp;quot;jump&amp;quot;, will automatically connect you to a secure shell if set up properly. &lt;br /&gt;
&lt;br /&gt;
The first script is a basic bash script which, then, calls to the expect script: &lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    jumper PASSWORD 12.345.67.89 USERNAME&lt;br /&gt;
&lt;br /&gt;
This bash script calls to the &amp;lt;code&amp;gt;jumper&amp;lt;/code&amp;gt; expect script:&lt;br /&gt;
&lt;br /&gt;
    #!/usr/bin/expect -f&lt;br /&gt;
    # set Variables&lt;br /&gt;
    set password [lrange $argv 0 0]&lt;br /&gt;
    set ipaddr [lrange $argv 1 1]&lt;br /&gt;
    set user [lrange $argv 2 2]&lt;br /&gt;
    # now connect to remote UNIX box (ipaddr) with given script to execute&lt;br /&gt;
    spawn ssh $user@$ipaddr&lt;br /&gt;
    match_max 100000&lt;br /&gt;
    # Look for passwod prompt&lt;br /&gt;
    expect &amp;quot;*?assword:*&amp;quot;&lt;br /&gt;
    # Send password aka $password&lt;br /&gt;
    send -- &amp;quot;$password\r&amp;quot;&lt;br /&gt;
    interact&lt;br /&gt;
&lt;br /&gt;
These both have to be set to executable by the owner of the files or by global with &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; and placed somewhere they are able to execute it from, e.g. /bin/.&lt;/div&gt;</summary>
		<author><name>Heath</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tbpindustries.com/index.php?title=Expect&amp;diff=111</id>
		<title>Expect</title>
		<link rel="alternate" type="text/html" href="https://wiki.tbpindustries.com/index.php?title=Expect&amp;diff=111"/>
		<updated>2019-05-10T15:14:25Z</updated>

		<summary type="html">&lt;p&gt;Heath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Expect&amp;lt;/strong&amp;gt; is a program that talks to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script. &lt;br /&gt;
&lt;br /&gt;
=ssh=&lt;br /&gt;
Expect can be used to do most things. Setting up ssh to auto connect using a command, such as &amp;quot;jump&amp;quot;, will automatically connect you to a secure shell if set up properly. &lt;br /&gt;
&lt;br /&gt;
The first script is a basic bash script which, then, calls to the expect script: &lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    jumper PASSWORD 12.345.67.89 USERNAME&lt;br /&gt;
&lt;br /&gt;
This bash script calls to the &amp;lt;code&amp;gt;jumper&amp;lt;/code&amp;gt; expect script:&lt;br /&gt;
&lt;br /&gt;
    #!/usr/bin/expect -f&lt;br /&gt;
    # set Variables&lt;br /&gt;
    set password [lrange $argv 0 0]&lt;br /&gt;
    set ipaddr [lrange $argv 1 1]&lt;br /&gt;
    set user [lrange $argv 2 2]&lt;br /&gt;
    # now connect to remote UNIX box (ipaddr) with given script to execute&lt;br /&gt;
    spawn ssh $user@$ipaddr&lt;br /&gt;
    match_max 100000&lt;br /&gt;
    # Look for passwod prompt&lt;br /&gt;
    expect &amp;quot;*?assword:*&amp;quot;&lt;br /&gt;
    # Send password aka $password&lt;br /&gt;
    send -- &amp;quot;$password\r&amp;quot;&lt;br /&gt;
    interact&lt;br /&gt;
&lt;br /&gt;
These both have to be set to executable by the owner of the files or by global with &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; and placed somewhere they are able to execute it from, e.g. /bin/.&lt;br /&gt;
&lt;br /&gt;
Autoexpect is a built-in script with expect that auto-generates an expect script from watching a session, basically autoexpect watches you interacting with another program and creates an Expect script that reproduces your interactions.&lt;br /&gt;
&lt;br /&gt;
just type &amp;lt;code&amp;gt;autoexpect&amp;lt;/code&amp;gt; and a new session will start. autoexpect will then begin recording your interactions until you stop it.&lt;br /&gt;
&lt;br /&gt;
This has the downside of recording full output and putting them into an expect field. This can be avoided by using the &amp;lt;code&amp;gt; - p &amp;lt;/code&amp;gt; flag which will put auto expect into prompt mode. In this mode, autoexpect will only look for the the last line of program output - which is usually the prompt. This handles the date problem (see above) and most others.&lt;/div&gt;</summary>
		<author><name>Heath</name></author>
		
	</entry>
</feed>