File: Script.html

package info (click to toggle)
jta 2.5-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 4,052 kB
  • ctags: 3,606
  • sloc: java: 12,526; ansic: 1,066; makefile: 265; xml: 71; sh: 7
file content (153 lines) | stat: -rw-r--r-- 6,094 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Matthias L. Jugel, Marcus Meissner">
   <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.13-ac7 i686) [Netscape]">
   <meta name="Description" content="Java Telnet Applet is a fully features Telnet and Terminal Emulation implementation for Java.">
   <meta name="Keywords" content="java telnet applet application bbs terminal emulation">
   <title>The Java Telnet Application/Applet v2.0: Script Plugin</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
&nbsp;
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" HEIGHT="20%" BGCOLOR="#000000" NOSAVE >
<tr NOSAVE>
<td ALIGN=RIGHT VALIGN=BOTTOM NOSAVE>
<table BORDER=0 CELLPADDING=5 COLS=5 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
<tr NOSAVE>
<td ALIGN=RIGHT VALIGN=BOTTOM COLSPAN="5" NOSAVE>
<div ALIGN=right>
<h1>
<font face="Arial,Helvetica"><font color="#000099">The Java<sup><font size=-2>tm</font></sup>
Telnet Application/Applet: Script Plugin</font></font></h1></div>
<i>&copy; 1996-2000 <a href="mailto:leo@mud.de">Matthias L. Jugel </a>and
<a href="mailto:marcus@mud.de">Marcus
Mei&szlig;ner</a></i>
<p><b>Version 2.0 / Java 2 and 1.1.x</b>
<br>Available under <a href="../../license/COPYING">GNU General Public
License</a></td>
</tr>

<tr ALIGN=CENTER VALIGN=CENTER NOSAVE>
<td NOSAVE><b><font face="Arial,Helvetica"><a href="../../index.html">Homepage</a></font></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/index.html">Applet
Test</a></font></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/download.html">Download</a></font></b></td>

<td><b><i><font face="Arial,Helvetica"><a href="../index.html">Documentation</a></font></i></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/users.html">Users
/ Opinions</a></font></b></td>
</tr>
</table>
</td>
</tr>
</table></center>

<table BORDER=0 CELLSPACING=5 CELLPADDING=5 COLS=2 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td ALIGN=LEFT VALIGN=TOP WIDTH="70%" BGCOLOR="#FFFFFF" NOSAVE>
<center>
<h2>
<font color="#CC0000">Script Plugin</font></h2></center>
To automate certain processes like login into guest accounts or BBS' 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.
<p>To use the script simply put it into the plugin list as described in
the configuration of the <a href="../Main.html">Application</a> or <a href="../Applet.html">Applet</a>.
The script language itself is very basic:
<blockquote><tt>pattern|text|pattern_1|text_1</tt></blockquote>
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 <tt>pattern</tt>
is not matched <tt>pattern_1</tt> will not be processed! For example the
following script would login into some computer:
<blockquote><tt>login:|leo|password:|mypass</tt></blockquote>
It first waits for the pattern "<i>login:</i>" and sends the text "<i>leo\n</i>"
(\n is a newline). Then it waits for the pattern "<i>password:</i>" and
if that appears it sends "<i>mypass\n</i>". Next you could add some pattern
that looks like your command prompt and issue a shell command.
<p>If the first pattern is emtpy, its answer string will be sent on connect.
For instance:
<br>&nbsp;
<blockquote>
<pre>|connect foo|login:|leo|password:|mypass</pre>
</blockquote>
will send 'connect foo' upon connect.
<br>&nbsp;
<p>You can configure the plugin using the following properties:
<center><table BORDER=0 CELLPADDING=3 COLS=2 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE CELLSPACjNG="3" >
<tr ALIGN=CENTER VALIGN=CENTER BGCOLOR="#000000" NOSAVE>
<td NOSAVE><b><font face="Arial,Helvetica"><font color="#FFFFFF">Property</font></font></b></td>

<td><b><font face="Arial,Helvetica"><font color="#FFFFFF">Documentation</font></font></b></td>
</tr>

<tr NOSAVE>
<td VALIGN=TOP NOSAVE><tt>Script.script</tt></td>

<td>This property contains the script that is used by the plugin.</td>
</tr>
</table></center>

<p><b>NOTE:</b>
<br>The Script plugin MUST be <b>BETWEEN</b> the Telnet or SSH Plugin and
the Terminal plugin.
<br>The order of plugins in the plugins line is important!
<p>&nbsp;Example:
<tt>plugins=Status,Socket,Telnet,Script,Terminal</tt></td>

<td ALIGN=LEFT VALIGN=TOP BGCOLOR="#CCCCCC" NOSAVE><font color="#CC0000">Additional
Programmer Documentation is available:</font>
<br>&nbsp;
<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><font color="#000000"><a href="../source/de/mud/jta/plugin/Script.html">de.mud.jta.plugin.Script</a></font></font></b></td>
</tr>

<tr>
<td>This is the programmer documentation for the plugin. Use it as an example
if you want to write your own back end plugins.</td>
</tr>

<tr NOSAVE>
<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><a href="../source/de/mud/jta/event/package-summary.html">de.mud.jta.event</a></font></b></td>
</tr>

<tr>
<td>This plugins uses some of the events and listeners described here.</td>
</tr>
</table></center>
</td>
</tr>
</table>

<table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<tr NOSAVE>
<td NOSAVE>
<table BORDER=0 CELLSPACING=3 CELLPADDING=5 COLS=2 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
<tr NOSAVE>
<td NOSAVE>Copyright 1996-2000 <a href="mailto:leo@mud.de">Matthias L.
Jugel</a>, <a href="mailto:marcus@mud.de">Marcus Mei&szlig;ner</a></td>

<td>
<div align=right><b><i>Get the <a href="http://www.mud.de/se/jta">latest
version here</a>!</i></b></div>
</td>
</tr>

<tr NOSAVE>
<td COLSPAN="2" NOSAVE>
<div align=right>$Id: Script.html,v 1.9 2001/05/22 06:35:37 marcus Exp
$</div>
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>