If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This guide assumes that you have already set up a Ubiquiti Unifi VPN following the guide: | |
https://help.ubnt.com/hc/en-us/articles/115005445768-UniFi-L2TP-Remote-Access-VPN-with-USG-as-RADIUS-Server | |
To configure a Linux machine to be able to connect remotely I followed these steps. This guide was written for Debian 8. | |
- In Debian install the "xl2tpd" and "strongswan" packages. | |
- Edit /etc/ipsec.conf to add the connection: | |
conn YOURVPNCONNECTIONNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Call with python CleanBinaryStrings.py <binaryName> | |
# Will edit the binary in place | |
import struct | |
import sys | |
import mmap | |
import string | |
import binascii | |
import hashlib | |
import subprocess |