<span>The website at https://cthulhu.fluxfingers.net/challenges/4allows you to download a pdf file. It contains an attachment named pdf10000.pdf. </span>
Attachment pdf10000.pdf contains another attachment namedpdf9999.pdf; pdf9999.pdf contains pdf9998.pdf and so on...
<span>With this behavior in mind, we can write a script toautomate the extraction process. The assumption is that pdf0.pdf might contain the flag.</span>----------------------------------------------------------------------------------------------------<span>#Environment: Linux#https://cthulhu.fluxfingers.net/static/chals/simplepdf_f8004a3ad0acde31c40267b9856e63fc.pdf#Extract pdf10000.pdf and use the scriptfrom subprocess import callctr = 10000pdfname = "pdf10000.pdf"while ctr > 0:    call(["pdfdetach", "-saveall", pdfname]) #for more info http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=pdfdetach&sect=1   ctr -= 1   pdfname = "pdf" + str(ctr) + ".pdf"</span>----------------------------------------------------------------------------------------------------From the script above, pdf0.pdf was extracted. It containsstart.pdf which contains the flag.
<span>The flag is flag{pdf_packing_is_fun}</span>