Thank you,
I wrote a code using commons-net to send data to the server to create users,
It is a shabby way to do things, with will suffice my current needs, thank
you all for your support
_______________________________________________________________
The below code use apache commons net...
TelnetClient telnetClient = null;
try {
telnetClient = new TelnetClient();
final InetAddress inetAddress =
InetAddress.getByName("localhost");
telnetClient.connect(inetAddress, 4555);
System.out.println("Connection established...");
//Writer
final OutputStream outputStream =
telnetClient.getOutputStream();
final OutputStreamWriter outputStreamWriter = new
OutputStreamWriter(outputStream);
final BufferedWriter bufferedWriter = new
BufferedWriter(outputStreamWriter);
PrintWriter printWriter = new PrintWriter(bufferedWriter);
//Reader
final InputStream inputStream = telnetClient.getInputStream();
final InputStreamReader inputStreamReader = new
InputStreamReader(inputStream);
final BufferedReader bufferedReader = new
BufferedReader(inputStreamReader);
//printMessagesFromServer(bufferedReader);
//login as root
printWriter.println("root");
printWriter.println("root");
//add user
printWriter.println("adduser success success");
printWriter.flush();
printWriter.println("verify success4");
//close streams...
outputStream.close();
bufferedReader.close();
} finally {
if(telnetClient != null) {
telnetClient.disconnect();
System.out.println("Disconnected...");
}
}
_______________________________________________________________
On Sun, Apr 6, 2008 at 12:30 PM, Robert Burrell Donkin <
[EMAIL PROTECTED]> wrote:
> On Sat, Apr 5, 2008 at 11:13 PM, Yazad Khambata <[EMAIL PROTECTED]> wrote:
> > Hi Robert,
> > Thanks for the link... I think it's best if I download the source
> zip
> > now... Is there any javadoc available? I couldn't find any on the site,
> nor
> > in the downloaded binary... Thanks.
>
> the best plan is to download the source (if you're targeting stable)
> or checkout the project from subversion (if you're targeting trunk)
> and take a look at it in an IDE
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>