ts-7000
[Top] [All Lists]

[ts-7000] Re: how to request 7250 execute command from external web brow

To:
Subject: [ts-7000] Re: how to request 7250 execute command from external web browser?
From: "chentom60" <>
Date: Thu, 26 Jan 2006 18:45:34 -0000
Jim:

My browser is: Firefox/1.0.7 Mandriva/1.0.6-16.2.20060mdk (2006.0)
I clicked menu tab View-Page Source and find what my browser gets is:

<html><body></body></html>

that's why it does not display anything.

I modified your script a little bit by commenting out one -e "\r" and
finally it works.

case "$REQ" in
\/hello)
#
# example fixed page....
# 
  echo -e "HTTP/1.1 200 OK\r"
  echo -e "Server: MickyMouse0.1\r"
  echo -e "Date: $DATE\r"
  echo -e "Connection: close\r"
  echo -e "Content-Type: text/html; charset="ASCII"\r"
  echo #-e "\r" no need

I don't know why, I am not very familiar with shell script programming
yet, but it looks like all the -e and "\r" can be ommited. At least,
Mozilla Firefox 1.0.6, 1.0.7. become happy.

Thanks for your help!

Tom



--- In  Jim Jackson <> wrote:
>
> 
> 
> 
> On Wed, 25 Jan 2006, chentom60 wrote:
> 
> > Thans Jim!
> >
> > Thanks to your reply! I checked my /etc/services file and find that
> > webcache        3128/tcp                        # WWW caching service
> > webcache        3128/udp                        # WWW caching service
> > webcache        8080/tcp                        # WWW caching service
> > webcache        8080/udp                        # WWW caching service
> >
> > is it quite strange that webcache listens to both 3128 and 8080 ?
> 
> No - as I said, all that /etc/services is used for is converting
> names to port numbers (and vice-versa), it's a translation table.
> 
> > However only 3128 is the port webcache really listens to.
> 
> inetd looks through the file for "webcache" and it finds "3128/tcp"
> and stops looking - so it listens on tcp port 3128 for the "webcache"
> service.
> 
> > Anyway, I tried http://192.168.0.50:3128/hello. This time, I am not
> > refused but i got a blank page. http://192.168.0.50:3128/usage
> > neither.
> 
> Which webbrowser you using. I've tested this with an oldish
> Mozilla, Firefox, lynx (a text only web browser) and wget
> Not tried Internet Explorer - I try not to "do" microsoft.
> The html output by the script is pretty rudimentary!
> And the header lines are fairly minimal.
> IE might need something more.
> 
> Try looking at.....
> 
>  http://www.franjam.org.uk/hello.test
> 
> 
> > But http://192.168.0.50:3128/jj works which redirects to your
> > homepage.
> >
> > Any idea why?
> >
> > Tom
> >
> >
> > --- In  Jim Jackson <> wrote:
> > >
> > >
> > > Hi, I sent this earlier today, but haven't seen it on the list yet
> > so I'm
> > > sending it again......
> > >
> > > ---------- Forwarded message ----------
> > > Date: Wed, 25 Jan 2006 13:44:04 +0000 (GMT)
> > > From: Jim Jackson <>
> > > To: 
> > > Subject: Re: [ts-7000] Re: how to request 7250 execute command from
> > >     external web browser?
> > >
> > >
> > >
> > > On Wed, 25 Jan 2006, chentom60 wrote:
> > >
> > > > I followed exactly as what you did, but my HTTP requests are
always
> > > > rejected.  I am using TS-7250, not 7200. Is that a problem? I
don't
> > > > think your script is wrong, rather, webcache may not be called
when I
> > > > use http://192.168.0.50:8080/hello command.
> > >
> > > check the /etc/services file, and look for webcache entries
> > > Actually I've just looked in mine and get
> > >
> > >  grep webcache /etc/services
> > >  #webcache        3128/tcp                        # WWW caching
service
> > >  #webcache        3128/udp                        # WWW caching
service
> > >  webcache        8080/tcp                        # WWW caching
service
> > >  webcache        8080/udp                        # WWW caching
service
> > >
> > > Which is sort of wierd, but vaguely rings bells (I've had the
board for
> > > 18 months now and the memory isn't what it was, and I don't document
> > > EVERYTHING I do :-).
> > >
> > > I think I had to comment out the first entry way back to get
webcache =
> > > 8080. If yours isn't commented out, it maybe that inetd is
listening on
> > > port 3128, so do a quick check with
> > >
> > > http://192.168.0.50:3128/hello
> > >
> > > If you edit /etc/services, you will have to send inetd the HUP
signal
> > > to make it re-initialise. /etc/services is just a file for
mapping port
> > > names to port numbers
> > >
> > > Jim
> > >
> > > >
> > > >
> > > > Is it possible that you forgot to mention any other step? any
other
> > > > .conf also needs to be modified?
> > > >
> > > > Has anybody tried this script on 7250 also?
> > > >
> > > > Tom
> > > >
> > > >
> > > >
> > > >
> > > > --- In  Jim Jackson <> wrote:
> > > > >
> > > > >
> > > > >
> > > > > On Wed, 18 Jan 2006, chentom60 wrote:
> > > > >
> > > > > > Also, I heard python is more simpler and more powerful than
> > Perl. Is
> > > > > > it true?
> > > > >
> > > > > Apples and Oranges -which is the best fruit?
> > > > > I'd argue that for general scripting purposes then Perl is
the most
> > > > > powerful scripting language there is, but if you are designing a
> > large
> > > > > user application then maybe it isn't appropriate.
> > > > >
> > > > > > I would appreciate if anyone would give me some explaination.
> > > > >
> > > > > Try googling - there is tons of stuff out there.
> > > > >
> > > > > For many simple purposes your best scripting language is
just sh.
> > > > >
> > > > > As an example I've attached a simple shell script that acts as
> > > > > a web browser. I call it webserv.sh
> > > > >
> > > > > Install the shell script in a directory - say /usr/bin
> > > > > make sure it is executable
> > > > >
> > > > > chmod 755 /usr/bin/webserv.sh
> > > > >
> > > > > edit /etc/inetd.conf and add a line like.....
> > > > >
> > > > > webcache stream tcp nowait root /usr/bin/webserv.sh webserv.sh
> > > > >
> > > > > then find the process number of your inetd process
> > > > >
> > > > > ps | grep inetd
> > > > >
> > > > > 333 root 596 S /usr/sbin/inetd
> > > > > 4560 arm 428 S grep inetd
> > > > >
> > > > > Then send the inetd process a HUP signal make it reread the
> > config file
> > > > >
> > > > > kill -HUP 333
> > > > >
> > > > > Then you should have a "webserver" listening on the webcache
> > port (8080)
> > > > >
> > > > > assuming your ts7200 has the address 192.168.0.50, point a web
> > browser
> > > > > at
> > > > >
> > > > > http://192.168.0.50:8080/hello
> > > > >
> > > > > a simple fixed hello page
> > > > >
> > > > > http://192.168.0.50:8080/usage
> > > > >
> > > > > an example of executing commands and use of refresh
> > > > >
> > > > > http://192.168.0.50:8080/fred
> > > > >
> > > > > example of a 404 simple page for a non existant page
> > > > >
> > > > > http://192.168.0.50:8080/jj
> > > > >
> > > > > an example of a redirect - if you browser has internet access,
> > you'll
> > > > > end up at my webpage :-)
> > > > >
> > > > >
> > > > > The script is only 100 odd lines and is very easy to follow
and to
> > > > > customise for your own usage.
> > > > >
> > > > > Who needs apache :-)
> > > > >
> > > > > Jim
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU