I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / 3Com Audrey
Slinger webserver fun
How to browse Audrey from your PC!

New MessageSlinger webserver fun (modified 0 times) Deviant
Profile
Sowbug mentioned slinger on his website, with a reference to the description:
http://qdn.qnx.com/support/docs/tcpip50/user_guide/utils/slinger_util.html

Now, the parameter -i is used on the Audrey to limit it to talking to 127.1 (localhost). Simply remove that parameter from the slinger line in /config/rm-apps, and you can access Audrey from your PC.

cd /config
vi rm-apps
(I recommend making a backup first)
(about the 14th line is: rb,/kojak/kojak-slinger, -c -e -s -i 127.1)
(deleting the "-i 127.1" will allow it to respond to ANY request) (x under VI deletes character under cursor)
:wq
shutdown or unplug Audrey for a clean start
Voila! You can browse it using its IP address (obtainable under Audrey Options About profile)

Example using my Audrey:
http://192.168.1.122/Channels/.Channel00/.template/index.shtml
yields the Audrey "home" page! (and correctly, if you shrink your window to Audrey's size.)

You can likewise run cgi from here, so:
http://localhost/cgi-bin/GetSystemValue?kcrontab
becomes
http://192.168.1.122/cgi-bin/GetSystemValue?kcrontab
and yields the same info you would have gotten from Audrey, using her crappy little keyboard.
(of course, type in your own IP address instead of 192.168.1.122)

Have fun! Please post improvements to this technique.

-Deviant

08-15-2001 09:23:28

New MessageRE:Slinger webserver fun (modified 0 times) zebylong
Profile
Fabulous work!!!!
I don't have the audrey with me at the moment....does this mean we can use the shellex.shtml, run a
xserver in windows (like W-win32) and possibly get the pterm to pop up (in Win32/Linux etc...)?
I'd love it if someone could try this...I'm stuck at work until 7.
08-15-2001 10:04:52

New MessageRE:Slinger webserver fun (modified 0 times) Sowbug
Profile
Deviant, good tip. I've been using this method for a couple of weeks now (got a new mobo in the mail today from an angel so I'll be hacking again tonight!) and, as you surely agree, it's a heck of a lot more fun to explore in the browser using a full-size wired keyboard. I have my home LAN behind a firewall, though -- I wouldn't leave a poor Audrey exposed to the world like that.

(Just so everyone understands exactly what we're talking about here, this allows another PC to send HTTP requests to the Audrey's built-in web server, meaning that the PC can run the Audrey's CGI binaries and view its channel content. It's not a telnet server, VNC server, or X client, so you can't do any RPCs or open terminals on the other PC.)

08-15-2001 12:25:36

New MessageRE:Slinger webserver fun (modified 0 times) rseidl
Profile
But using the shtml/cgi-bin, you could execute pretty much anything on the Audrey by asking for a particular URL, correct ?

For example, lets say I have a HomeSeer home control program and a control panel on the Audrey that displays the current state of various devices (lights, audio etc.) around the house.

I can update the control panel periodically using a META refresh tag (but most of the time, status data is going to be out of date anyway)

OR

I could have homeseer do a hs.GetURL( "http://192.168.1.191/refreshbrowser.shtml" ) or something like that where refreshbrowser.shtml somehow triggers the browser on the Audrey to refresh.

That way instead of polling, I am pushing data to her and the display will be up to date always.
Thoughts ?
Also, how would the refresh idea actually be implemented - is there some way to send a message for that to the kojak browser ?

Thanks


Robert
http://www.canoma.com/audrey
http://www.canoma.com/audrey/controlpanels
09-21-2001 12:09:03

New MessageRE:Slinger webserver fun (modified 0 times) GrendelT
Profile
Deviant, nice find...
Can't wait to try it out this weekend!!!
"If you know what you're doing, you're not learning anything."
09-21-2001 12:28:57

New MessageRE:Slinger webserver fun (modified 0 times) bholio
Profile
What I'm trying to do is to the run 'gpio' command to remotely shut off or turn on Audrey's display (so it's not on all night for no reason). It seems straightforward, but it's just not happening. My guess is that the server is not running as root (or maybe the programs it's kicking off don't run as root).

I copied shell.shtml, and replaced the 'shellex $QUERY_STRING' with 'shellex gpio etc..' The screen does not shut off. I am able to make some command run (like ls), and return output to the browser, but this gpio is a no go. (I don't have the Audrey handy right now, and don't know the gpio parms off the top of my head.)

I also tried running a shell script from the CGI directory. Didn't work.

Any ideas?

Thanks

09-24-2001 09:54:59

New MessageRE:Slinger webserver fun (modified 0 times) jayklm
Profile
gpio needs to be ran as root. set the sticky bit for gpio:
chmod a+s /kojak/gpio

and set up another shtml file in /data/XML/gpio.shtml :

<html><head><title>Shell</title></head><body>
<!--#exec cmd="/kojak/gpio -a 0x40010004 -b6 -m3 -s$QUERY_STRING" -->
</body></html>

turn off:
http://audrey_ip/gpio.shtml?0

turn back on:
http://audrey_ip/gpio.shtml?3

09-24-2001 15:52:57

New MessageRE:Slinger webserver fun (modified 0 times) bholio
Profile
jaklm,
Thanks for the solution. I figured it out but a bit differently. I made a copy of shellex (CGI), called it shellexAsRoot and chmod a+s shellExAsRoot. I then created scrOff & scrOn.shtml:

<html><head><title>Shell</title></head><body>
<!--#exec cmd="shellExAsRoot gpio -a 0x40010004 -b6 -m3 -s0" -->
</body></html>

scrOn is the same with -s3 instead of -s0.

09-24-2001 18:33:14

New MessageRE:Slinger webserver fun (modified 0 times) jayklm
Profile
haha hmm lets turn off other people's audreys remotely haha now that would be fun..
09-24-2001 18:56:54

New MessageRE:Slinger webserver fun (modified 0 times) smee
Profile
Removing the -i 127.1 parameter from the slinger command line opens it up to everybody. If you have a local network and change this to something like -i 192.168 then it's only open to machines on that network. However, it's no longer open to the Audrey - you don't get the normal startup screen, etc.

Is there any way to specify both? Or, is this an order of execution thing? That is, is slinger being started before Audrey knows what its IP is?

I'm not too concerned with security, since everything is behind a firewall, but I like the idea of restricting things when possible.

09-26-2001 08:16:32

New MessageRE:Slinger webserver fun (modified 1 times) keith721
Profile
smee:

127.0. is just the standard IP 'localhost' domain, defined by default on just about every UN*X system. if you change it to 192.168, and your audrey is using DHCP from your own LinkSys/NetGear/3Com router, you should just probably create an /etc/hosts file, or edit the resolv.conf file (i can't remember where it is...) to assign "localhost 192.168.xxx.yyy" you should be okay.

i'll try this out, when i get home, tonight...

[a later thought] it may be possible to use multiple "-i IP" assignments. i'll have to review the slinger page, and see if we can do "-i 127.0 -i 192.168" as well.

keith721

09-26-2001 09:20:13

New MessageRE:Slinger webserver fun (modified 0 times) rshah
Profile
Just to be clear.
If you are running audrey on a local network with a 192.168.xxx.yyy address, then your audrey is unreachable from outside your network, such as the Internet. This is because the 192.168.xxx.yyy addresses are reserved for private use and not for public Internet use.
So there is no reason to add the -i 192.168 since it really isn't adding any security. The security is in using a 192.168.xxx.yyy address which is unreachable from an outside network such as the Internet.

Does this sound right

I am not expert
Rajiv

09-26-2001 10:02:48

New MessageRE:Slinger webserver fun (modified 0 times) DavisD
Profile
No matter what I do everytime I try and run "gpio" it just comes back with "Not Root"
I'm in a root shell (prompt is #)
and have done "chmod a+s /kojak/gpio"

I have done the software update to 1.02.08.01 FINAL, 4/23/2001 + SHELL
but have done no other system software modifications.

What trick am I missing?

09-27-2001 12:58:23

New MessageRE:Slinger webserver fun (modified 0 times) keith721
Profile
DavisD:

When you set the 's'uid bit in your protections, that means the gpio executable runs as if it were the same uid,gid as the owner of the executable file. If your copy of gpio isn't owned by root, that would explain it. Try this:

1. get a root shell prompt from the Actions panel
2. type in this command:
# ls -alg -d /kojak/gpio
3. you should see this:
-rwxrwxrwx 1 500 14468 Dec 07 2000 /kojak/gpio

The '1 500' is the unprivileged user 'nobody'. If you set the suid bit, even when root, it will run as if you're nobody. You have two options:
a) remove the suid bit from the protection
b) change the owner from '1 500' (nobody) to '1 0' (root).

Since the 'chown' command isn't normally present on the audrey, i recommend choice (a), using these commands:

# cd /kojak
# chmod 777 gpio

good luck!!
keith721

09-27-2001 15:36:17

New MessageRE:Slinger webserver fun (modified 0 times) DavisD
Profile
Keith721,

You technique did allow me to issue the gpio command from Audreys root shell but it did not work using a remote machine and the URL technique described above.

To get it to work I did have to make gpio be owned by root.
All I did was get the root shell, made a copy of gpio as gpiotemp, deleted gpio and renamed gpiotemp back to gpio.
Now gpio is owned by root and not "nobody"
Then did the chmod a+s on the new gpio command and all works great now.

Thanks for the direction to this solution.

09-28-2001 08:38:08

New MessageRE:Slinger webserver fun (modified 0 times) keith721
Profile
DavisD: glad to be of some help. since the browser runs as a non-privileged user, it makes sense that you would have to change gpio's ownership to root, as well as set the suid bit in the protections. happy hacking... keith721
09-28-2001 10:39:48

New MessageRE:Slinger webserver fun (modified 0 times) Vermifuge
Profile | Email
This info might be a bit out of date. but i think I noticed th ip for localhost set int he Audry host file. could you not just change this ip to force the audry to use 192.168.x.x ?
01-31-2002 01:22:07

New MessageRE:Slinger webserver fun (modified 0 times) Vermifuge
Profile | Email
Deviant, or if you know

Any idea what the default web page is for Slinger or how i can set a default page? IE i would like an index / defauly page when i got to the ip 192.168.xxx.xxx. Any help would be apreciated.

-V

02-02-2002 04:22:13

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3