Skip to content

Instantly share code, notes, and snippets.

@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(
@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?
@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

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

@aborruso
aborruso / 00README.md
Last active July 29, 2019 07:59
Un albero di tweet su licenze per dati aperti e piattaforme come Wikidata, Wikipedia e OpenStreetMap https://hackmd.io/s/SkKq6eaFX
statusid,user,id
1044561432141058050,synapta,01
1045273277256671232,GiorgiaLodi,02
1046660399108689920,openantani,03
@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):
'''
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.
# Converts a JSONL file generated with telegram-history-dump (1) to CSV
# Usage: python telegram-csv.py <path to json file> <path to output csv file>
# Example: python telegram-csv.py Bob.json Bob.csv
# 1: https://github.com/tvdstaaij/telegram-history-dump
from datetime import datetime
import unicodecsv as csv
import json, sys
def get_isodate(msg):
date = msg.get("date", None)
@atdt
atdt / apc_vs_memcached.php
Last active August 29, 2015 14:27
Simple benchmark demonstrating the efficiency of APC compared to memcached. Even if the memcached instance is running on localhost, it is a separate process, and PHP has to talk with it via a socket (usually TCP, sometime UNIX). This requires executing many system calls, like select(), accept(), read(), and write(), each of which crosses the bou…
<?php
$loops = 1000;
$data = array( 'a' => 1, 'b' => 2, 'c' => 3 );
// Memcached
$cache = new Memcached();
$cache->addServer( "127.0.0.1", 11211 );
$start = microtime( true );