HELP!! When logging into a remote machine I only get ASCII chracters

Hello,
When my program logs into the telnet server....ASCII characters
continuiosly scroll across my screen continiously. What I should be seeing is C:\.Instead I am seeing a continious stream of ASCII characters.Any sugesstions? (Please see the code below)
Thanks,
MM
public class RemoteConnection
/* Constructor */
public RemoteConnection(String Host, int TelnetPort)
     try
     {       /* Create a new Socket and call the pipe streams */
          /* This does not output data to the window */
socket = new Socket(Host, TelnetPort);
/* This works...I can create a terminal emulator*/
          //socket = new Socket("time.gov", 13);
new InputPipe(socket.getOutputStream()).start();
          new OutputPipe(socket).start();
     catch(IOException e)
     txtTelnetWindow.setText("");
txtTelnetWindow.setText("Error Could not connect to host: "+Host);
          return;
}/* end Constructor */
* Inner class (to Remote Connection ) which
* handles the input stream pipe
public class InputPipe extends Thread
/* Create objects of type DataInputStream and PrintStream */
//DataInputStream is;
     PrintStream os;
BufferedReader BR_is;
String TheTxt;
public InputPipe(OutputStream os)
     /* Creates a Input Stream Reader that uses an underlying buffered reader */
this.BR_is = new BufferedReader(new InputStreamReader(System.in));
     this.os = new PrintStream(os);
public void run()
String line;
     try
          while(true)
line = BR_is.readLine();
// TheTxt = txtTelnetWindow.getText();
//txtTelnetWindow.setText(line);
/* Print one character at a time */
os.println(line);
/* Note: DOS only knows "\n", "\r" is Unix */
               //Used "line seperator" instaed
//os.print("\r\n");
          //os.print("\n");
os.flush();
     catch(IOException e)
          throw new RuntimeException("Failed to read or print the line");
}/* end class input pipe */
* Inner class (to Remote Connection ) which
* handles the output stream pipe
public class OutputPipe extends Thread
     /* Create Stream Objects */
InputStream in;
     OutputStream ot;
     PrintStream os;
public OutputPipe(Socket socket)
     try
          this.ot = socket.getOutputStream();
          this.in = socket.getInputStream();
          this.os = new PrintStream(System.out);
     catch(Exception e)
          System.out.println("Oops3");
public void run()
/* Create a new String Buffer
This was the whole formating issue /
StringBuffer sb = new StringBuffer();
/* Work on reading text from the counsol */
     int i;
try
          while(true)
               /* Reads the next byte of data from the input stream */
i = in.read();     
if (i == 255) /* Read in the IAC bytes. Start over after 255th byte*/
                    int i1 = in.read();     
                    int i2 = in.read();
                    Connect(i1,i2);     
               else
/* Prints out sun OS, username and login */
sb.append(""+(char)i);
//sb.append("\n");
System.out.print((char)i);
os.flush();
txtTelnetWindow.setText(sb.toString());
catch(Exception e)
     txtTelnetWindow.setText("");
txtTelnetWindow.setText("You are no longer connected to the host");
private void Connect(int i1, int i2)
     int i = i1;
     if (i == 253)/* 253 = "DO"*/
     {         /* Write characters to the print Stream */
          i = i2;
     if (i == 1) WriteBytes(i);/* Echo */
          else if (i == 24) WriteBytes(i);/*TTYPE */
          else if (i == 31) WriteBytes(i);/* NAWS */
          else if (i == 35) WriteBytes(i);
          else if (i == 36) WriteBytes(i);
          else if (i == 39) WriteBytes(i);
private void WriteBytes(int i)
{                String ReadTxt;
     try
     /* Write the bytes to the output stream from the host machine*/
ot.write(255); /* IAC*/
          ot.write(252); /* WONT*/
          ot.write(i); /* DO */
     catch (Exception e)
          System.out.println("oops5");
} /* End output Stream class */
}/*End Class Remote Connection*/

I have two suggestions. Firstly, use the [code] tag to format your post. Secondly, log the output to a file and post the first 10 or 20 lines.

Similar Messages

  • Cannot download OSX Maverick? My current system is Snow Leopard 10.6.8 and even when logged into the app store I'm getting the message that I can not download at this time. Try Later?

    Cannot download OSX Maverick? My current system is Snow Leopard 10.6.8 and even when logged into the app store I'm getting the message that I can not download at this time. Try Later?

    Are you connected via wifi? If so, and it is an option, try connecting using a ethernet cable. It sometimes seems to help as it can give a more reliable connection for the 5.3gb download.
    If you do manage to download it you may want to make a copy of the installer file - which gets downloaded to the Applications folder - before running it as it self-deletes on successful installation. It may save you another monster download in the future.

  • When plugging into a monitor, my computer only shows desktop 2. How to I change this?, When plugging into a monitor, my computer only shows desktop 2. How to I change this?

    Help, when plugging into a monitor my MacPro only displays desktop 2. How do I change this?

    Try a NVRAM / PRAM reset.
    Directions are here:
    http://support.apple.com/kb/HT1379
    By the way, when you post a question please include specifics about the version of Mac OS X you are running and the Mac model.
    It is a Macbook Pro, right, not a MacPro?

  • HT3819 My old computer is broken so bought new one.When logged into itunes had to reset password etc.Anyway once on all playlist were different and can't find original stuff.I thought I would just log on and it would be my playlists but not to be.Help ple

    My old computer is broken so bought new one.When logged into itunes had to reset password etc.Anyway once on, all playlists were different and can't find original stuff.I thought I would just log on and I would carry on as usual  but not to be.Help please.

    Donmcp wrote:
    I thought I would just log on and I would carry on as usual 
    Why would you think this?  That's an ignorant assumption to make.
    Your media is only where you put it.
    Either move it from the old computer or restore it from the backup of the old computer.

  • Blue screen when logging into windows server 2008 r2

    when logging into windows server 2008 r2, all I have is a blue screen and the mouse. 
    I tried looking for solutions on the internet, then I found a microsoft hotfix "http://support.microsoft.com/kb/2590550" I run the hotfix in command line but it gave me nothing, no error or success messages.
    I tried to reboot but I still have the same problem. 
    Is there any solution to this problem ?? 

    Hi,
    Thank you for posting in Windows Server Forum.
    Did you face this issue during remote session or console session?
    In addition, have you try to change or install any driver\software which cause this problem?
    Have you use any debugging tools from Microsoft to find respective error cause?
    You can refer following article for memory dump.
    How to read the small memory dump file that is created by Windows if a crash occurs
    http://support.microsoft.com/kb/315263/en-us
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • How do I delete ..when logging into my email.. it populates my entire email address .. how do I stop this ?

    how do I delete.. when logging into my email.. it populates my entire email address.. how do I stop this ?????

    Hi Roam.
    Message understood.
    I managed to delete me and substitute her as Administrator. Thanks.
    you ask what machine I am now using, I am a Windows man, currently using XP Pro SP3 and have been for 10 years. A friend from the Education Dept gave me a phased out Mac with OS X in an endeavor to convert me.
    At first I was very impressed but as time went on I found that the Mac was not as user friendly as I had thought. The terminology was foreign to me, and where Windows placed thing automatically into place, with Mac I had to physically pick up and re-locate programs.
    But what really turned me off was that nearly every thing that I wanted to do I had to go to the net and try and find drivers or whatever to overcome my problems.
    A point in question, I purchased an external USB dual layer DVD burner. When connected to XP, it was recognized instantly and within a few minutes I as up and going. With the Mac, it is not even recognized let alone getting it to work!
    And then there are all the other little things like printing. In windows every thing from every page I can print, Ctrl + P. With the Mac, I am still trying to find out how to print a page from the Help menu.
    Enough said. My daughter is interested and that is all that counts. Let her work it all out, she is smarter (an younger) than me.
    Regards

  • Using Firefox (and having ZoneAlarm), when logging into my work email (Lotus Notes) through a secure Citrix program, a quesitonmark types as and accented "E". This does not happen when using IE (which I prefer not to use). I have turned off the anti-key

    Using Firefox (and having ZoneAlarm), when logging into my work email (Lotus Notes) through a secure Citrix program, a question mark types as and accented "E". This does not happen when using IE (which I prefer not to use). I have turned off the anti-keylogger in ZA (an old, and no longer successful fix). Can anyone help? I need my question marks at work.
    Thanks!
    PS. my keyboard language is not set to French.
    == This happened ==
    Every time Firefox opened
    == I tried to type a "?" in a work email using remote access.

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    Check and tell if its working.
    May not be related to your problem but some of your Firefox Plugins are out-dated
    * Update All your Firefox Plugins -> https://www.mozilla.org/en-US/plugincheck/
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''

  • When logging into my work webmail, my mac displays tons of blue boxes with question marks in them

    when logging into my work webmail, my mac displays tons of blue question marks - can anybody help?

    Is it happening only with that one site?

  • For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop compuHelp

    For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop computer. The wifi unit is  a iinet BOB 2 unit. The other computer works completely fine. The only problem is with this apple iPad? I have rebooted iPad and rebooted BOB 2 wifi unit but this has made on difference to the problem?
    Can anyone suggest any HELP
    Thank You

    For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop computer. The wifi unit is  a iinet BOB 2 unit. The other computer works completely fine. The only problem is with this apple iPad? I have rebooted iPad and rebooted BOB 2 wifi unit but this has made on difference to the problem?
    Can anyone suggest any HELP
    Thank You

  • Error 5002 When Logging Into iTunes Store

    A few years back, I had a different email and a different AppleID; I still listen to the music that I purchased under that account, and I need to authorize my laptop now. When I tried to log in (I verified that the password is correct), I get this error:
    "We could not complete you iTunes Store request. An unknown error occurred (5002)"
    However, it doesn't happen when logging into my current iTunes account, or my husband's.
    Anyone else have this issue? Should I just try to contact Apple Support directly to resolve?

    I'm also getting this error. The only thing that is different is that I synced my iPhone to my MBP after several weeks.
    I tried updating one of my free iPhone apps but I was told there was an error in downloading the information. I figured it was because I had moved and changed my address for my credit card but had not updated it on my iTunes account. When trying to go into my account through iTunes I got the Error 5002... I guess I'm not the only person to have this problem.
    Any help would be great.

  • I get an access denied error when logging into extension builder 2.1 on Flash Builder 4.6

    I get an access denied error when logging into extension builder. The error is: You are not eligible to use CSIDE1 services due to the Service Eligibility Requirements.. Very frustrating since there is no other option than to read the adobe legal docs.
    Before this started happening I was prompted to put in my birthday (WHO KNOWS WHY ADOBE NEEDS MY BIRTHDAY). I filled it in wrong and now this....
    PLEASE HELP

    Ok this problem is fixed.
    Info for anyone else who faces this problem.
    Apparently when adobe designed the extension builder installer package, they decided to get cute and try to figure out what version of the software, the extension builder package files should be installed into. So if you have FB4, FB4.6, and FB.7 there is no telling where it will go. Also if you try moving these folders somewhere else out of the applications directory, the installer will still find them on the system. I finally figured this out by watching my system log and seeing
    11/22/13 12:13:46.258 AM cp[70909]: Cannot make directory /Applications/Adobe Flash Builder 4.6/Adobe Flash Builder 4.6.app
          Location: /Users/myuser/Downloads/Adobe Flash Builder 4.6-adobegarbage/plugins/com.adobe.cside.ui_2.1.0.201304282312/icons: No such file or directory
    After removing every single instance of places the package installer was trying to use. It finally resolved to the correct FB4.6 location. Why adobe could'nt spend a little extra time add a destination selector in the package installer is beyond me, but hey i only wasted 3 days trying to figure this out.... Sadly it isnt the first time i've wasted copius amounts of time fighting Flashbuilder problems.
    Halligrimur, thank you for your help. It did lead to me solving the problem.

  • Resume from suspend problem when logged into gnome

    The computer is a Dell Inspiron 1525. 
    Suspend and resume work perfectly when at gdm login screen or on virtual terminal  If logged into gnome, calling pm-suspend correctly suspends and resumes.
    The problem occurs when the lid is closed.  The computer properly suspends to ram, but when the lid is opened I just get a black screen and I have to switch to a virtual terminal and restart gdm.
    I have tried adding the resume HOOK and removing the autodetect HOOK as described on the pm-utils wiki page.  I've also tried modifying the scripts in /etc/acpi but it seems like they are ignored when logged into gnome.
    Until updating earlier this week, everything worked fine.
    Any suggestions?  Please let me know if I can supply any more information to help diagnose this.
    Thanks in advance,
    Chris

    Kaffeine wrote:
    schuay wrote:
    Same problem here, Acer Aspire One 250, latest updates from testing.
    Any solutions??
    I solved my problem by using a fresh user directory. I guessed the problem came for a screwed configuration somewhere, I coudln't isolate it.
    You're right, thanks for the hint. Suspending with a new user/userdirectory worked.
    I'm not sure I want to do that though, since this is my girlfriends laptop and deleting her entire gnome configs is not something that sounds smart to me

  • When logged into Aruba Central, how do I search IAPs with a particular label?

    Q: When logged into Aruba Central, how do I search IAPs with a particular label?
    A: This is a very common request from many of the Aruba Central customers. For example, an administrator wants to quickly look at the status of all IAPs serving the guests in the campus? Or If he wants to immediately track down the IAPs only in the warehouse.
    In such cases, this feature would be really handy and helps us to give immediate glance of the required IAPs.
    How does this work ?  
    For Aruba Central, to help in such cases, one needs to first assign the access points with appropriate labels.  As we discussed above, all IAPs in the warehouse, can be labeled with a label string as  "warehouse". Similarly, an IAP in the guest lobby, can be labeled with a "lobby IAP" label.
    Aruba Central would then group these IAPs in the backend and index the seacrh, to be ready to pull up the list when you search with a particular label.
    Now, here is how you search the list of IAPs with a particular label:
    1. On the Central web interface, next to search text box, is the "Filter" icon.
    2. Click on the "Filter" icon and it would list out all the labels that has been assigned across devices.
    3. Select the label you need to search for and click on search.

    CarterFamily,
    Essentially, unless something odd is going on, the issue might be an incorrect Registry key entry.  If that is the underlying cause of the problem, then correcting the Registry should allow you to recover your profile.
    You might try the the following fix.
    Find, Open, and follow the procedure in the file named:  Temporary Profile Error
    Kind Regards,
    Dragon-Fur

  • How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID promts the previously used email user IDs... Want to disable this feature---How can ot be done ?

    Question
    How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID prompts the previously used email user IDs... Want to disable this feature---How can it be done ?

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * Tools > Options > Privacy > History: "Remember search and form history"
    * https://support.mozilla.com/kb/Remembering+passwords
    * https://support.mozilla.com/kb/Form+autocomplete

  • When logging into iCloud in Safari, Calendar doesn't display any events. They are displayed on the iPad, iPhone on even the iCal. What is wrong ?

    When logging into iCloud in Safari, Calendar doesn't display any events. They are displayed on the iPad, iPhone on even the iCal. What is wrong ?

    :S,
    Sorry, missed that fact. My memory is good, but short.
    Try moving the "Calendar Cache" file to your Desktop. Quit iCal, and find the "Calendar Cache" file in your Macintosh HD/Users/yourusername/Library/Calendars. Move that file to your Desktop. After that, (I remember that I recommended this before), as long as you are moving files to the Desktop, repeat the plist removal procedure once again, log out/in or restart.
    You should also consider removing the "To Do's" from Mail before restarting iCal. When you open iCal turn off "Show Birthdays calendar" in iCal>Preferences...>General.
    Are you syncing any data? If so, what method(s) are you using?
    ;~)

Maybe you are looking for

  • SharePoint 2013---How to convert current left Navigation into tree view

    Hi All, I want to convert current left navigation into tree view in SharePoint 2013. When we click on Modify Navigation and set headers and links; I need that should be convert into tree view. All headers should be expandable to thier links. I just w

  • Urgent  Doubt in 3rd party

    Hi, In 3rd party, the customer sales information How to track the Vendor. And how to find the vendor delivery qty how to settled the Accounts How to settled the return materials to vendor Thanks for advace pls urgent Regards Rao

  • HT201177 I can't view videos from YouTube.

    I am using Safari as my browser.  When I go to YouTube and select a video, they won't play on my MacBook.  There is a faint message in the video box that says "plug-in failure".  It doesn't matter what video I try to play.  They are all the same.  Ca

  • Adobe CS4 Design Premium software

    I have the Adobe CS4 Design Premium software that was purchased 10-09.  I am trying to install it on my Desktop Computer and keep getting an error message.  I had it installed on the Desktop which was running Windows XP and my hard drive crashed.  I

  • MySPList.Items[0] NullReferenceException

    Hi, here is a though one. I hope someone can help, as it is driving me crazy. I have an assembly in GAC, which has a class, which is being executed by SPTimerScheduler . Everything related to the timer is fine, my code is being run, by SPConfigAcct (