Assuming you're on linux, I'd recommend skipping perl and using iptables to take care of this.
iptables -A PREROUTING -i <interface> -s <sourceip> -p tcp -m tcp --dp +ort <port> -j REDIRECT --to-ports <newport>
There's also an option to specify a source network instead of a single IP.
In reply to Re: Socket Traffic Cop
by Crackers2
in thread Socket Traffic Cop
by sans-clue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |