Difference between revisions of "Phpshell"

From ElphelWiki
Jump to: navigation, search
(phpshell)
Line 17: Line 17:
 
But sometimes it may happen that you do not have access to telnet program (on your cell phone?), in that case you may use [http://mgeisler.net/php-shell/ PHP Shell] program that is installed in the camera and have command access to the camera through the web browser. With the same camera IP of 192.168.0.9 it will be just opening the url
 
But sometimes it may happen that you do not have access to telnet program (on your cell phone?), in that case you may use [http://mgeisler.net/php-shell/ PHP Shell] program that is installed in the camera and have command access to the camera through the web browser. With the same camera IP of 192.168.0.9 it will be just opening the url
 
  http://192.168.0.9/phpshell.php
 
  http://192.168.0.9/phpshell.php
 +
Can be opened with a shell command, examples:
 +
http://192.168.0.9/phpshell.php?command=ls -a /etc
 +
http://192.168.0.9/phpshell.php?command=ifconfig
  
 
=== editing files with editcgi.cgi ===
 
=== editing files with editcgi.cgi ===
 
In the case that you just need to edit some configuration file in the camera you may use a simple web-based text editor, provided by Axis as a part of their SDK. The following line will open the directory with some camera configuration files that you can edit:
 
In the case that you just need to edit some configuration file in the camera you may use a simple web-based text editor, provided by Axis as a part of their SDK. The following line will open the directory with some camera configuration files that you can edit:
 
  http://192.168.0.9/admin-bin/editcgi.cgi?file=/etc/conf.d
 
  http://192.168.0.9/admin-bin/editcgi.cgi?file=/etc/conf.d

Revision as of 13:11, 12 April 2012

Using PhpShell in the Elphel 353 series cameras

Sometimes you need to enter some commands in the camera shell, normally it is done through telnet: With default camera ip of 192.168.0.9 it will look like:

telnet

andrey@host:~$ telnet 192.168.0.9
Trying 192.168.0.9...
Connected to 192.168.0.9.
Escape character is '^]'.
Elphel353 login: root
Password: <pass>
[root@Elphel353 /]1012#

And now you may enter commands that camera will listen to You may try

dmesg

phpshell

But sometimes it may happen that you do not have access to telnet program (on your cell phone?), in that case you may use PHP Shell program that is installed in the camera and have command access to the camera through the web browser. With the same camera IP of 192.168.0.9 it will be just opening the url

http://192.168.0.9/phpshell.php

Can be opened with a shell command, examples:

http://192.168.0.9/phpshell.php?command=ls -a /etc
http://192.168.0.9/phpshell.php?command=ifconfig

editing files with editcgi.cgi

In the case that you just need to edit some configuration file in the camera you may use a simple web-based text editor, provided by Axis as a part of their SDK. The following line will open the directory with some camera configuration files that you can edit:

http://192.168.0.9/admin-bin/editcgi.cgi?file=/etc/conf.d