lowinteraction
Interface LIProtocol

All Known Implementing Classes:
FtpProtocol, IrcProtocol, Test2Protocol, TestProtocol

public interface LIProtocol

Interface that defines a protocol that can be plugged into a HoneyRJ

Author:
Eric Peter

Method Summary
 int getPort()
          Return the port the protocol listens for connections on ie 80 for HTTP
 boolean isConnectionOver()
          return true if the server believes the connection to be over for whatever reason
 java.util.Vector<java.lang.String> processInput(java.lang.String messageFromClient)
          Each time a message is received on the socket from the client, this method is called.
 java.lang.String toString()
          return a textual representation of the protocol name use for use in logs ie HTTP, FTP, etc
 TALK_FIRST whoTalksFirst()
          The return value of this method specifies if the server sends the first message in the protocol (SVR_FIRST) or if the client does (CLIENT_FIRST) The first message is defined as the first person to transmit a String over the network after the TCP handshake/Java socket setup.
 

Method Detail

whoTalksFirst

TALK_FIRST whoTalksFirst()
The return value of this method specifies if the server sends the first message in the protocol (SVR_FIRST) or if the client does (CLIENT_FIRST) The first message is defined as the first person to transmit a String over the network after the TCP handshake/Java socket setup.

Returns:
SVR_FIRST if the server sends the first message (ie SMTP)

processInput

java.util.Vector<java.lang.String> processInput(java.lang.String messageFromClient)
Each time a message is received on the socket from the client, this method is called. The messageFromClient should be processed as needed and a Vector of String messages should be returned. Each message will be sent as a separate line to the client.

Parameters:
messageFromClient - String received on the socket from the client
Returns:
Vector to send to the client on the socket.
See Also:
LIHelper.vectorFromString(String)

getPort

int getPort()
Return the port the protocol listens for connections on ie 80 for HTTP

Returns:
int that is the port this protocol listens on

toString

java.lang.String toString()
return a textual representation of the protocol name use for use in logs ie HTTP, FTP, etc

Overrides:
toString in class java.lang.Object
Returns:
String containing the name of the protocol as it should appear in a log file.

isConnectionOver

boolean isConnectionOver()
return true if the server believes the connection to be over for whatever reason

Returns:
true if the protocol is done talking to the client and does not want to receive or send any more messages