by mlinksva · 2y ago · 0 comments
I wonder how one would measure the costs and benefits (with a focus on security) of speeding up and making more security-driven the gargantuan task of shifting to a better, well, portable document format. People are thinking big and want measurement, eg just posted https://news.ycombinator.com/item?id=39514844 WH release on memory safety https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/pre... would it not make sense to be similarly ambitious and metrics-driven for this too?
You can embed a port scanner in JavaScript inside a PDF document via /JavaScript tags.
And many high-end IDS/IPS/NDS/XNS firewalls look into PDF documents for such things like that.
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/sam...
pdftotext file.pdf - | nroff | less
pdftotext is from Poppler Developers http://poppler.freedesktop.org Glyph & Cog, LLC
nroff is a GNU common util on most linux/unix systems
(though I don't trust poppler utils to be secure)
Edit: re-reading I guess your point is that you can use tools to extract text from PDFs and then read without worry. That brings up another super annoying thing about PDFs--it's can be hard to extract text from them with high fidelity.
Or impossible with scans. Usually I take a look at the filesize as a guestimate. Anyone know better FOSS OCR tools that run from cmdline?
In practice, it's a simple JS kaboom that they didn't catch, because error handling is for n00bs