kup:~# apt-get install apache Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: apache-common apache2-utils libapr1 libaprutil1 libexpat1 libpq4 libsqlite3-0 lynx mime-support ucf Suggested packages: apache-doc apache-ssl apache-perl Recommended packages: debconf-utils The following NEW packages will be installed: apache apache-common apache2-utils libapr1 libaprutil1 libexpat1 libpq4 libsqlite3-0 lynx mime-support ucf 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 4215kB of archives. After unpacking 11.3MB of additional disk space will be used. Do you want to continue [Y/n]? : : Creating config file /etc/apache/httpd.conf with new version Creating config file /etc/apache/srm.conf with new version Creating config file /etc/apache/access.conf with new version Creating config file /etc/apache/modules.conf with new version Starting apache 1.3 web server.... kup:~#
kup:~# grep cgi-bin /etc/apache/httpd.conf ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ # "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased/usr/lib/cgi-bin か。#ErrorDocument 404 /cgi-bin/missing_handler.pl # kup:~#
kup:~# ls -l /usr/lib/cgi-bin total 0 kup:~#
kup:~# ls /usr/local/lib/kuro-rs/CAUL_A bwd bwdleft bwdright fwd fwdleft fwdright left right kup:~# for i in `!!` > do > echo '#!/bin/sh' >/usr/lib/cgi-bin/$i > echo "/usr/local/bin/rs_send /usr/local/lib/kuro-rs/CAUL_A/$i" >> /usr/lib/cgi-bin/$i > chmod 755 /usr/lib/cgi-bin/$i > done kup:~# ls -l /usr/lib/cgi-bin/ total 32 -rwxr-xr-x 1 root root 67 Jul 10 20:35 bwd -rwxr-xr-x 1 root root 71 Jul 10 20:35 bwdleft -rwxr-xr-x 1 root root 72 Jul 10 20:35 bwdright -rwxr-xr-x 1 root root 67 Jul 10 20:35 fwd -rwxr-xr-x 1 root root 71 Jul 10 20:35 fwdleft -rwxr-xr-x 1 root root 72 Jul 10 20:35 fwdright -rwxr-xr-x 1 root root 68 Jul 10 20:35 left -rwxr-xr-x 1 root root 69 Jul 10 20:35 right kup:~#
HTML ファイルを作る
kup:~# vi /var/www/index.html : : kup:~# cat /var/www/index.html <html> <head> <title>CAUL</title> </head> <h1>CAUL</h1> <table><tr> <td><a href="/cgi-bin/fwdleft"><img src="/fwdleft.JPG"></a></td> <td><a href="/cgi-bin/fwd"><img src="/fwd.JPG"></a></td> <td><a href="/cgi-bin/fwdright"><img src="/fwdright.JPG"></a></td> </tr><tr> <td><a href="/cgi-bin/bwdleft"><img src="/bwdleft.JPG"></a></td> <td><a href="/cgi-bin/bwd"><img src="/bwd.JPG"></a></td> <td><a href="/cgi-bin/bwdright"><img src="/bwdright.JPG"></a></td> </tr></table> </body> </html> kup:~#
kup:~# vi makecgi.sh : : kup:~# cat makecgi.sh for i in `ls /usr/local/lib/kuro-rs/CAUL_A` do cat > /usr/lib/cgi-bin/$i <<EOF #!/bin/sh echo 'Content-type: text/html' echo '' /usr/local/bin/rs_send /usr/local/lib/kuro-rs/CAUL_A/$i > /dev/null 2>&1 cat /var/www/index.html EOF done kup:~#あんまり上手じゃないが。
スクリプトを作成するスクリプトを実行して、 スクリプトを作る
kup:~# sh makecgi.sh kup:~#
それぞれのボタンを押してみる。
ぐぅ~
チャンビー程インパクトないかなぁ、、、
|
|
← リモートステーション PC-OP-RS1(2) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-HGLシリーズファームウェア Ver.1.03 |