Skip to content

Instantly share code, notes, and snippets.

@ayrton
Forked from jordelver/gist:5806460
Last active December 19, 2015 08:59
Show Gist options
  • Save ayrton/5929299 to your computer and use it in GitHub Desktop.
Save ayrton/5929299 to your computer and use it in GitHub Desktop.

Sharing files using netcat

The receiver

nc -l 5566 > data-dump.sql

Listen on port 5566 and redirect output to data-dump.sql

The sender

nc <ip-address-of-the-receiver> 5566 < data-dump.sql

Connect to the listening receiver and redirect input from data-dump.sql

Directory

tar c directory | nc <ip-address-of-the-receiver> 5566

Source: Sharing files like a hacker by Jesse Storimer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment