Skip to content

Instantly share code, notes, and snippets.

Frieder Steinmetz willnix

Block or report user

Report or block willnix

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
@willnix
willnix / hashUnencodedChars.py
Created Jul 4, 2019
Python version of hashUnencodedChars
View hashUnencodedChars.py
#!/usr/bin/env python3
import hashlib
def hash_unencoded_chars(s: str) -> hashlib.sha256:
""" hash_unencoded_chars - emulates com.google.common.hash.Hashing.sha256().hashUnencodedChars(s)
Google's java library guava comes with the hashUnencodedChars function
which yields different results than most other language's hashing functions.
This function should be compatible.
"""
@willnix
willnix / custom_ftp.py
Created May 17, 2019
Simple FTP server that accepts any credentials and logs the to stdout
View custom_ftp.py
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.log import logger
HOMEDIR = "/var/ftp"
# Authorizer granting access to everyone and logging the credentials
class LoggingAuthorizer(DummyAuthorizer):
def validate_authentication(self, username, password, handler):
@willnix
willnix / custom_http.py
Last active May 17, 2019
Slightly customized Python 3 HTTP Server
View custom_http.py
#!/usr/bin/env python3
from http.server import SimpleHTTPRequestHandler, HTTPServer
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_GET(self):
'''
Print request and call SimpleHTTPRequestHandler.do_GET()
to serve static files
'''
print(">"+"-"*40+"<")
View blurma.js
// ==UserScript==
// @name BlurMa
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Blur latest Threema message preview
// @author Frieder Steinmetz
// @match https://web.threema.ch/*
// @grant none
// ==/UserScript==
@willnix
willnix / zombies2gpx.go
Last active Apr 22, 2016
Converts the JSON format used by "Zombies Run!" to GPX which can be imported in Runtastic.
View zombies2gpx.go
package main
import (
"fmt"
"os"
"time"
"encoding/json"
"encoding/xml"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am willnix on github.
  • I am willnix (https://keybase.io/willnix) on keybase.
  • I have a public key whose fingerprint is 5684 C0D8 2CBA 23F8 6586 46EA 9A53 2500 B675 2867

To claim this, I am signing this object:

View vortex0.go
package main
import (
"bufio"
"encoding/binary"
"fmt"
"log"
)
type num [4]uint32
@willnix
willnix / Semtex5.go
Last active Aug 29, 2019
Semtex5 - Using TOR and its control signal NEWNYM to establish 10 connections from different IP addresses
View Semtex5.go
package main
import (
"fmt"
"github.com/hailiang/gosocks"
"io"
"net"
"os"
"strings"
"time"
View gist:5225036
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"strings"
"sort"
@willnix
willnix / GmusicDL
Created Aug 6, 2011
GMusic Download
View GmusicDL
#!/usr/bin/env python
import sys,re,time,os
import urllib,urllib2,cookielib
import xml.dom.minidom
from ID3 import *
try:
import json
except ImportError,e:
You can’t perform that action at this time.