As you know, quite a long time some dreambox-Ah, my bitter life 🙂 Sometimes CAM module for no apparent reason and need to reboot or sometimes even the whole receiver. In General receivers have a nice web interface for the administration and everything is done through it easily, BUT (big but) it can be in gold only when I'm in the office, because I hid them behind a router is. As a rule, the only option to manage ssh ruchirawat machine, and then for receivers with telnet. Recently, however, I realized that the receivers can receive commands from an external script reflecting on cgi-bin directory. For example/cgi-bin/admin?command=restart will restart receiver. Super Yes 😉 overall Natasha hastily one php which you can use to execute commands receivers, BUT I had another problem – avtentifikacija. The web wants a user name and password – a normal thing, but it takes a lot to give if you do not was the idea to try the old method for the resolution of information representation in the url http://root:[email protected]/cgi-bin/admin?command=restart and work 🙂 here and further all is clear 🙂
function exe_command($dreambox,$command){ $result = @fsockopen("$dreambox", 80 , $errno, $errstr, 4); //check if dreambox is accessble ovear lan if($result) { echo "Command executed for $dreambox"; @fopen("http://root:[email protected]$dreambox$command","r"); do_form($dreambox); }else{ echo "Bad no access to $dreambox"; do_form($dreambox); } }
This is my main function in the control panel in particular was validitate variables and html generators.
ps Here is almost complete list commands to a receiver that supports 🙂 you can Also simulate pressing buttons, not less, with similar teams 🙂 if anyone is interested in whistle