Skills101
← All practice quizzes

Quiz: Secure File Uploads

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Upload forms let strangers put files on your server. Learn how attackers abuse them with web shells, double extensions, fake content types, SVG scripts and huge files, and build an upload check in Python that stops them.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Why is checking only the Content-Type header of an upload not safe?

  2. Question 2

    What is a web shell?

  3. Question 3

    What does this print?

    name = "photo.jpg.php"
    print(name.split(".")[1], name.rsplit(".", 1)[-1])
    
  4. Question 4

    What are magic bytes?

  5. Question 5

    What does this print?

    data = b"<?php echo 1; ?>"
    print(data.startswith(b"\x89PNG"), data.startswith(b"<?php"))
    
🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →