I've found an infinite number of webpages and forum threads clearly stating that Debian and Ubuntu distros provide Bash compiled with --disable-net-redirections which disallows redirection to /dev/tcp and /dev/udp. On the other hand, I've found an incredibly small amount of information about how to "fix" this beyond "go recompile Bash". A thread on launchpad notes that Karmic comes with a version of bash which enables redirections. I'm currently running Jaunty, and upgrading isn't really feasible.
So, I've recompiled Bash (version 4.0.0)with --enable-net-redirections. After searching around way too long, I finally came across the major and minor device IDs for the tcp and udp devices and created them with mknod. Essentially, this is my command history:
Code:
cd <bash source directory>
sudo su
./configure --enable-net-redirections
make
make install
mknod /dev/tcp c 30 36
mknod /dev/udp c 30 39
However... I'm still unable to use these devices as redirection. I get results like:
Code:
[dave@panic:/] $ cat < /dev/tcp/time.nist.gov/13
bash: /dev/tcp/time.nist.gov/13: Not a directory
Anyone know what I've missed?
Bookmarks