Skip to content

Instantly share code, notes, and snippets.

View sleeyax's full-sized avatar

Sleeyax sleeyax

View GitHub Profile
@sleeyax
sleeyax / bash-colors.md
Created September 1, 2017 13:52 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@sleeyax
sleeyax / .htaccess
Last active February 19, 2019 21:50
htaccess for MVC frameworks
RewriteEngine On
# Check if request doesn't point to actual dir, file or symlink
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
# http://localhost/foo/bar => http://localhost/index.php?request=foo/bar
RewriteRule ^(.+)$ index.php?request=$1 [QSA,L]
@sleeyax
sleeyax / API.md
Created April 6, 2019 11:52 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@sleeyax
sleeyax / strawpollme.py
Created April 24, 2019 22:39
strawpoll.me voting bot
import requests
import re
import random
import sys
class StrawPoll:
def __init__(self, id):
self.url = "https://www.strawpoll.me/%s" % id
self.session = requests.session()
self.headers = {
@sleeyax
sleeyax / contributors-graph-addon.user.js
Last active May 2, 2019 15:47
Calculate additions - deletions in the contributors graph on github
// ==UserScript==
// @name Github contributors graph addon
// @author Sleeyax
// @namespace Violentmonkey Scripts
// @match https://github.com/*/graphs/contributors
// @grant none
// @inject-into content
// ==/UserScript==
var x = setInterval(function() {
@sleeyax
sleeyax / technic-platform-api.md
Last active May 15, 2019 18:58 — forked from EpicKiwi/technic-platform-api.md
Reverse engeneering of the Technic platform API

Technic platform API

This is an attempt of reverse engineer the Technic platform API with a simple Wireshark and an official laucher. This is a simple HTTP based API returning JSON.

Global parameters

URL parameter build is always required to perform a request. The value can be anything but it seems to be a build number of the lauche; maybe for tracking reasons. If this parameters is not present in URL query parameters, all requests will return 401 Unauthorized response.

@sleeyax
sleeyax / generator.py
Created May 27, 2019 16:26
Generate all possible combinations w/o itertools
# @description: generate all possible characters & combinations of a given string without using libraries
# @syntax:
# generate(string_to_array("abcdef"), 4)
# generate(['a', 'b', 'c'], 2)
def generate(chars, pos, combinations = []):
if len(combinations) == 0:
combinations = chars
@sleeyax
sleeyax / README.md
Created May 31, 2019 20:28
README.md template

Title

Subtitle, small description or quote

forthebadge

Features

@sleeyax
sleeyax / PimpMyStremio-on-Android.md
Last active March 25, 2024 19:32
PimpMyStremio on Android guide

PimpMyStremio on android

This guide teaches you how to install PimpMystremio on your android device. Please keep in mind that this is just an expirement. I strongly recommend to use PMS on your computer when possible.

You do not need root access or a high end phone to follow this guide. The only thing you need is +-2.5GB of free storage and a basic understanding of linux.

Installation

Preparation

First of all, go to the playstore and install termux (?). Temux is a terminal emulator that allows you to run basic linux commands on your android device. We will use this to install a Ubuntu chroot/proot container that will run PMS.

Secondly, go get the Hacker's Keyboard. It makes typing and navigation on termux way easier.

@sleeyax
sleeyax / README.md
Created February 29, 2020 19:39
Identifying TLS/SSL cipher suites

Identifying TLS/SSL cipher suites

A few methods to identify TLS/SSL cipher suites of a website.

nmap

nmap -Pn -p 443 --script=ssl-enum-ciphers <domain or ip>

python

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ssl_sock = ssl.wrap_socket(s,cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/ssl/certs/ca-certificates.crt')