Guest_imported
New member
- Jan 1, 1970
- 0
hi,
I try to make a telnet to an XP host, with a JAVA application but it don't
seem to work fine, when I try with the windows telnet, I got normal
connection:
/*************************/
Welcome to ..........
some text............
are you sure (o/n) :
/*****************************/
but with java application there's no text in my application,
here the source:
/******************************/
import java.io.*;
import java.net.*;
public class TelNet
{
public static void main(String args[])
{
byte[] env;
String mess="";
try
{
Socket esp = new Socket("192.168.0.1", 23);
BufferedReader esplire = new BufferedReader(new InputStreamReader(esp.getInputStream()));
DataOutputStream especrire = new DataOutputStream(esp.getOutputStream());
String lir = esplire.readLine();
while(lir!=null)
{
System.out.println(lir);
lir = esplire.readLine();
};
}
catch(Exception e){System.out.println(e.toString());};
}
}
/*******************************/
can some one help me.
thanks.
I try to make a telnet to an XP host, with a JAVA application but it don't
seem to work fine, when I try with the windows telnet, I got normal
connection:
/*************************/
Welcome to ..........
some text............
are you sure (o/n) :
/*****************************/
but with java application there's no text in my application,
here the source:
/******************************/
import java.io.*;
import java.net.*;
public class TelNet
{
public static void main(String args[])
{
byte[] env;
String mess="";
try
{
Socket esp = new Socket("192.168.0.1", 23);
BufferedReader esplire = new BufferedReader(new InputStreamReader(esp.getInputStream()));
DataOutputStream especrire = new DataOutputStream(esp.getOutputStream());
String lir = esplire.readLine();
while(lir!=null)
{
System.out.println(lir);
lir = esplire.readLine();
};
}
catch(Exception e){System.out.println(e.toString());};
}
}
/*******************************/
can some one help me.
thanks.