Skip to content

Instantly share code, notes, and snippets.


  • Germany
Block or report user

Report or block sfan5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sfan5 /
Last active Dec 11, 2015
Crawls the Minetest forum mod releases section
import urllib, urllib2, re
from xml.dom import minidom
# Made by sfan5 2013 v0.4.09.3
V = ""
# this script runs through the 'Mod Releases' section and checks the topics for missing things
# Also displays Statistics
# Can also reply to topics when valid session cookies are provided
# Can also move faulty topics to another forum
## <Settings>
sfan5 / netfifo.c
Last active Dec 16, 2015
Creates two FIFO files that are piped to a network connection.
View netfifo.c
/* NetFIFO
* Creates two FIFO files that are piped to a network connection.
* Made by sfan5
* License: CC-BY-SA v3
* Example Usage:
* netfifo tcp 80 ififo ofifo &
* echo -e "GET / HTTP/1.1 \r\n" > ififo
* cat ofifo
sfan5 /
Last active Dec 16, 2015
A SOCKS 5 proxy server
#!/usr/bin/env python2
# SOCKS 5 server
# -*- coding: utf-8 -*-
import socket, struct, time, select, os
from thread import start_new_thread, allocate_lock
# Address to listen on
HOST = ""
# Port to listen on
PORT = 12345
sfan5 /
Created Jun 7, 2013
Reads a .png file and outputs its sections
#!/usr/bin/env python2
import sys, binascii, struct
def islower(c):
return (c.upper() != c)
def countin(s, c):
i = 0
for b in s:
if b == c:
i += 1
return i
sfan5 /
Last active Dec 18, 2015
Finds (sub)domanins that belong to some list of domains, by resolving them to an IP and reverse-resolving them to a domain name again.
dig &> /dev/null || (echo "Install dnsutils"; exit 1)
(echo | grep -oP ".*" &> /dev/null) || (echo "Install grep that supports perl regexes"; exit 1)
(echo | awk -e '{}' &> /dev/null) || (echo "Install awk"; exit 1)
host &> /dev/null || (echo "Install bind9-host"; exit 1)
[ -f inlist.txt ] || (echo "inlist.txt needs to exist"; exit 1) # inlist.txt contains a list of domains
for subdmn in `cat inlist.txt`; do
echo "> ${subdmn}..."
sfan5 / xteapipe.c
Last active Dec 19, 2015
De/Encrypts from stdin to stdout using XTEA in OFB mode
View xteapipe.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
void xtea_encrypt(unsigned int num_rounds, uint32_t v[2], uint32_t const key[4]) {
unsigned int i;
uint32_t v0=v[0], v1=v[1], sum=0, delta=0x9E3779B9;
for (i=0; i < num_rounds; i++) {
v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + key[sum & 3]);
sfan5 /
Last active Dec 20, 2015 — forked from arsdragonfly/
Resolves the PlayerArgsEnd missing problem(prints the filenames that have it missing)
# Put this into (worldname)/players folder and execute it
find . -type f -not -name "*.sh" | xargs grep -iL PlayerArgsEnd
sfan5 /
Last active Feb 8, 2018
Collects media files from mods/games and puts them in a media directory, also creates an index.mth file in the MTHS format
###### Options ######
# When settings this up be aware that the Minetest client
sfan5 / README
Last active Dec 26, 2015
Minetest Forum statistics
Missing Things:
* jquery.min.js ( )
* highstock.js ( )
* A cronjob for executing
* A webserver with PHP [with SQLite3]
sfan5 /
Last active Dec 27, 2015
Binary Clock using PyGame; Shows month, day, hour, minute and second
import pygame, time
from pygame.locals import *
OFFCOLOR = (25,25,25)
ONCOLOR = (42,65,89)
BGCOLOR = (36,36,36)
def rect(s, c, r): # We need to use this because it isn't drawn for some unknown reason when using pygame.draw.rect
for xx in range(r[0], r[2]):
You can’t perform that action at this time.