🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Secure File Uploads: all 10 questions

Quiz: Secure File Uploads · Question 5 of 10

What does this print? (code)

What does this print?

data = b"<?php echo 1; ?>"
print(data.startswith(b"\x89PNG"), data.startswith(b"<?php"))
  1. A.True False
  2. B.True True
  3. C.False False
  4. D.False True
Answer & explanation

Correct answer: False True

The file claims to be a PNG but its content starts like a PHP script.

Can you get the rest right without peeking?

Take the timed Quiz: Secure File Uploads quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →