Click to See Complete Forum and Search --> : Accessing a java function behind a .htpasswd file


GarroteYou
September 17th, 2003, 03:11 AM
Hello -

I have an EFG80 from linksys. It's an NAS (http://www.linksys.com/products/product.asp?grid=35&scid=43&prid=447) box for a home network. Every night I shut this thing down along with three other 2000 systems. I would like to be able to remotely kill all 4 devices with one click.

The windows boxes are easy (http://www.sysinternals.com/files/Pstools.zip)


psshutdown -u admin -p passwd -k -f -t 15 -m "System is going down" \\sys2
psshutdown -u admin -p passwd -k -f -t 15 -m "System is going down" \\sys1
psshutdown -k -f -t 15 "System is going down"


(psshutdown (http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml))

The EFG80 can only be shut down from within the web based administration pages installed within the unit. Anyone with a linksys or probably any number of other manufacturers router WAP etc. know what I'm talking about.

I can get to the page with the button directly:

http://192.168.1.xx/Management/setup.cgi?next_file=status.htm

The button is javascript based, <a href="javascript:action(1);">"button image"</a>

Here is the action() function:

<script language="JavaScript" type="text/javascript">
<!-- Start Script

// other functions

function action(no)
{
var cf = document.status;
if (no == 1)
cf.todo.value = "shutdown_now";
if (no == 2)
cf.todo.value = "restart_now";
cf.submit();
}

// other functions

</script>
</head>

The problem is that I must authenticate via a '.htpasswd' before running the cgi script which serves the page with my configuration.

http://192.168.1.xx/Management/setup.cgi?next_file=status.htm

I can see the '.htpasswd' file by:

http://192.168.1.xx/Management/

Which gives a listing of all the files which make up the admin web pages, I don't think they want their users poking around that folder, but there is nothing there any way.

The box runs an embedded linux dist and thttpd/2.20c. Linksys claims a shell is not available.

Is it possible to script the remote execution of the shutdown function loaded into this box?

Thanks in advance

~Dave