Skip to content

Instantly share code, notes, and snippets.

@yanivk1984
Last active March 29, 2020 07:38
Show Gist options
  • Select an option

  • Save yanivk1984/e25d461876f9d698a91a6634881b1323 to your computer and use it in GitHub Desktop.

Select an option

Save yanivk1984/e25d461876f9d698a91a6634881b1323 to your computer and use it in GitHub Desktop.
# creating udp connection under port 161 and then exiting (working for tcp)
cat <(echo "") - | nc <ip-address> 161
# creating udp connection under port 161 and then exiting after one second (can also work for udp)
echo "" | nc -w 1 172.31.253.167 161 -u
# getting the result with success message
nc -uvz 172.31.253.167 161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment