Difference between revisions of "Phpshell"

From ElphelWiki
Jump to: navigation, search
(phpshell)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
Sometimes you need to enter some commands in the camera shell, normally it is done through telnet:
 
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:
 
With default camera ip of 192.168.0.9 it will look like:
 
+
=== telnet ===
 
  andrey@host:~$ telnet 192.168.0.9
 
  andrey@host:~$ telnet 192.168.0.9
 
  Trying 192.168.0.9...
 
  Trying 192.168.0.9...
Line 11: Line 11:
 
  Password: <pass>
 
  Password: <pass>
 
  [root@Elphel353 /]1012#
 
  [root@Elphel353 /]1012#
And now you may enter commands that camera will listen too.
+
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 [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:81/phpshell.php
+
  http://192.168.0.9/phpshell.php
 +
Can be opened with a shell command executed, examples:
 +
http://192.168.0.9/phpshell.php?command=ls -a /etc
 +
http://192.168.0.9/phpshell.php?command=ifconfig
  
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 the part of their SDK. The following line will open the directory with some camera configuration files that you can edit:
+
=== editing files with editcgi.cgi ===
  http://192.168.0.9:81/admin-bin/editcgi.cgi?file=/etc/conf.d
+
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

Latest revision as of 12:13, 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 executed, 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