Skip to content

Instantly share code, notes, and snippets.

View socram8888's full-sized avatar
🐲
Unprofessional lizardman

Marcos Del Sol Vives socram8888

🐲
Unprofessional lizardman
View GitHub Profile
@nneonneo
nneonneo / 01_game.bin
Last active March 8, 2022 23:34
CPU Adventure files
1100111111010000001111001100100011100000110011010000000000001100100111010100000011010011111000011111110011001110000000110111100000101000111100001000110111100010010001100100101011110001111001111110000100000110011010000100000001100110111001100000001111000001110001111000011110001111000100010011001001010111100011110110100101100000010000111010010100110100000011110000011100011110000101101011110001000110110010010101111000110100101100000100000111010010100110100000011110000000101011110000101111011110001000110110010010101111000110100101100001000000111010010100110100000011110000001000011110000101101011110001000110110010010101111000110100101100010000000111010010100110100000011110000010001011110000101110011110001000110110010010101111000111101100001011000000000000110100101011010000010010101100000100000011010011001010100000011110000000001011110000111000011110001000111110010010101111000111100100011100000001111001111000111100011001010110000001000001101001010101010000001111000000001001111000011011101111000100011111001001010111
from base64 import b64decode, b64encode
import hashlib, argparse
def rc4mi(data, key):
S, j, out = list(range(256)), 0, []
for i in range(256):
j = (j + ord(key[i % len(key)]) + S[i]) % 256
S[i], S[j] = S[j], S[i]
@mattia-beta
mattia-beta / ddos.conf
Last active November 14, 2024 09:20
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
@gnilchee
gnilchee / https_server_multithread.py
Last active March 11, 2022 19:51
Multi-threaded Python 3 HTTPS Server
#!/usr/bin/env python3
import sys, os, socket, ssl
from socketserver import ThreadingMixIn
from http.server import SimpleHTTPRequestHandler, HTTPServer
HOST = socket.gethostname()
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer):
pass
@aras-p
aras-p / preprocessor_fun.h
Last active November 15, 2024 09:22
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,