Java sniffer for a TELNET session

Hi
I need to interpret test results of a telnet session using a java sniffer..........how do I do this.
Thx
Frederd

I need to interpret test results of a telnet session
using a java sniffer..........how do I do this.You'll need to use two computers to do this, since Telnet uses a "well known port" to accept connections (look at www.iana.org for port number). Since only one process can hold a port, you'll need to run your telnetd on one machine, and have clients connect to another where your sniffer owns that port.
Once you've set this up, the sniffer itself is a simple pass-through portal: it accepts a request, makes a corresponding connection to the actual telnetd, then simply passes bytes from one connection to the other (logging them in the middle).

Similar Messages

  • Create Java bean for a http session

    how can i create a java bean for an http session. also is it possible to access it from another java class within that session

    Try the following forum (about JSP technology)
    http://forum.java.sun.com/forum.jspa?forumID=45

  • Placing a telnet session within a java swing program

    I was wondering if there was a way to maybe anchor a telnet session into a JPanel within a Java Swing program. Most of my users end up running a telnet session while using my Swing Program and I was hoping to find a way to bring the two together. If this is possible could someone point me in the right direction (like an online resource) that might show me how to do this.

    You could use sockets and a TextArea and build your own simple telnet application.
    Socket tutorial: http://java.sun.com/docs/books/tutorial/networking/sockets/index.html

  • Java.lang.IllegalStateException: no usable session model for id

    Even after setting coherence-session-thread-locking to true , we are getting this error and this affecting the application functionality. How to get rid of this error ?
    java.lang.IllegalStateException: no usable session model for id=4XpGjol0FmOV
    at com.tangosol.coherence.servlet.api23.HttpSessionImpl.ensureUsableModel(HttpSessionImpl.java:488)
    at com.tangosol.coherence.servlet.api23.HttpSessionImpl.ensureActiveModel(HttpSessionImpl.java:504)
    at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
    Edited by: 879571 on Nov 14, 2011 12:12 AM

    Hi!
    The error "java.lang.IllegalStateException: no usable session model for id" usually indicates that a session was invalidated by the session reaper thread and accessed by a client thread at the same time. These errors can be prevented by setting coherence-session-thread-locking to true in coherence-web.xml; however this message is generally harmless.
    To solve this issue, please try setting coherence-session-thread-locking to true in coherence-web.xml.
    For further information on coherence-session-thread-locking, please take a look at http://coherence.oracle.com/display/COH35UG/Configuring+Coherence*Web#ConfiguringCoherence*Web-coherencesessionthreadlocking
    Regards,
    Cris

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • How do I establish a telnet session with unit under test?

    I am going to the next step as a novice and moving from serial communications to ethernet on my unit under test. I have been all over the help and discussion forums etc and cannot find an answer. I need to open up a telnet session with my unit under test and keep it open to send commands back and forth for control of the unit. Can anyone give me a hint of how I am to establish this communication? I have the IP address and I am using port 23 but I just get the session started and then immediately closed. The sequence of events will be: start the session, the unit will reply with a username and then password, after that I need the session to remain open so I can send commands as if I am sitting at the serial port. When complete the session will then be terminated. Thanks in advance for any help.

    If you want to do telnet using plain TCP, you need to do everything yourself, including the telnet options negotiation.
    RFC 854 should have most of what you need (look towards the bottom).
    Most likely, the server will propose a few options, which you should either accept or reject depending on your needs.
    Easiest is probably to use a packet sniffer on a regular telnet session, then dissect the negotiation to see what that particular server wants.
    RFC 990 has a list of telnet options, look for the section labeled "ASSIGNED TELNET OPTIONS".
    It should be simple to write some code that negotiates with one particular host. It will be more difficult to write a full-blown telnet client that does general negotiations with any type of telnet server.
    I have a small program that telnets to a router to do some configuration. The only thing I reply to the proposed options is:
    "\FF\FD\03\FF\FE\01\r\n" (In \-codes). Translated: "Don't suppress go ahead, Do echo".
    (FF=IAC "Interpret as command", FD=Do, FE=Don't, 01=echo, 03= suppress go ahead.)
    LabVIEW Champion . Do more with less code and in less time .

  • Telnet session not working in OEL -5

    Telnet session not working in OEL -5
    ==============================
    1. Installed xinetd and telnet-server packages on the box.
    2. Enabled the xinetd service.
    # service xinetd start
    # chkconfig xinetd on
    Telnet still not working. Please help.
    Lily.

    Re-ran the /etc/init.d/xinetd restart command. Telnet cannot connect and this is what I get:
    Unencrypted connection refused. Goodbye.
    Below is the telnet.cfg
    ==================
    # default: on
    # description: The telnet server serves telnet sessions; it uses \
    #     unencrypted username/password pairs for authentication.
    service telnet
         flags          = REUSE
         socket_type     = stream
         wait          = no
         user          = root
         server          = /usr/sbin/in.telnetd
         log_on_failure     += USERID
         disable          = no
    ===================

  • Java Mapping for JDBC Interface

    Hi,
    please help on java mapping for my jdbc interface.
    my java code for jdbc is:
    Created on May 7, 2008
    TODO To change the template for this generated file go to
    Window - Preferences - Java - Code Style - Code Templates
    package XiMappingDB2.com.xi.test;
    @author miracle
    TODO To change the template for this generated type comment go to
    Window - Preferences - Java - Code Style - Code Templates
    Created on May 2, 2008
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.xi.test;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.MappingTrace;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    @author kotla
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class NameMerge implements StreamTransformation  {
         private Map param = null;   
         private MappingTrace trace = null;
         public void setParameter(Map param){       
         this.param = param;
         if (param == null) { 
         this.param = new HashMap();
         public void execute(InputStream input, OutputStream output)      
         throws StreamTransformationException {
         AbstractTrace trace = null;     
         String RESULT = new String();
         trace =      
         (AbstractTrace) param.get(             
         StreamTransformationConstants.MAPPING_TRACE);
         try {          
        //Create DOM parser
        DocumentBuilderFactory factory =   
        DocumentBuilderFactory.newInstance();     
        DocumentBuilder builder = factory.newDocumentBuilder();
         //Parse input to create document tree
         Document doc = builder.parse(input);
                    trace.addInfo(doc.toString());
          //          Map the elements          
        Node root = doc.getFirstChild(); // gets the root element
         NodeList children = root.getChildNodes();
          for (int item = 0; item < children.getLength(); item++) {
          if (children.item(item) instanceof Element) {
          root = (Element) children.item(item);
          NodeList ch = root.getChildNodes();
          RESULT = RESULT.concat(ch.item(0).getNodeValue() + " ");
          trace.addInfo(RESULT); }
          catch (Exception e) {           
               trace.addDebugMessage(e.getMessage());      
       //Return the output document
       String document_exit = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Person2 xmlns:ns0=\"urn:xxxxx.com:test:mapping:lookups\"><RESULT>" 
       + RESULT               
       + "</RESULT></ns0:Person2>";
         insertDB(RESULT);
       try
            output.write(document_exit.getBytes());
             catch (IOException e1) {
            trace.addDebugMessage(e1.getMessage());
    public void insertDB(String DETAILS){
        Statement stmt = null;
        Connection conn = null;
        try {
          conn = getConnection();
          conn.setAutoCommit(false);
          stmt = conn.createStatement();
          stmt.execute("insert into KUMAR(DETAILS) values ('"DETAILS"')");
          //System.out.println ('"DETAILS"');
          conn.commit();
          stmt.close();   
          conn.close();
        } catch (Exception e) {
          System.err.println("Error: " + e.getMessage());
          e.printStackTrace();
      public Connection getConnection() throws Exception {
        String driver = "com.ibm.db2.jcc.DB2Driver";
        String url = "jdbc:db2://172.17.4.24:50000/SAMPLE";
        String username = "miracle";
        String password = "sairam";
        Class.forName(driver);
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    but we are getting the following error:Linkage error occurred when loading class JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (http://FILE2JDBC_US, 7d7b3141-f4d1-11dc-b25e-d5d5c0a80198, -1)
    Start of test
    LinkageError at JavaMapping.load(): Could not load class: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge
    java.lang.NoClassDefFoundError: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (wrong name: XiMappingDB2/com/xi/test/NameMerge) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.load(RepJavaMapping.java:136) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:50) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170).
    please solve this issue.

    Uday,
    May be you have uploaded class file into external definitions.
    You need to Zip the class file into .jar  and then upload into external definitions of integration repository
    Regards,
    Kiran Bobbala

  • Run 6i form in a telnet session on a 32 bit Windows environment

    Hi,
    We have the following environment: 8.1.7 database, 9iDS Forms 6i (6.0.8.13.0) included. This is installed on 32 bit windows environment. We have wireless RF barcode scanners with TCP/IP connection. So they can connect to Unix box or a Windows telnet session. As we have Windows system we can connect this equipments to Windows through telnet session.
    I heard and read in some topics that Forms 6i can run in character mode environment. But I didn't find any solution.
    We would like to run forms as we can run svrmgrl for example on a telnet session.
    My question is that it is possible to run 6i forms on charcater mode environment (telnet session) ? If so, what we need to do in the development or running phase (command line parameters for example).
    Thanks in advance,
    Attila

    Forms 6i can run in Character mode in telnet - but this only applies to Unix ports of the product - they have an f60run executable as well as the Gui f60runm and the Web f60runw runtimes.
    Windows only has GUI and Web versions.

  • Change Password via telnet session

    Hi,
    I would like to know how to change the tacacs enable password via telnet session.
    When a new user login the first time via telnet, tacacs prompts the user with changing login password. However, it never prompts to change the enable password. Please advice.

    I am not clear what your problem is. TACACS uses a single password for a user and does not distinguish an enable password which is different from the login password. TACACS will grant access to enable based on what is set up in the user profile (or group profile) not on having a separate password. The difference between a login password and the enable password is used by the router locally when the router is not able to communicate with the TACACS server.
    So when TACACS prompts a new user to change the initial setup password, that is all that TACACS needs to do.
    HTH
    Rick

  • Replicating simple Java objects for automatic failover

    Is there a way to replicate a simple java object that is bound from JNDI
              across all servers so that if the primary server fails, it will
              automatically failover?
              We have a java client that uses JNDI to access EJBs on WLS5.1 SP8. In order
              to determine client information, the client currently binds a simple java
              class in the JNDI tree. The Entity and Session beans use the caller
              principal to locate the object in order to access client-information for
              such things as record locking, logging, etc..
              We have to move this architecture to a cluster environment and we are
              wondering how we can replicate this object across cluster servers so that
              failover is handled automatically, and that it is still accessible through
              JNDI.
              An RMI replicated stub is not enough, since it only works as long as the
              server hosting the RMI object is alive.
              I'd like to add that the object is created and bound at client start-up and
              destroyed at client exit.
              Thank you for any advice or information,
              Dania Kodeih.
              

    A: Replicating simple Java objects for automatic failover

    That's what I figured. I guess the only solution in this case is to persist
              the object during client sessions. I was hoping for something simpler, but I
              guess I'll have to create an Entity Bean and everything else that comes with
              it.
              Thanks,
              Dania.
              Cameron Purdy wrote in message <[email protected]>...
              >Unfortunately, when the originating server goes down, the replicated object
              >disappears.
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"Don Ferguson" <[email protected]> wrote in message
              >news:[email protected]..
              >> If I am not mistaken, any serializable object will automatically be
              >replicated
              >> across the tree.
              >>
              >> Dania Kodeih wrote:
              >>
              >> > Is there a way to replicate a simple java object that is bound from
              JNDI
              >> > across all servers so that if the primary server fails, it will
              >> > automatically failover?
              >> >
              >> > We have a java client that uses JNDI to access EJBs on WLS5.1 SP8. In
              >order
              >> > to determine client information, the client currently binds a simple
              >java
              >> > class in the JNDI tree. The Entity and Session beans use the caller
              >> > principal to locate the object in order to access client-information
        �... [Show more]

    Read other 4 answers

  • How to recognize a telnet session (RF) from a SAPGUI?

    hi guys,
    i must check and block a transaction, developed for a RF terminal, if it is executed by SAPgui...
    how to, in abap, recognize a telnet session (RF) from a SAPGUI ?
    I have tried FM "SAPGUI_OBJECT_ID" hoping in a sy-subrc ne 0 with telnet but it's not right.
    Edited by: Cacco Andrea on Apr 28, 2009 2:43 PM

    i resolved like this:
        cl_gui_frontend_services=>get_computer_name(
          changing
            computer_name        = zterm
          exceptions
            cntl_error           = 1
            error_no_gui         = 2
            not_supported_by_gui = 3
            others               = 4
        if sy-subrc = 0.    "SAPGUI
      else.               "telnet
        endif.

  • How to disconnect a telnet session ?

    Router#show use
    Line User Host(s) Idle Location
    98 vty 0 idle 3d22h x.x.x.x
    99 vty 1 idle 3d21h x.x.x.x
    100 vty 2 idle 2d11h x.x.x.y
    *101 vty 3 idle 00:00:00 x.x.x.z
    Hi guys, I wanna disconnect telnet sessions 98, 99, and 100. How do I do it ? Thanks in advance.

    Atif is quite correct that clear line is how to terminate those telnet sessions - once the problem has developed. And his suggestion that the problem be prevented by configuring an idle timeout is what I also recommend.
    Looking at the idle time of these sessions certainly suggests that someone has configured the vty lines with exec-timeout 0 0 which disables the idle timeout. This has the effect that telnet sessions may go on for a very long time - and over a period of time hung telnet sessions may make all the vty ports busy and prevent remote access to the router. While I might not go as short as Atif's suggestion of a 5 minute timeout, I believe that the vty should have some timeout (perhaps quite long - especially in a testing or development environment). A vty with no idle timeout is a problem waiting to happen.
    HTH
    Rick

  • SA520 seems to terminate Telnet session

    Question: We recently replaced a router with Cisco SA520. The connection is only used for a Telnet application. After replacing the router we experience the problem that the Telnet session is terminated after around one minute of inactivity in a way that it does not respond to keyboard input anymore. With out old router this happend after 30 minutes.
    Everythink works fine as long as the user does actively use the system.
    The SA520 is configured with a static external and internal IP address. Two ports are forwarded (515,9100) from the external side (where the Telnet server resides) to an internal printer.
    Does anyone have idea what is causing this problem.
    Thank you
    Sascha

    Your timeout is probabally set very low.
    TRY THIS:
    Router(config)#line vty 0 4
    Router(config-line)#exec-timeout 30
    If you still have a problem please let us know.
    NOTE:
    I did the timeout for 30 minutes because that it what your old setting was.

  • How can I send an F5 thru a telnet session?

    I have to logon to a remote machine with a telnet session. To do this manually, I have to hit F5 to bring up the login prompt after the telnet session is established. I can establish the connection with LabVIEW, but how can I send the F5?

    Telnet is essentially an ASCII-only protocol. There's no "F5" in ASCII, so you're probably supposed to send some sequence of ASCII codes to make it work.
    Typically, text-based telnet programs emulate various kinds of physical terminals, such as DEC's warhorse "vt52" and "vt100" terminals, or the old ADM-3A. Those terminals sometimes had special keys that could send a sequence of commands. For example, I think the vt100 had an "F5" key that sent Escape (a byte containing decimal 27) followed by the letters "Ot". (I am looking at a UNIX box with an /etc/termcap entry for a vt100, and interpreting what it says. I'm not an expert at UNIX /etc/termcap entries, so I may be misreading it.)
    Anyway, you need to find out what kind of terminal this remote machine
    is expecting you to use. This will tell you what string to send for an F5 key.
    I hope this helps.

Maybe you are looking for

  • ID3 Tags Question

    I have both a Mac and a PC and I wanted to share my music between the both of them. The shared library option doesn't suit me because my music is sorted by artist's names like "last, first" and the shared library doesn't recognize them like this. For

  • Can not update error 1602 and can not restore error 1604 what is the solution

    Have a IPod touch 4, can't update (error 1602) and can't restore (error 1604) any solution?

  • Quicktime movies in iWeb??

    I want to include a lot of movies in my site I have presently 8 of them but when you go to the page they all have to load. Is their a way to create a button or link to a file that will open the movie in a specific section of the page and when another

  • Cant run servlet in Vista with Tomcat 6 version...

    I lost my one day to solve this problem but at the end of the day i got mad OS: Vista Tomcat: 6 i have directory structure as C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps now i have create my own directory to run my own servlets its

  • Table for objects linked to item via external link

    Hi Gurus, We link objects to an item, like PS projects and networks using link to external object. Doing so which table in backend will get updated with this transaction data. We want to draw data from backend to find a list of items to which objects