in reply to how to execute scripts using html
Of course it is possible. You do it using CGI. See Ovids Web Programming with Perl for an intro. You don't want to use this script but it will let you run arbitrary commands on a server through a browser using CGI. Running commands is relatively easy, making it secure is another issue entirely.
As for other options I would just ssh in using putty.exe myself, rather than spend a lot of time wrapping a web interface on it. Tools like Webmin et al provide browser based interfaces to servers and you can hack up plugins pretty easily.
#!/usr/bin/perl # install at your own risk! $|++; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); my $command = param('command'); print header, start_form({ -method=>'get' }), textfield({-size=>75,-na +me=>'command'}), submit('Run'), end_form; if ($command) { open( CMD, "$command 2>&1|" ) or die "$!: running command: '$command +'"; print "<pre>"; print escapeHTML($_,1) while<CMD>; print "</pre>\n", end_html; close CMD; }
cheers
tachyon
|
|---|