<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xml:base='http://javatelnet.org/rdf'>
    <s:Snip rdf:about='http://javatelnet.org/rdf#Plugin+Script'
         s:cUser='leo'
         s:oUser=''
         s:mUser='leo'>
        <s:name>Plugin Script</s:name>
        <s:content>For those who need to take __autmatic actions__ this plugin  is a good start. &#xD;&#xA;{quote}The Script plugin MUST be BETWEEN the Telnet or SSH Plugin and the Terminal plugin. The order of plugins in the plugins line is important! \\ __Example:__ plugins=Status,Socket,Telnet,Script,Terminal&#xD;&#xA;{quote}&#xD;&#xA;&#xD;&#xA;To automate certain processes like login into guest accounts or BBS&apos; the script plugin enables you to write simple scripts of __pattern and answer pairs__ to be sent to the remote host if the pattern was found in the data that came from the remote host.&#xD;&#xA;&#xD;&#xA;To use the script simply put it into the plugin list as described in the configuration of the Application or Applet. The script language itself is very basic:&#xD;&#xA;{code}Script.script=pattern|text|pattern_1|text_1{code}&#xD;&#xA;Any number of pattern and text pairs can be given and they will be processed in the order they appear in the script. That means if ~~pattern~~ is not matched ~~pattern_1~~ will not be processed! &#xD;&#xA;&#xD;&#xA;For example the following script would login into some computer:&#xD;&#xA;{code}Script.script=login:|leo|password:|mypass{code}&#xD;&#xA;It first waits for the pattern &quot;login:&quot; and sends the text &quot;leo\\\n&quot; (\\\n is a newline). Then it waits for the pattern &quot;password:&quot; and if that appears it sends &quot;mypass\\\n&quot;. Next you could add some pattern that looks like your command prompt and issue a shell command.&#xD;&#xA;&#xD;&#xA;If the first pattern is empty, its answer string will be sent on connect. For instance:&#xD;&#xA;{code}Script.script=|connect foo|login:|leo|password:|mypass{code}&#xD;&#xA;will send &apos;connect foo&apos; upon connect.&#xD;&#xA; &#xD;&#xA;{table}&#xD;&#xA;Property | Documentation&#xD;&#xA;Script.script | This property contains the script that is used by the plugin. See above for the actual &quot;script language&quot;.&#xD;&#xA;{table}&#xD;&#xA;&#xD;&#xA;</s:content>
        <s:mTime>2005-11-15 13:12:03.49</s:mTime>
        <s:cTime>2005-11-10 14:23:56.5</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Configuring Plugins'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Telnet'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Installing as a local Telnet/SSH Application'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Installing the Applet'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin SSH'/>
                <rdf:li rdf:resource='#SSH'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Docs and Tutorials'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#SnipSnap/config'/>
                <rdf:li rdf:resource='#applet.conf'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Terminal'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Configuring+Plugins'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Java WebStart'/>
                <rdf:li rdf:resource='#Download'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='#default.conf'/>
                <rdf:li rdf:resource='#Telnet'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Using the Connection Relay Daemon'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#installing the applet'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Docs and Tutorials/'/>
                <rdf:li rdf:resource='#ssh'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin+Telnet'/>
                <rdf:li>
                    <s:Snip rdf:about='http://javatelnet.org/rdf#Plugin+Script'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='#telnet'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Docs+and+Tutorials'/>
                <rdf:li rdf:resource='#jan'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Socket'/>
                <rdf:li rdf:resource='#download'/>
                <rdf:li rdf:resource='#plugins'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#start/2005-11-10/1'/>
                <rdf:li rdf:resource='#About'/>
                <rdf:li rdf:resource='#snipsnap-portlet-3'/>
                <rdf:li rdf:resource='#dhelrod'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin+Script/'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#SnipSnap/themes/thinkberg/css/snip.css'/>
                <rdf:li rdf:resource='#leo'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#SnipSnap/tracker'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin+SSH'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#start/2005-09-27/1'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#start/'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Sink'/>
                <rdf:li rdf:resource='#SnipSnap'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#License Agreement'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin URLFilter'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Shell'/>
                <rdf:li rdf:resource='#snipsnap-portlet-1'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Matthias L. Jugel'/>
                <rdf:li rdf:resource='#snipsnap-notfound'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Script/'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#SnipSnap/config/apidocs'/>
                <rdf:li rdf:resource='#mrelayd'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin ButtonBar'/>
                <rdf:li rdf:resource='#buttonbar.conf'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin MudConnector'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin Timeout'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Plugin+Sink'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Using+the+Connection+Relay+Daemon'/>
                <rdf:li rdf:resource='http://javatelnet.org/rdf#Java+WebStart'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
