Code Sample |
#!/usr/bin/perl $cmd="aumix"; @validappend=('w', 'v', 'l', 'i' ); $postcmd="aumix -q >aumix.html"; if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); } else { print "Content-Type: text/html\n\n"; print "ERROR READING FORM DATA\n\n"; exit; } foreach $pair (@pairs) { local($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<!--(.|\n)*-->//g; if ($data{$name} && $value) { $data{$name} = "$data{$name}, $value"; } elsif ($value) { push(@Field_Order,$name); $data{$name} = $value; }} $nappend=@validappend; for ($cc0=0;$cc0<=$nappend;$cc0++) { if ($data{$validappend[$cc0]}) { $cmd="$cmd \-$validappend[$cc0] $data{$validappend[$cc0]}"; } } $ti=time(); system "$cmd"; system "$postcmd"; print "location: aumix.html?$ti\n\n"; exit; |
Code Sample |
MASTER VOLUME <a href="aumix.cgi?v=1" target="plist">MUTE</a> <a href="aumix.cgi?v=-1" target="plist">-1</a> <a href="aumix.cgi?v=-3" target="plist">-3</a> <a href="aumix.cgi?v=-7" target="plist">-7</a> <a href="aumix.cgi?v=80" target="plist">80</a> <a href="aumix.cgi?v=95" target="plist">95</a> <a href="aumix.cgi?v=%2b7" target="plist">+7</a> <a href="aumix.cgi?v=%2b3" target="plist">+3</a> <a href="aumix.cgi?v=%2b1" target="plist">+1</a><br> PCM WAVE <a href="aumix.cgi?w=1" target="plist">MUTE</a> <a href="aumix.cgi?w=-1" target="plist">-1</a> <a href="aumix.cgi?w=-3" target="plist">-3</a> <a href="aumix.cgi?w=-7" target="plist">-7</a> <a href="aumix.cgi?w=35" target="plist">35</a> <a href="aumix.cgi?w=50" target="plist">50</a> <a href="aumix.cgi?w=85" target="plist">85</a> <a href="aumix.cgi?w=99" target="plist">99</a> <a href="aumix.cgi?w=%2b7" target="plist">+7</a> <a href="aumix.cgi?w=%2b3" target="plist">+3</a> <a href="aumix.cgi?w=%2b1" target="plist">+1</a><br> <a href="aumix.cgi?w=55&v=80" target="plist">low</a> <a href="aumix.cgi?w=85&v=80" target="plist">high</a> <a href="aumix.cgi?w=95&v=95" target="plist">Crank It Up!!</a> <br> |
Code Sample |
http://192.168.1.2/aumix.cgi?v=80&w=75 |
Quote |
It could probably be done through PHP to work with monkey. |
Quote |
You mean you don't have a constant ssh session with your linux box? |