Skip to content

Instantly share code, notes, and snippets.

@rajiteh
Created September 7, 2016 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajiteh/79e6c509b56ae1fabce3d9e8da2077a9 to your computer and use it in GitHub Desktop.
Save rajiteh/79e6c509b56ae1fabce3d9e8da2077a9 to your computer and use it in GitHub Desktop.
Simple TCP listener
while true; do echo "HELLO FROM THE OTHER SIDE" | perl -MIO::Socket::INET -ne 'BEGIN{$l=IO::Socket::INET->new(LocalPort=>31337,Proto=>"tcp",Listen=>5,ReuseAddr=>1);$l=$l->accept}print $l $_';done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment