Skip to content

Commit

Permalink
remove hack for GNU telnet
Browse files Browse the repository at this point in the history
  • Loading branch information
teverett committed Jun 17, 2024
1 parent 4ca37cf commit 6bcc254
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/com/khubla/telnet/nvt/stream/NVTStreamImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ public class NVTStreamImpl implements NVTStream {
@Getter
@Setter
private boolean ipRequested = false;
// for GNU telnet
@Getter
@Setter
private boolean LFisCR = true;

public NVTStreamImpl(InputStream inputStream, OutputStream outputStream, IACProcessor iacProcessor) {
super();
Expand Down Expand Up @@ -178,7 +174,7 @@ public String readln() throws IOException {
boolean cont = true;
while (cont && !ipRequested) {
final int b = readByte();
if (!LFisCR && (b == KEY_LF)) {
if (b == KEY_LF) {
/*
* bare LF is a LF
*/
Expand All @@ -190,7 +186,7 @@ public String readln() throws IOException {
* ignore
*/
logger.info("Unexpected NULL");
} else if ((b == KEY_CR) || (LFisCR && (b == KEY_LF))) {
} else if (b == KEY_CR) {
/*
* if it's followed by LF, then it means CRLF. Eat the LF
*/
Expand Down

0 comments on commit 6bcc254

Please sign in to comment.