Well, I tried the telnet hack described in http://wl500g.info/archive/index.php/t-7313.html but I actually get the contents of the file displayed. Do I need to do anything to get cgi support going?
Hacksaw.
This is good. There are several general approaches to attempt.I have access to the router through the web interface
1) you might try to enable telnet access back through web-interface. As to my experience, even when I had invalid shell, and ssh login was failing, I still was able to login through telnet. Possibly if it detects wrong shell it substitutes it for the default.
2) try if the following page is available: http://192.168.1.1/Main_AdmStatus_Content.asp
if yes, it will let you enter commands and see result.
3) you might try to copy full flashfs content as single tar.gz file from System Setup -> Flashfs Management then edit it and return back
P.S. I have to admit that I'm more familiar with fw from Oleg for 500-series of asuses. The above suggestions are general and non-destructive. /etc/shells has to contain list of shells (that's correct, because this comes from unix world). However, /usr/local/.files might happen to be Oleg-specific. Check it.
Last edited by al37919; 19-04-2007 at 18:56.
Well, I tried the telnet hack described in http://wl500g.info/archive/index.php/t-7313.html but I actually get the contents of the file displayed. Do I need to do anything to get cgi support going?
Hacksaw.
unfortunately your firmware seems to be different from my one.
Again, just a couple of general guesses.
May be cgi file permissions should be made executable
Executable file is sensitive to the type of the end of line character. In windows it is CR+LF, in unix it should be LF only. If the first line (#!/bin/sh) has wrong end-of-line character(s), it is enough to make it non-executable.
I suggest to try the following: if there is another cgi file there take it, edit it (with minimum changes, and while not touching the header), and write back (may be with different name, may be with the same). If you do this in unix, I think 95% it will work, in windows file permissions might be lost, but EOL should be preserved.
P.S. There is another discussion (not very prolific though here) http://wl500g.info/archive/index.php/t-6521.html (see post #3 from top)
I figured that out and changed the permissions to make is executable. Unfortunately, the web server is now returning a totally unusable error message.
I used VIM to create the file, but I will check again to make sure.
I tried renaming an existing one to telnet.cgi to see if it would work but I get an error. I will try a few other things.
If I flash the original ASUS firmware will it clear the changes I made? If so I can then try to upgrade again...
Thank you for the help!
Hacksaw.
I managed to get telnet running again by editing an existing cgi to invoke it.
Thanks for the help!
Hacksaw.