.htaccessに以下を記述してルートに設置
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are n…
PHPからUSERADDを実行する
$id = “username”;
$passwd = crypt(“passwd”);
$cmd = “echo ‘sudoPasswd’ | sudo -S useradd -p $passwd $id”;
exec($cmd, $output);
ROOTディレクトリを表示
//ls -a /root
$cmd2 = “echo ‘sudoPasswd’ | sudo -S ls -a /root”;
exec($cmd2, $output2);
print_r($output2);
PHPからテキストファイルにテキストを追加
$cmd = “echo ‘sudoPasswd’ | sudo -S echo ‘TEXT’ >> /etc/home/FILE_NAME”;
exec($cmd, $output);
print_r($output);
graffiti on the web
この投稿へのコメント
コメントはまだありません。