Inserts an arbitrary file as a PDF stream object, optional using a padfile which is used to XOR the original file with.

General

With this working mode you can insert an arbitrary file into a pdf. Your file will be inserted as a stream object. You may use this option to smuggle files and thereby test data leakage prevention mechanisms when it comes to getting data from inside a corporation to outside of a corporation (bringing the question of "Hey! How did you get the pdftool to run inside the corporation in the first place?"). Also you may want to test the capabilities of malware scanners by embedding malicious executeables within a pdf file.

The optional -k option provides support for XORing the embedded file, using another arbitrary file as pad. In case the padfile has the same length as the file to embed and is geniue random and known only by the sender and the receiver, congratulations. You used a one-time-pad-encryption, the only encryption proven to be unbreakable.

After embedding, you will be provided the object identifier given to the embedded file -- you might want to keep this information as it is necessary to recover the file from the PDF using the debedfile mode (see use_debedfile.html).

Examples

shell$ # pdftool embedfile -i sourcpdf.pdf -j result.pdf
testing for linearization...
first objects marker: 46
done loading file.
writing changed file to newfile.pdf
40 objects in cache... dumping to file...
 1 2 3 4 5 8 9 10 11 14 15 16 17 20 21 22 23 26 27 28 29 32 33 34 35 38 39 40 41 44 46 47 48 49 50 51 52 53 54 55
Identifier of inserted attachment is 55