Skip to content

Instantly share code, notes, and snippets.

View JRandomSage's full-sized avatar

Joshua Harp JRandomSage

View GitHub Profile
import requests
import time
import random
import string
def auth_headers(token):
return {"Accept-Encoding": "gzip, deflate","Content-Type": "application/json","Authorization": token }
def get_auth_token(email, password):
url = 'https://discordapp.com/api/v6/auth/login'
@JRandomSage
JRandomSage / pdf_metadata.md
Created September 21, 2022 11:06 — forked from Te-k/pdf_metadata.md
How to remove metadata from PDFs

Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.

While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.

There are several options to remove PDF metadata safely:

Option 1 : Exiftool with qpdf

  • Remove metadata with exiftool : exiftool -all= some.pdf
  • Then remove ununsed objects with qpdf : qpdf --linearize some.pdf - > some.cleaned.pdf