Skip to content

Instantly share code, notes, and snippets.

@hubgit
hubgit / README.md
Last active May 2, 2024 10:55
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@q3k
q3k / hashes.txt
Last active April 14, 2024 17:11
liblzma backdoor strings extracted from 5.6.1 (from a built-in trie)
0810 b' from '
0678 b' ssh2'
00d8 b'%.48s:%.48s():%d (pid=%ld)\x00'
0708 b'%s'
0108 b'/usr/sbin/sshd\x00'
0870 b'Accepted password for '
01a0 b'Accepted publickey for '
0c40 b'BN_bin2bn\x00'
06d0 b'BN_bn2bin\x00'
0958 b'BN_dup\x00'
@ShadowJonathan
ShadowJonathan / fix_accounts.py
Last active August 1, 2023 14:01
Fix Mastodon Domain Block Lift Glitch
from mastodon import Mastodon
# Create an application, and fill in these parameters with that.
# You should at least have the following permissions;
# - read
# - admin:read
# - admin:read:accounts
# - admin:write
# - admin:write:accounts
mastodon = Mastodon(
@gnremy
gnremy / CVE-2021-44228_IPs.csv
Last active April 26, 2023 07:01
CVE-2021-44228 Apache Log4j RCE Attempts Dec 20th 9:27PM ET
ip tag_name
162.155.56.106 Apache Log4j RCE Attempt
223.111.180.119 Apache Log4j RCE Attempt
213.142.150.93 Apache Log4j RCE Attempt
211.154.194.21 Apache Log4j RCE Attempt
210.6.176.90 Apache Log4j RCE Attempt
199.244.51.112 Apache Log4j RCE Attempt
199.101.171.39 Apache Log4j RCE Attempt
197.246.175.186 Apache Log4j RCE Attempt
196.196.150.38 Apache Log4j RCE Attempt
@hartsick
hartsick / masto-guide-for-friends.md
Last active April 6, 2023 19:39
My tips for friends thinking of joining Mastodon

A guide for friends considering Mastodon

A lot of my friends have recently been considering leaving Twitter for other networks, and many are considering Mastodon. There are many guides floating about that can tell you about Mastodon and the Fediverse, which is really exciting! It can be overwhelming to sort through them all, though, and honestly I haven't read them since I know my way around.

So, this is the blog version of me sitting down with a friend explaining what I know about Mastodon and how I'd recommend approaching setting up an account there for the first time and getting oriented.

What's in this:

  1. What is the Fediverse / Mastodon?
  2. Why would I want to join?
  3. Where do I start?
@eloquence
eloquence / gist:8750334
Last active December 27, 2022 20:38
Links for Wikimania talk 2014

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

'''
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@lucahammer
lucahammer / mastodon-hashtag-network.py
Last active April 17, 2022 06:15
Python script to generate a GDF for Gephi to visualize the Mastodon Hashtag Network https://vis.social/web/statuses/100634263439065513
from multiprocessing import Pool
import requests
import datetime
import time
MAX_PROCESSES = 100 #number of python processes that can run in parallel
TOOTS_PER_INSTANCE = 4000 #multiples of 40
MASTOVERSE = ["mstdn.jp","pawoo.net","friends.nico","mastodon.social","mimumedon.com"] #instances you want to examine
def get_local_timeline(instance_url, count=80):
@moorepants
moorepants / test_upload_tagged_photos.py
Created August 19, 2013 02:21
Image uploader for localwikis.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from upload_tagged_photos import ImageUploader
def TestUploadWiki():
url = "http://clevelandwiki.org/api/"
user_name = raw_input("What is your username?")
api_key = getpassword("What is your api_key?")