Repository: cytopia/pwncat (language: python)

Issue:
when pasting in term I donot get full line echo
When I paste in shell created with pwncat I donot get full line echo?
Any idea what's wrong?
great tool by the way


Discussion / hints:
Can you add some more info so that I can try to reprocude, e.g.: Remote binary/version and pwncat commands
Sure! Thank you for answering. When I use pwncat in -l port mode or --self-inject (either way) and I get a shell, I upgrade (i.e. get a pty, change stty settings etc) after that everthing is fine except when I paste something in the shell window I donot get an echo of pasted items until after I hit return. Using nc or ncat everthing works fine. Also I do get character by character echo.
Which is the say as I type the characters are echoed. Only when I paste does it NOT show until I hit a CR.
Really hard to do pentesting without pasting ability.
I was able to reproduce this behaviour. It might take some time to dig into the root of this issue. In the meantime what you could do in order to make your life a bit easier is to simply hit `<space>` after pasting (instead of `<return>`).

Good catch and thanks for reporting :+1: 

**Edit:** As verbose logging of pwncat on local side reflects this behaviour I would already assume that it is missing a `flush` somewhere.
Thank you for making such a great tool. Are you going to produce any binaries or will it alway be python?
I think your tool can be as great as chisel. But chisel has windows and unix* bins which would help alot. 
As for the reason for bug. I seems to me to be a buffering issue. Try flushing.

Please me know when you find the cause, I'm curious.

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c01d774..0bfb3ca9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@
 ## Unreleased
 
 
+## Release 0.1.2
+
+### Fixes
+- Fixes: [#109](https://github.com/cytopia/pwncat/issues/109) when pasting in term I donot get full line echo
+
+
 ## Release 0.1.1
 
 ### Fixes
diff --git a/Makefile b/Makefile
index a4e8e916..a3404fa3 100644
--- a/Makefile
+++ b/Makefile
@@ -151,6 +151,7 @@ _code-pycodestyle:
 	echo "# Check pycodestyle: $${V}"; \
 	echo "# -------------------------------------------------------------------- #"
 	@#
+	docker pull cytopia/pycodestyle
 	docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data --entrypoint= cytopia/pycodestyle sh -c ' \
 		mkdir -p /tmp \
 		&& cp $(BINPATH)$(BINNAME) /tmp/$(BINNAME).py \
@@ -163,6 +164,7 @@ _code-pydocstyle:
 	echo "# Check pydocstyle: $${V}"; \
 	echo "# -------------------------------------------------------------------- #"
 	@#
+	docker pull cytopia/pydocstyle
 	docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data --entrypoint= cytopia/pydocstyle sh -c ' \
 		mkdir -p /tmp \
 		&& cp $(BINPATH)$(BINNAME) /tmp/$(BINNAME).py \
@@ -175,6 +177,7 @@ _code-pylint:
 	echo "# Check pylint: $${V}"; \
 	echo "# -------------------------------------------------------------------- #"
 	@#
+	docker pull cytopia/pylint
 	docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data --entrypoint= cytopia/pylint sh -c ' \
 		mkdir -p /tmp \
 		&& cp $(BINPATH)$(BINNAME) /tmp/$(BINNAME).py \
@@ -187,6 +190,7 @@ _code-black:
 	echo "# Check Python Black: $${V}"; \
 	echo "# -------------------------------------------------------------------- #"
 	@#
+	docker pull cytopia/black
 	docker run --rm $$(tty -s && echo "-it" || echo) -v ${PWD}:/data --entrypoint= cytopia/black sh -c ' \
 		mkdir -p /tmp \
 		&& cp $(BINPATH)$(BINNAME) /tmp/$(BINNAME).py \
@@ -199,6 +203,7 @@ _code-mypy:
 	echo "# Check Mypy: $${V}"; \
 	echo "# -------------------------------------------------------------------- #"
 	@#
+	docker pull cytopia/mypy
 	docker run --rm $$(tty -s && echo "-it" || echo) -v ${PWD}:/data --entrypoint= cytopia/mypy sh -c ' \
 		mkdir -p /tmp \
 		&& cp $(BINPATH)$(BINNAME) /tmp/$(BINNAME).py \
@@ -499,6 +504,7 @@ docs: _docs-version_readme
 
 .PHONY: _docs-man
 _docs-man: $(BINPATH)$(BINNAME)
+	docker pull python:3-alpine
 	docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data -w /data -e UID=$(UID) -e GID=${GID} python:3-alpine sh -c ' \
 		apk add help2man \
 		&& help2man -n $(BINNAME) --no-info --source=https://github.com/cytopia/pwncat -s 1 -o $(MANPATH)$(BINNAME).1 $(BINPATH)$(BINNAME) \
@@ -520,6 +526,7 @@ _docs-man: $(BINPATH)$(BINNAME)
 .PHONY: _docs-api
 _docs-api:
 	@# Generate pdoc API page
+	docker pull python:3-alpine
 	docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data -w /data -e UID=$(UID) -e GID=${GID} python:3-alpine sh -c ' \
 		pip install pdoc3 \
 		&& mkdir -p /tmp \
@@ -531,6 +538,8 @@ _docs-api:
 .PHONY: _docs-mypy_type_coverage
 _docs-mypy_type_coverage:
 	@# Generate mypy code coverage page
+	docker pull cytopia/mypy
+	docker pull python:3-alpine
 	docker run --rm $$(tty -s && echo "-it" || echo) -v ${PWD}:/data -w /data -e UID=$(UID) -e GID=${GID} --entrypoint= cytopia/mypy sh -c ' \
 		mypy --config-file setup.cfg --html-report tmp $(BINPATH)$(BINNAME) \
 		&& cp -f tmp/mypy-html.css docs/css/mypy.css \
diff --git a/README.md b/README.md
index 01b90f8b..8419ad9d 100644
--- a/README.md
+++ b/README.md
@@ -137,7 +137,7 @@
  </tbody>
 </table>
 
-> <sup>[1] <a href="https://cytopia.github.io/pwncat/pwncat.type.html">mypy type coverage</a> <strong>(fully typed: 93.96%)</strong></sup><br/>
+> <sup>[1] <a href="https://cytopia.github.io/pwncat/pwncat.type.html">mypy type coverage</a> <strong>(fully typed: 94.00%)</strong></sup><br/>
 > <sup>[2] <strong>Failing builds do not indicate broken functionality.</strong> Integration tests run for multiple hours and break sporadically for various different reasons (network timeouts, unknown cancellations of GitHub Actions, etc): <a href="https://github.com/actions/virtual-environments/issues/736">#735</a>, <a href="https://github.com/actions/virtual-environments/issues/841">#841</a></sup><br/>
 > <sup></sup>
 
@@ -166,7 +166,7 @@ tool that works on older and newer machines (hence Python 2+3 compat). Most impo
 
 ## :tada: Install
 
-Current version is: **0.1.1**
+Current version is: **0.1.2**
 
 #### Generic
 
diff --git a/bin/pwncat b/bin/pwncat
index 908a92a0..c2198635 100755
--- a/bin/pwncat
+++ b/bin/pwncat
@@ -128,7 +128,7 @@ if os.environ.get("MYPY_CHECK", False):
 
 APPNAME = "pwncat"
 APPREPO = "https://github.com/cytopia/pwncat"
-VERSION = "0.1.1"
+VERSION = "0.1.2"
 
 # Default timeout for timeout-based sys.stdin and socket.recv
 TIMEOUT_READ_STDIN = 0.05
@@ -3525,7 +3525,10 @@ class IOStdinStdout(IO):
 
         # [2/3] (Linux/Mac) Raw mode
         if self.__stdin_israw():
-            self.__set_input_timeout()
+            # Issue #109
+            # when pasting in term I donot get full line echo
+            # To mitigate this, I'm disabling the select.select call on sys.stdin
+            # self.__set_input_timeout()
             if self.__py3:
                 return sys.stdin.buffer.read(1)
             return sys.stdin.read(1)  # type: ignore
diff --git a/docs/pwncat.api.html b/docs/pwncat.api.html
index 6ba54f28..ff2ad048 100644
--- a/docs/pwncat.api.html
+++ b/docs/pwncat.api.html
@@ -3,7 +3,7 @@
 <head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
-<meta name="generator" content="pdoc 0.9.2" />
+<meta name="generator" content="pdoc 0.10.0" />
 <title>pwncat API documentation</title>
 <meta name="description" content="pwncat." />
 <link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
@@ -157,7 +157,7 @@ <h1 class="title">Module <code>pwncat</code></h1>
 
 APPNAME = &#34;pwncat&#34;
 APPREPO = &#34;https://github.com/cytopia/pwncat&#34;
-VERSION = &#34;0.1.1&#34;
+VERSION = &#34;0.1.2&#34;
 
 # Default timeout for timeout-based sys.stdin and socket.recv
 TIMEOUT_READ_STDIN = 0.05
@@ -3554,7 +3554,10 @@ <h1 class="title">Module <code>pwncat</code></h1>
 
         # [2/3] (Linux/Mac) Raw mode
         if self.__stdin_israw():
-            self.__set_input_timeout()
+            # Issue #109
+            # when pasting in term I donot get full line echo
+            # To mitigate this, I&#39;m disabling the select.select call on sys.stdin
+            # self.__set_input_timeout()
             if self.__py3:
                 return sys.stdin.buffer.read(1)
             return sys.stdin.read(1)  # type: ignore
@@ -12672,7 +12675,10 @@ <h2 id="args">Args</h2>
 
         # [2/3] (Linux/Mac) Raw mode
         if self.__stdin_israw():
-            self.__set_input_timeout()
+            # Issue #109
+            # when pasting in term I donot get full line echo
+            # To mitigate this, I&#39;m disabling the select.select call on sys.stdin
+            # self.__set_input_timeout()
             if self.__py3:
                 return sys.stdin.buffer.read(1)
             return sys.stdin.read(1)  # type: ignore
@@ -18108,7 +18114,7 @@ <h4><code><a title="pwncat.TransformSafeword" href="#pwncat.TransformSafeword">T
 </nav>
 </main>
 <footer id="footer">
-<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.9.2</a>.</p>
+<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
 </footer>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/pwncat.type.html b/docs/pwncat.type.html
index 89dba086..5e023fdf 100644
--- a/docs/pwncat.type.html
+++ b/docs/pwncat.type.html
@@ -16,13 +16,13 @@ <h1>pwncat - Type Coverage</h1>
 </tr></thead>
 <tfoot><tr class="summary summary-quality-1">
 <th class="summary summary-filename">Total</th>
-<th class="summary summary-precision">6.04% imprecise</th>
-<th class="summary summary-lines">6361 LOC</th>
+<th class="summary summary-precision">6.00% imprecise</th>
+<th class="summary summary-lines">6364 LOC</th>
 </tr></tfoot>
 <tbody><tr class="summary summary-quality-1">
 <td class="summary summary-filename">bin/pwncat</td>
-<td class="summary summary-precision">6.04% imprecise</td>
-<td class="summary summary-lines">6361 LOC</td>
+<td class="summary summary-precision">6.00% imprecise</td>
+<td class="summary summary-lines">6364 LOC</td>
 </tr></tbody>
 </table>
 
@@ -6391,6 +6391,9 @@ <h2>pwncat</h2>
 <span id="L6359" class="lineno"><a class="lineno" href="#L6359">6359</a></span>
 <span id="L6360" class="lineno"><a class="lineno" href="#L6360">6360</a></span>
 <span id="L6361" class="lineno"><a class="lineno" href="#L6361">6361</a></span>
+<span id="L6362" class="lineno"><a class="lineno" href="#L6362">6362</a></span>
+<span id="L6363" class="lineno"><a class="lineno" href="#L6363">6363</a></span>
+<span id="L6364" class="lineno"><a class="lineno" href="#L6364">6364</a></span>
 </pre></td>
 <td class="table-code"><pre><span class="line-empty" title="No Anys on this line!">#!/usr/bin/env python3</span>
 <span class="line-empty" title="No Anys on this line!">"""pwncat."""</span>
@@ -6522,7 +6525,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-precise" title="No Anys on this line!">APPNAME = "pwncat"</span>
 <span class="line-precise" title="No Anys on this line!">APPREPO = "https://github.com/cytopia/pwncat"</span>
-<span class="line-precise" title="No Anys on this line!">VERSION = "0.1.1"</span>
+<span class="line-precise" title="No Anys on this line!">VERSION = "0.1.2"</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!"># Default timeout for timeout-based sys.stdin and socket.recv</span>
 <span class="line-precise" title="No Anys on this line!">TIMEOUT_READ_STDIN = 0.05</span>
@@ -6558,7 +6561,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!"># -------------------------------------------------------------------------------------------------</span>
 <span class="line-empty" title="No Anys on this line!"># Abstract class with Python 2 + Python 3 support: https://stackoverflow.com/questions/35673474</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">ABC = ABCMeta("ABC", (object,), {"__slots__": ()})</span>
+Explicit (x2)">ABC = ABCMeta("ABC", (object,), {"__slots__": ()})</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!"># -------------------------------------------------------------------------------------------------</span>
@@ -6589,7 +6592,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">            # is already initialized, the thread won't create a new object.</span>
 <span class="line-precise" title="No Anys on this line!">            if cls not in cls._instances:</span>
 <span class="line-any" title="Any Types on this line: 
-Explicit (x4)">                cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)</span>
+Explicit (x5)">                cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)</span>
 <span class="line-precise" title="No Anys on this line!">        return cls._instances[cls]</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!"></span>
@@ -6773,9 +6776,9 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">    ):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (...) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(intvl) is int, type(intvl)</span>
+Explicit (x4)">        assert type(intvl) is int, type(intvl)</span>
 <span class="line-imprecise" title="Any Types on this line: 
-Explicit (x6)">        assert type(kwargs) is dict, type(kwargs)</span>
+Explicit (x8)">        assert type(kwargs) is dict, type(kwargs)</span>
 <span class="line-precise" title="Any Types on this line: 
 Explicit (x4)">        self.__action = action</span>
 <span class="line-precise" title="No Anys on this line!">        self.__ssig = ssig</span>
@@ -6852,11 +6855,11 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">    ):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (...) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(repeat) is int, type(repeat)</span>
+Explicit (x4)">        assert type(repeat) is int, type(repeat)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(pause) is float, type(pause)</span>
+Explicit (x4)">        assert type(pause) is float, type(pause)</span>
 <span class="line-imprecise" title="Any Types on this line: 
-Explicit (x6)">        assert type(kwargs) is dict, type(kwargs)</span>
+Explicit (x8)">        assert type(kwargs) is dict, type(kwargs)</span>
 <span class="line-precise" title="Any Types on this line: 
 Explicit (x4)">        self.__action = action</span>
 <span class="line-precise" title="No Anys on this line!">        self.__ssig = ssig</span>
@@ -6976,23 +6979,23 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">    ):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (...) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(bufsize) is int, type(bufsize)</span>
+Explicit (x4)">        assert type(bufsize) is int, type(bufsize)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(backlog) is int, type(backlog)</span>
+Explicit (x4)">        assert type(backlog) is int, type(backlog)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(recv_timeout) is float, type(recv_timeout)</span>
+Explicit (x4)">        assert type(recv_timeout) is float, type(recv_timeout)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(nodns) is bool, type(nodns)</span>
+Explicit (x4)">        assert type(nodns) is bool, type(nodns)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(ipv4) is bool, type(ipv4)</span>
+Explicit (x4)">        assert type(ipv4) is bool, type(ipv4)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(ipv6) is bool, type(ipv6)</span>
+Explicit (x4)">        assert type(ipv6) is bool, type(ipv6)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(src_addr) is str or src_addr is None, type(src_addr)</span>
+Explicit (x4)">        assert type(src_addr) is str or src_addr is None, type(src_addr)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(src_port) is int or src_port is None, type(src_port)</span>
+Explicit (x4)">        assert type(src_port) is int or src_port is None, type(src_port)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(udp) is bool, type(udp)</span>
+Explicit (x4)">        assert type(udp) is bool, type(udp)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__bufsize = bufsize</span>
 <span class="line-precise" title="No Anys on this line!">        self.__backlog = backlog</span>
 <span class="line-precise" title="No Anys on this line!">        self.__recv_timeout = recv_timeout</span>
@@ -7045,7 +7048,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">    ):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (...) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(recv_timeout_retry) is int, type(recv_timeout_retry)</span>
+Explicit (x4)">        assert type(recv_timeout_retry) is int, type(recv_timeout_retry)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__recv_timeout_retry = recv_timeout_retry</span>
 <span class="line-precise" title="No Anys on this line!">        super(DsIONetworkSock, self).__init__(</span>
 <span class="line-precise" title="No Anys on this line!">            bufsize,</span>
@@ -7083,7 +7086,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">    def reconn(self, value):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (int) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(value) is int, type(value)</span>
+Explicit (x4)">        assert type(value) is int, type(value)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__reconn = value</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">    @property</span>
@@ -7096,7 +7099,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">    def reconn_wait(self, value):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (float) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(value) is float, type(value)</span>
+Explicit (x4)">        assert type(value) is float, type(value)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__reconn_wait = value</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">    @property</span>
@@ -7111,14 +7114,14 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">    def __init__(self, reconn, reconn_wait, reconn_robin):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (int, float, List[int]) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(reconn) is int, type(reconn)</span>
+Explicit (x4)">        assert type(reconn) is int, type(reconn)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(reconn_wait) is float, type(reconn_wait)</span>
+Explicit (x4)">        assert type(reconn_wait) is float, type(reconn_wait)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(reconn_robin) is list, type(reconn_robin)</span>
+Explicit (x4)">        assert type(reconn_robin) is list, type(reconn_robin)</span>
 <span class="line-precise" title="No Anys on this line!">        for i in reconn_robin:</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">            assert type(i) is int, type(i)</span>
+Explicit (x4)">            assert type(i) is int, type(i)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__reconn = reconn</span>
 <span class="line-precise" title="No Anys on this line!">        self.__reconn_wait = reconn_wait</span>
 <span class="line-precise" title="No Anys on this line!">        self.__reconn_robin = reconn_robin</span>
@@ -7144,7 +7147,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">        # type: (bool) -&gt; None</span>
 <span class="line-empty" title="No Anys on this line!">        """Change keep_open value."""</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(value) is bool, type(value)</span>
+Explicit (x4)">        assert type(value) is bool, type(value)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__keep_open = value</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">    @property</span>
@@ -7157,7 +7160,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">    def rebind(self, value):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (int) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(value) is int, type(value)</span>
+Explicit (x4)">        assert type(value) is int, type(value)</span>
 <span class="line-precise" title="No Anys on this line!">        self.__rebind = value</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">    @property</span>
@@ -7178,16 +7181,16 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">    def __init__(self, keep_open, rebind, rebind_wait, rebind_robin):</span>
 <span class="line-empty" title="No Anys on this line!">        # type: (bool, int, float, List[int]) -&gt; None</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(keep_open) is bool, type(keep_open)</span>
+Explicit (x4)">        assert type(keep_open) is bool, type(keep_open)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(rebind) is int, type(rebind)</span>
+Explicit (x4)">        assert type(rebind) is int, type(rebind)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(rebind_wait) is float, type(rebind_wait)</span>
+Explicit (x4)">        assert type(rebind_wait) is float, type(rebind_wait)</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">        assert type(rebind_robin) is list, type(rebind_robin)</span>
+Explicit (x4)">        assert type(rebind_robin) is list, type(rebind_robin)</span>
 <span class="line-precise" title="No Anys on this line!">        for i in rebind_robin:</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x2)">            assert type(i) is int, type(i)</span>
+Explicit (x4)">            assert type(i) is int, type(i)</span>
 <span class="line-precise" title="No Anys on this line!">        self.keep_open = keep_open</span>
 <span class="line-precise" title="No Anys on this line!">        self.__rebind = rebind</span>
 <span class="line-precise" title="No Anys on this line!">        self.__rebind_wait = rebind_wait</span>
@@ -7479,7 +7482,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">        """Implementation of rstring which works on bytes or strings."""</span>
 <span class="line-empty" title="No Anys on this line!">        # We have a bytes object in Python3</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">        if sys.version_info &gt;= (3, 0) and type(data) is not str:</span>
+Explicit (x2)">        if sys.version_info &gt;= (3, 0) and type(data) is not str:</span>
 <span class="line-empty" title="No Anys on this line!">            # Strip whitespace</span>
 <span class="line-precise" title="No Anys on this line!">            if search is None:</span>
 <span class="line-precise" title="No Anys on this line!">                while True:</span>
@@ -7789,7 +7792,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">                "Invalid key for address family: %s (type: %s) (valid: %s)",</span>
 <span class="line-precise" title="No Anys on this line!">                repr(family),</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">                repr(type(family)),</span>
+Explicit (x2)">                repr(type(family)),</span>
 <span class="line-precise" title="No Anys on this line!">                repr(self.__AF_HUMAN),</span>
 <span class="line-empty" title="No Anys on this line!">            )</span>
 <span class="line-precise" title="No Anys on this line!">            return "unknown"</span>
@@ -7805,7 +7808,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">                "Invalid key for address sock_type: %s (type: %s) (valid: %s)",</span>
 <span class="line-precise" title="No Anys on this line!">                repr(sock_type),</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">                repr(type(sock_type)),</span>
+Explicit (x2)">                repr(type(sock_type)),</span>
 <span class="line-precise" title="No Anys on this line!">                repr(self.__ST_HUMAN),</span>
 <span class="line-empty" title="No Anys on this line!">            )</span>
 <span class="line-precise" title="No Anys on this line!">            return "unknown"</span>
@@ -8009,8 +8012,7 @@ <h2>pwncat</h2>
 <span class="line-precise" title="No Anys on this line!">            port,</span>
 <span class="line-empty" title="No Anys on this line!">        )</span>
 <span class="line-empty" title="No Anys on this line!">        try:</span>
-<span class="line-imprecise" title="Any Types on this line: 
-Omitted Generics (x1)">            sock.bind((addr, port))</span>
+<span class="line-precise" title="No Anys on this line!">            sock.bind((addr, port))</span>
 <span class="line-precise" title="No Anys on this line!">        except (OverflowError, OSError, socket.gaierror, socket.error) as error:</span>
 <span class="line-precise" title="No Anys on this line!">            msg = "Binding (family {}/{}, {}) socket to {}:{} failed: {}".format(</span>
 <span class="line-precise" title="No Anys on this line!">                sock.family, sock_family_name, sock_type_name, addr, port, error</span>
@@ -8144,8 +8146,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">            # Ensure to use connect() protocol independent</span>
 <span class="line-precise" title="No Anys on this line!">            info = socket.getaddrinfo(addr, port, sock.family, sock.type, sock.proto)</span>
-<span class="line-imprecise" title="Any Types on this line: 
-Omitted Generics (x1)">            sock.connect(info[0][4])</span>
+<span class="line-precise" title="No Anys on this line!">            sock.connect(info[0][4])</span>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">            # UDP stateful connect</span>
 <span class="line-empty" title="No Anys on this line!">            # A UDP client doesn't know if the connect() was successful, so the trick</span>
@@ -8153,9 +8154,9 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">            # receive or simply a timeout (which means success).</span>
 <span class="line-precise" title="No Anys on this line!">            if udp_sconnect and int(sock.type) == int(socket.SOCK_DGRAM):</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">                assert type(udp_send_payload) is bytes</span>
+Explicit (x2)">                assert type(udp_send_payload) is bytes</span>
 <span class="line-precise" title="Any Types on this line: 
-Explicit (x1)">                assert type(udp_recv_bufsize) is int</span>
+Explicit (x2)">                assert type(udp_recv_bufsize) is int</span>
 <span class="line-empty" title="No Anys on this line!">                # Some applications like netcat do not like to receive empty</span>
 <span class="line-empty" title="No Anys on this line!">                # data, as they treat it as an EOF and will quit upon receive,</span>
 <span class="line-empty" title="No Anys on this line!">                # so we're using a nullbyte character instead.</span>
@@ -8413,8 +8414,7 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">                # Only UDP server has not made a connect() to the socket, all others</span>
 <span class="line-empty" title="No Anys on this line!">                # are already connected and need to use send() instead of sendto()</span>
 <span class="line-precise" title="No Anys on this line!">                if self.__udp_mode_server:</span>
-<span class="line-precise" title="Any Types on this line: 
-Omitted Generics (x2)">                    curr = self.__active["conn"].sendto(</span>
+<span class="line-precise" title="No Anys on this line!">                    curr = self.__active["conn"].sendto(</span>
 <span class="line-precise" title="No Anys on this line!">                        data, (self.__active["remote_addr"], self.__active["remote_port"])</span>
 <span class="line-empty" title="No Anys on this line!">                    )</span>
 <span class="line-precise" title="No Anys on this line!">                    send += curr</span>
@@ -10121,7 +10121,10 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!"></span>
 <span class="line-empty" title="No Anys on this line!">        # [2/3] (Linux/Mac) Raw mode</span>
 <span class="line-precise" title="No Anys on this line!">        if self.__stdin_israw():</span>
-<span class="line-precise" title="No Anys on this line!">            self.__set_input_timeout()</span>
+<span class="line-empty" title="No Anys on this line!">            # Issue #109</span>
+<span class="line-empty" title="No Anys on this line!">            # when pasting in term I donot get full line echo</span>
+<span class="line-empty" title="No Anys on this line!">            # To mitigate this, I'm disabling the select.select call on sys.stdin</span>
+<span class="line-empty" title="No Anys on this line!">            # self.__set_input_timeout()</span>
 <span class="line-precise" title="No Anys on this line!">            if self.__py3:</span>
 <span class="line-precise" title="No Anys on this line!">                return sys.stdin.buffer.read(1)</span>
 <span class="line-precise" title="No Anys on this line!">            return sys.stdin.read(1)  # type: ignore</span>
@@ -13167,13 +13170,13 @@ <h2>pwncat</h2>
 <span class="line-empty" title="No Anys on this line!">            ),</span>
 <span class="line-empty" title="No Anys on this line!">        )</span>
 <span class="line-any" title="Any Types on this line: 
-Explicit (x5)">        if type(args.ping_intvl) is int and args.ping_intvl &gt; 0:</span>
+Explicit (x3)">        if type(args.ping_intvl) is int and args.ping_intvl &gt; 0:</span>
 <span class="line-any" title="Any Types on this line: 
 Explicit (x1)">            payload = StringEncoder.encode(args.ping_word)</span>
 <span class="line-precise" title="No Anys on this line!">            run.add_timer(</span>
 <span class="line-precise" title="No Anys on this line!">                "PING-INT",</span>
-<span class="line-any" title="Any Types on this line: 
-Explicit (x5)">                DsRunnerTimer(net.consumer, ssig, args.ping_intvl, (payload,), {}),  # send data</span>
+<span class="line-imprecise" title="Any Types on this line: 
+Explicit (x4)">                DsRunnerTimer(net.consumer, ssig, args.ping_intvl, (payload,), {}),  # send data</span>
 <span class="line-empty" title="No Anys on this line!">            )</span>
 <span class="line-any" title="Any Types on this line: 
 Explicit (x1)">        if args.ping_init:</span>
diff --git a/man/pwncat.1 b/man/pwncat.1
index ae656d18..105974ff 100644
--- a/man/pwncat.1
+++ b/man/pwncat.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
-.TH PWNCAT: "1" "June 2021" "https://github.com/cytopia/pwncat" "User Commands"
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.3.
+.TH PWNCAT: "1" "October 2021" "https://github.com/cytopia/pwncat" "User Commands"
 .SH NAME
 pwncat: \- pwncat
 .SH DESCRIPTION
diff --git a/setup.cfg b/setup.cfg
index 06bfc235..cf22b3b2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,7 +25,7 @@ max-line-length = 100
 # useless-object-inheritance: don't lint useless-object-inheritance to stary Python2/3 compatible
 # bad-continuation:           let Python Black take care of this
 # unidiomatic-typecheck:      Need to check if int or bool and this doesnt work with isinstance()
-disable = useless-object-inheritance, bad-continuation, unidiomatic-typecheck, super-with-arguments, raise-missing-from, use-a-generator
+disable = useless-object-inheritance, bad-continuation, unidiomatic-typecheck, super-with-arguments, raise-missing-from, use-a-generator, consider-using-f-string, consider-using-dict-items, unused-private-member, unspecified-encoding
 max-branches = 30
 max-statements = 125
 max-args = 15
diff --git a/setup.py b/setup.py
index 022d3f4c..69f5cf3b 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@
 
 setup(
     name="pwncat",
-    version="0.1.1",
+    version="0.1.2",
     description="Netcat on steroids with Firewall, IDS/IPS evasion, bind and reverse shell and port forwarding magic - and its  fully scriptable with Python (PSE).",
     license="MIT",
     long_description=long_description,


Test patch:
diff --git a/tests/bin/check-usage.sh b/tests/bin/check-usage.sh
index c2030087..2f9d4360 100755
--- a/tests/bin/check-usage.sh
+++ b/tests/bin/check-usage.sh
@@ -20,7 +20,7 @@ validate_readme() {
 	printf "[TEST] Checking README.md ... "
 	# shellcheck disable=SC2002
 	if diff --ignore-trailing-space \
-		<("${bin}" -h) \
+		<($(which python2) "${bin}" -h) \
 		<(cat "${readme}" | grep -E -A 10000 'usage:[[:space:]]' | grep -E -B 10000 '^[[:space:]]+\-V') \
 		; then
 		printf "%s\\n" "OK"
@@ -35,7 +35,7 @@ _diff_website() {
 	local next_arg="${2}"
 
 	if ! diff --ignore-trailing-space --ignore-blank-lines \
-		<("${bin}" -h | grep "^${curr_arg}" -A 2000 | grep "^${next_arg}" -B 2000 | grep -v "^${next_arg}" ) \
+		<($(which python2) "${bin}" -h | grep "^${curr_arg}" -A 2000 | grep "^${next_arg}" -B 2000 | grep -v "^${next_arg}" ) \
 		<(grep "^${curr_arg}" -A 2000 "${website}"  | grep "^${next_arg}" -B 2000 | grep -v "^${next_arg}" | grep -v '<pre' | grep -v '</pre>') \
 		; then
 		printf "%s\\n" "ERROR - usage"
@@ -92,7 +92,7 @@ validate_website() {
 
 	# [6/5] Check misc arguments:
 	if ! diff --ignore-trailing-space --ignore-blank-lines \
-		<("${bin}" -h | grep 'misc arguments' -A 2000 | grep '\-\-version' -B 2000) \
+		<($(which python2) "${bin}" -h | grep 'misc arguments' -A 2000 | grep '\-\-version' -B 2000) \
 		<(grep 'misc arguments' -A 2000 "${website}" | grep '\-\-version' -B 2000) \
 		; then
 		printf "%s\\n" "ERROR - misc arguments"