Executing Commands through Http
Executing Commands through Http
I've got my hub rooted and have played around with aprontest, but I was wondering if it is possible to get the set_dev_value.php interface back?
Re: Executing Commands through Http
I expanded the 00.01 firmware update partition and extracted the php file... you should be able to just copy/paste it back...
/var/www/set_dev_value.php
tested...
/var/www/set_dev_value.php
Code: Select all
<?php
$nodeId = $_POST['nodeId'];
$attrId = $_POST['attrId'];
$v = $_POST['value'];
//$who = exec('whoami');
//echo $who;
//passthru("sudo ls", $retval);
//echo "nodeId=" .$nodeId . " attrId=" . $attrId . " value=" . $v;
$cmd = 'sudo ' . dirname(__FILE__) . '/php2apron set_value ' . $nodeId . " " . $attrId . " " . $v;
//echo $cmd . " ";
passthru($cmd, $retval);
echo "ret_code=" . $retval;
?>
tested...
Code: Select all
curl "http://192.168.41.38/set_dev_value.php" -d "nodeId=a&attrId=;uname -n;"
flex-dvt
Re: Executing Commands through Http
and in case anyone wants to do the same in the future...
I did mine on CentOS 6
installed mtd-utils-ubi-1.5.0-2.el6.nux.x86_64.rpm
I did mine on CentOS 6
installed mtd-utils-ubi-1.5.0-2.el6.nux.x86_64.rpm
Code: Select all
modprobe mtdblock
modprobe ubi
modprobe nandsim first_id_byte=0x01 second_id_byte=0xf1 third_id_byte=0x00 fourth_id_byte=0x1d
dd if=app-rootfs.ubi of=/dev/mtdblock0 bs=2048
yum install ./mtd-utils-ubi-1.5.0-2.el6.nux.x86_64.rpm
ubiattach /dev/ubi_ctrl -m 0 -O 2048
mkdir /media/ubifs
mount -t ubifs ubi0_0 /media/ubifs
Return to “Help me, I can't do xyz”
Who is online
Users browsing this forum: No registered users and 0 guests