> > I have posted the first release candidate (rc1) of Dachstein on my website: > > http://lrp.steinkuehler.net/DiskImages/Dachstein.htm > > > > Just today, I made a large number of changes in the weblet pages, finally > > I wish to raise a simple question. But first let me tell you that I did > not even look at the new weblet. > > I use the weblet access to fetch files from the fw, not for visual > display but for automatic manipulation. > > I always wanted a mode where the data comes down the wire with the > absolute minimal added html. > > Can we add such a mode? Maybe a request flag that defines the level of > visualization one wants? This flag can be stripped up front, then the > request > processed normally, and these scripts that want to use it can refer to > it through, say, some environment variable that was set upfront.
Well, there are a couple of things you might be asking for, and both are pretty easy. If you would like access to files on the server, you can simply configure weblet to serve up any file in the filesystem, and download anything you're interested with a web browser or something like http-get. If you want some of the status information made available via the cgi scripts, you can pretty easily modify the scripts to return NO HTML formatting. Simply change the mime-type returned by the cgi-script to text/plain instead of text/html, and remove the HTML formatting from the cgi script. You can either replace the existing cgi scripts with your new versions, or give them a different name so you can access either version. As an example, here is the original viewmasq cgi script: #!/bin/sh cat <<- /HTML-DATA Content-type: text/html <HTML><HEAD><TITLE>${0##*/}</TITLE></HEAD> <BODY background="/images/lrpbkg.gif"> <H1>LRP Firewall</H1> <H2>Masqueraded and Other Connections</H2> <H3>$(date)</H3> <H3>Masqueraded Connections:</H3> <PRE> $(/bin/netstat -Mn) </PRE> <H3>Other Connections:</H3> <PRE> $(/bin/netstat -n) </PRE> </BODY></HTML> /HTML-DATA To convert the entire thing to plain text, simply strip the HTML tags out, and change the content-type header: #!/bin/sh cat <<- /HTML-DATA Content-type: text/plain $(date) Masqueraded Connections: $(/bin/netstat -Mn) Other Connections: $(/bin/netstat -n) /HTML-DATA Of course, you can provide text seperators, whitespace, and other formatting as required if you need to easily parse the data on the far end. Charles Steinkuehler http://lrp.steinkuehler.net http://c0wz.steinkuehler.net (lrp.c0wz.com mirror) _______________________________________________ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel