[OverTheWire] Natas – Level 06
http://natas6.natas.labs.overthewire.org/
Input secret…
Nhấn View sourcecode:
1 2 3 4 5 6 7 8 9 10 11 12 |
<!--?</p--> include "includes/secret.inc"; if(array_key_exists("submit", $_POST)) { if($secret == $_POST['secret']) { print "Access granted. The password for natas7 is "; } else { print "Wrong secret"; } } ?> |
Có thể thấy rằng biến $secret được dùng để so sánh, nhưng nó lại không được khai báo trong file index.php. Vậy nó sẽ nằm trong file secret.inc. Truy cập:
Ra trang trắng tinh, xem source:
<? $secret = "FOEIUWGHFEEUHOFUOIU"; ?>
Quay lại submit với secret như trên:
Access granted. The password for natas7 is 7z3hEENjQtflzgnT29q7wAvMNfZdh0i9
→ flag = 7z3hEENjQtflzgnT29q7wAvMNfZdh0i9.
Recent comments