Created
June 18, 2020 18:13
-
-
Save timhughes/96f5145a35898a52e41db6ff73ebfc4e to your computer and use it in GitHub Desktop.
oneliner python netcat style listening socket server for when nc is not available
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -uc "import sys, socket;from functools import partial; a = socket.create_server(('0.0.0.0', 8888)).accept(); [sys.stdout.buffer.write(bytes(i)) for i in iter(partial(a[0].recv, 1024), b'')]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment