netcat — quick reference

Xavier Briand
Mar 28, 2019 · 1 min read

Arbitrary TCP and UDP connections and listens

Scan for listening daemon, without sending data

BSD
> nc -z example.com 20-30
GNU
> nc -zv example.com 20-30

Client/Server

BSD
> nc -l 1234 # server
> nc example.com 1234 # client> nc -l 1234 > out.txt # server> nc example.com 1234 < in.txt # clientGNU
> nc -lp 1234
Image for post
BSD man page

My journey into Cybersecurity

My experience trailblazing the practice of Cybersecurity

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store