nginx/1.18.0PHP/7.3.22

    1. <?php
    2. error_reporting(0);
    3. highlight_file(__FILE__);
    4. $url=$_POST['url'];
    5. $x=parse_url($url);
    6. if($x['scheme']==='http'||$x['scheme']==='https'){
    7. $host=$x['host'];
    8. if((strlen($host)<=3)){
    9. $ch=curl_init($url);
    10. curl_setopt($ch, CURLOPT_HEADER, 0);
    11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    12. $result=curl_exec($ch);
    13. curl_close($ch);
    14. echo ($result);
    15. }
    16. else{
    17. die('hacker');
    18. }
    19. }
    20. else{
    21. die('hacker');
    22. }
    23. ?>

    同 web255,只不过短了点
    image.png
    flag
    ctfshow{ab17efc1-3ab2-4856-b8b2-5eb05199a038}