The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Cat and inetd...help? by Kickstart 2005-08-16 10:42:05
I've like to have inetd serve up a file, using cat.

I've added the entry to /etc/services:
reportsock 44000/tcp #Reportsock

I've added an entry to /etc/inetd.conf and restarted inetd:
reportsock stream tcp nowait reportsock /bin/cat /tmp/reportsock

When I request that port, I get the following:
GET / HTTP/1.1
Host: herring.hcareers.com:44000
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pl
ain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Any idea how I can get it to spout the file instead of the headers?

Thanks,

KS
[ Reply ]
  I think I got it... by Kickstart2005-08-16 10:51:27
    Heh. Beat me to it, eh? ;) (n/t) by pyroteknix2005-08-16 10:54:17
  cat isn't getting the file argument by pyroteknix2005-08-16 10:53:54
    Further strangeness by Kickstart2005-08-16 10:59:22
      Missing a Content-Type? by pyroteknix2005-08-16 11:01:29
        Here's a sample by Kickstart2005-08-16 11:02:49
          Give me a few... by pyroteknix2005-08-16 11:13:37
            I've got some of that... by Kickstart2006-11-19 12:55:59
              Oh. Heh. by pyroteknix2005-08-16 11:21:06
                I wonder about improving reportsock.pl by Kickstart2005-08-16 11:25:42
                  OK, Here's what I have so far. by pyroteknix2005-08-16 11:51:23
                    bah.. s/funky think/funky thing/ (n/t) by pyroteknix2005-08-16 11:52:02
                    OK got it. by pyroteknix2005-08-16 12:08:42
                      Heh, now we need to merge yours and mine :) (n/t) by Kickstart2005-08-16 12:14:47
                        Like this? by pyroteknix2005-08-16 12:26:46
                          That's funnny :) by Kickstart2005-08-16 12:34:55
                    Some cleanup... by Kickstart2005-08-16 12:14:00
                      Yup. by pyroteknix2005-08-16 12:15:48
                        No worried...thanks very much! (n/t) by Kickstart2005-08-16 12:16:25
                          No problem ;) by pyroteknix2005-08-16 12:27:38
                            Absolutely by Kickstart2005-08-16 12:36:00
          Ah...I see by Kickstart2005-08-16 11:13:48
            Yeah. by pyroteknix2005-08-16 11:22:36

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)