Skip to content

Instantly share code, notes, and snippets.

View nightwarriorftw's full-sized avatar
👨‍💻
Learning and Hacking on projects

Aman Verma nightwarriorftw

👨‍💻
Learning and Hacking on projects
View GitHub Profile
@nightwarriorftw
nightwarriorftw / netcat_tcp_server.sh
Created April 15, 2019 20:31 — forked from phuesler/netcat_tcp_server.sh
Simple tcp server using netcat
#!/bin/bash
# Simple tcp server using netcat
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555
# - verify with `telnet locahhost 5555`
# - quit the telnet with `ctrl-]` and then type quit
# - the while loop is there so reopen the port after a client has disconnected
# - supports only one client at a time
PORT=5555;
while :; do nc -l -p $PORT | tee output.log; sleep 1; done