Skip to content

Instantly share code, notes, and snippets.

View MaxMatti's full-sized avatar

Max Staff MaxMatti

View GitHub Profile
@MaxMatti
MaxMatti / table-to-java-code.js
Created December 15, 2015 02:12
Takes a table from clipboard and outputs java code to add a new Product in the Initializer
/*
* Dies ist eine JavaScript-Umgebung.
*
* Geben Sie etwas JavaScript ein und führen Sie einen Rechtsklick aus oder wählen Sie aus dem Ausführen-Menü:
* 1. Ausführen, um den ausgewählten Text zu evaluieren (Strg+R),
* 2. Untersuchen, um den Objekt-Inspektor auf das Resultat anzuwenden (Strg+I), oder
* 3. Anzeigen, um das Ergebnis in einem Kommentar hinter der Auswahl einzufügen. (Strg+L)
*/
if (document.getElementById("myownstuff")) {
@MaxMatti
MaxMatti / findSelfDescribingNumber.cpp
Last active January 6, 2016 04:47
Uses multithreading to guess a "self-describing-number" (which is 6210001000). To build use "g++ -O3 -march=native -std=c++11 -l stdc++ -pthread findSelfDescribingNumber.cpp"
#include <stdio.h>
#include <thread>
#include <time.h>
void checkNumbers(int offset, int threadCount);
bool checkNumber(const int numbers[10]);
bool checkDigit(const int digit, const int numbers[10]);
int main(int argc, char** argv) {
int threadCount;
@MaxMatti
MaxMatti / find_characters_in_wikipedia_definition.js
Last active October 24, 2016 14:27
This takes the definition from any wikipedia page and counts the number of special characters of the german language (ä,ö,ü,ß).
(document.getElementById("mw-content-text").children[1].textContent.match(/(ä|ö|ü|ß)/ig) || []).length;
@MaxMatti
MaxMatti / wordhoarder.py
Last active February 21, 2017 02:44
Collects multiple wordlists into one file. Should deal just fine when fed weirdly encoded input but might need longer for big files with weird encoding.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import argparse
import glob
import string
import time
from chardet.universaldetector import UniversalDetector
from sys import stderr
@MaxMatti
MaxMatti / volafile-downloader.sh
Last active October 5, 2022 01:09
Downloads files from volafile with multiple simultaneous connections.
#!/bin/bash
begintime="$(date +%s)"
OPTS=`getopt -o c:u:p:d: -l connections:,uniqueness:,parts:,destination:,useragent: -- "$@"`
if [ $? != 0 ] ; then
echo "Usage: $0 [-c <connections>] [-u <uniqueness>] [-p <parts>] [-d <destination>] [--useragent <useragent>] <path>" 1>&2
exit 1
fi
@MaxMatti
MaxMatti / aax-bruteforce.py
Created August 25, 2017 00:21
Applies bruteforce to determine an activation key used by audible to encrypt their downloadable audiobook files. Takes 4h CPU-Time on my 3.4 GHz CPU to exhaust the keyspace.
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import datetime
from hashlib import sha1
from time import sleep, time
from shutil import get_terminal_size
from threading import Thread
stop = False
@MaxMatti
MaxMatti / keybase.md
Created October 19, 2017 23:58
Keybase...

Keybase proof

I hereby claim:

  • I am maxmatti on github.
  • I am maxmatti (https://keybase.io/maxmatti) on keybase.
  • I have a public key ASCCE85H6NZ6gdXgPuuNHGHdPPB7js2EZHBglnzfpRSSoAo

To claim this, I am signing this object:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file has been created by Max Staff <max@xgme.de>. It is licensed under CC-BY-4.0: https://creativecommons.org/licenses/by/4.0/
import requests
import sys
from time import sleep
class Pr0grammCrawler():
@MaxMatti
MaxMatti / ListPriceGraphs.user.js
Last active May 27, 2023 12:16
Display the price graph in the product list of Geizhals
// ==UserScript==
// @name List Price Graphs
// @namespace https://mstaff.de
// @version 0.1
// @description Display the price graph in the product list of Geizhals
// @author You
// @match https://geizhals.de/?cat=*
// @grant GM_xmlhttpRequest
// @run-at document-idle
// ==/UserScript==
@MaxMatti
MaxMatti / WG-Viewer.user.js
Created October 10, 2020 14:41
[WIP] Creates an overlay for https://boards.4chan.org/wg/catalog to display and scroll through all posted images above a certain resolution.
// ==UserScript==
// @name WG-Viewer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description view images above a certain resolution
// @author Max Staff <max.staff@gmx.de>
// @match https://boards.4chan.org/wg/catalog
// @grant GM.xmlHttpRequest
// ==/UserScript==