patator icon indicating copy to clipboard operation
patator copied to clipboard

Suggestion: allow telnet line endings to be parameterised

Open kazkansouh opened this issue 4 years ago • 1 comments

Hello,

I was just using the Telnet module against a Windows server. However, currently it is hard coded to send a \n at the end of the input sequences. The server however was not accepting it and instead required a \r instead.

I have confirmed that both using the telnet command line client does this and so does Hyda. Looking at the code below it looks like this has been considered but changed for some reason:

https://github.com/lanjelot/patator/blob/0d7661bbb5b404c49f69963ca9ec8b1f73358a77/patator.py#L2648

Taking a quick look at RFC 854 states at the end of page 11 (I haven't read it in depth, so could be mistaken):

Note that "CR LF" or "CR NUL" is required in both directions (in the default ASCII mode).

Regardless, I think it would probably make sense to allow this to be parameterised to improve compatibility with more systems?

kazkansouh avatar Sep 19 '20 08:09 kazkansouh

Thanks for this, can you please submit a patch? :)

lanjelot avatar Jun 22 '22 23:06 lanjelot