World's most awful hack
25 Jan 2005Problem: You are behind a FreeBSD firewall using natd
. You are
listening to an Internet radio station with a limited number of
streams. It has taken you six tries to get in, but at last you're
there. Suddenly it's time for lunch, though, and you want to take
your laptop (which you've been using to listen) with you. When you
come back, you'll need to try connecting all over again.
Solution: natd
is just a userland program. Hack it so that, upon
receiving a certain signal (USR1, say, or maybe something sent over a
listening Unix or TCP socket), it will remap a certain connection to
another incoming point. End effect: instead of the radio stream being
directed to your laptop, it'll be redirected to your workstation
where you'll have netcat
or something similar to grab the stream
and keep things going. Switch back once you're back from lunch.
1 Comment
From: Jan-Willem Regeer
17-April-2005-09:00:46
Or a simpler method would be on the machine doing NAT to write a simple perl script which opens a port, and then connects to the radio. If nothing is connected to the port it binds to, then it will just /dev/null the stream coming in, so all that time it stays connected. Then when you connect to the port the perl script is binded to, it starts sending you the stream.
Have it write the backlog to the disk, and then stream that to your laptop when you are back, you won't miss a single bit of radio :P
This is all assuming it is not some java applet or something like that which is embedded on a website. It would have to be shoutcast/icecast sort of thing.
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018