Skip to content

Instantly share code, notes, and snippets.

@bom-d-van
Created November 1, 2016 08:57
Show Gist options
  • Save bom-d-van/efa192a7e3f079e101dbf75b48363c45 to your computer and use it in GitHub Desktop.
Save bom-d-van/efa192a7e3f079e101dbf75b48363c45 to your computer and use it in GitHub Desktop.
NC/NetCat Tips
# osx
cat test.http | nc -l -p 8000
# linux
cat test.http | nc -l 8000
# centos fix
# http://serverfault.com/a/729768/71640
# Removes the old package
yum erase nc
# Manually downloads the working package from the Official Repository
wget http://vault.centos.org/6.6/os/x86_64/Packages/nc-1.84-22.el6.x86_64.rpm
# Installs the package
rpm -iUv nc-1.84-22.el6.x86_64.rpm
# more tips
# https://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/
# https://josetips.wordpress.com/2014/03/12/minimum-http-server-with-netcat/
cat backup.iso | pv -b | nc -l 3333
dd if=/dev/hdb5 | gzip -9 | nc -l 3333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment