Skip to content

Instantly share code, notes, and snippets.

@en0
en0 / Host Proxy
Created November 21, 2013 02:13
Using netcat to proxy a host.
#!/bin/env bash
PORT="${1}"
TARGET="${2}"
[ -z "${3}" ] && TPORT="${1}" || TPORT="${3}"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <port> <target> [target port]"
exit 1
fi