Skip to content

Instantly share code, notes, and snippets.

View LevitatingBusinessMan's full-sized avatar
🕴️
Levitating

Rein Fernhout LevitatingBusinessMan

🕴️
Levitating
View GitHub Profile
@LevitatingBusinessMan
LevitatingBusinessMan / sloris.py
Created November 7, 2019 14:08
Slow Loris in Python
#! /usr/bin/python
import socket
import time
from threading import Timer
target = "127.0.0.1"
port = 80
maxSockets = 700
ka_timeout = 10
socket_timeout = 2
#! /usr/bin/python3
import sys
import requests
#import curses
import atexit
""" def reset_curses():
curses.endwin() """
@LevitatingBusinessMan
LevitatingBusinessMan / alechash.js
Created January 6, 2020 12:49
Alechash (md5 cracker)
const readline = require('readline')
const crypto = require("crypto")
//require('draftlog').into(console)
//config
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const maxLength = 10;
const rl = readline.createInterface({
input: process.stdin,
@LevitatingBusinessMan
LevitatingBusinessMan / fakeroot.patch
Created January 6, 2020 23:31
Fakeroot util-linux dependency fix (make fakeroot run without getopt from util-linux)
46,51c46,51
< GETOPTTEST=`getopt -T`
< if test "$?" -eq 4; then # GNU getopt
< FAKE_TEMP=`getopt -l lib: -l faked: -l unknown-is-real -l fd-base: -l version -l help -- +l:f:i:s:ub:vh "$@"`
< else
< FAKE_TEMP=`getopt l:f:i:s:ub:vh "$@"`
< fi
---
> #GETOPTTEST=`getopt -T`
> #if test "$?" -eq 4; then # GNU getopt
(1..100).each do |i|
puts "Fizz" if i % 3 == 0 && i % 5 != 0
puts "Buzz" if i % 5 == 0 && i % 3 != 0
puts "Fizzbuzz" if i % 5 == 0 && i % 3 == 0
puts i if i % 5 != 0 && i % 3 != 0
# Another method
=begin
@LevitatingBusinessMan
LevitatingBusinessMan / calc.py
Created January 13, 2020 23:28
Google CTF 2019 Emoji challenge
# calculate reversible primes
primes = []
num = 1
def calcPrimes(start):
global num
while len(primes) - start < len(stack):
if all(num % i != 0 for i in range(2,num)):
if "".join(reversed(str(num))) == str(num):
primes.append(num)
num += 1
@LevitatingBusinessMan
LevitatingBusinessMan / rein.micro
Created January 18, 2020 18:09
Micro colorscheme
# Prob doesnt work because of uncomplete syntax files
color-link constant.bool.true "green"
color-link constant.bool.false "red"
color-link constant.string "magenta"
color-link comment "blue"
color-link constant "green"
color-link identifier "cyan"
color-link statement "yellow"
@LevitatingBusinessMan
LevitatingBusinessMan / hello_world.asm
Created January 20, 2020 15:43
My attempt to make a hello world program in Assembly
; Sources:
; https://youtu.be/HgEGAaYdABA
; Hello World Program - asmtutor.com
; Compile with: nasm -f elf32 -o hello_world.o hello_world.asm
; Link with (64 bit systems require elf_i386 option): ld -m elf_i386 hello_world.o -o hello_world
; Run with: ./helloworld
@LevitatingBusinessMan
LevitatingBusinessMan / decypter.py
Created February 5, 2020 14:46
HTB obscurity SecureCrypt cracker
#! /usr/bin/python
import sys,os
if "--help" in sys.argv:
print "Usage: ./decrypter.py <encrypted> <wordlist>"
wordlist = sys.argv[2]
words = open(wordlist, 'r', encoding='latin-1').read().split()
wordcount = len(words)
@LevitatingBusinessMan
LevitatingBusinessMan / getpass.rb
Last active August 21, 2020 23:57
NoSQL exploits for HTB
#!/usr/bin/ruby
require 'net/http'
require 'uri'
require 'fileutils'
user = ARGV[0] || "mango"
puts "Attacking #{user}"
#chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split ""