Skip to content

Instantly share code, notes, and snippets.

View HorlogeSkynet's full-sized avatar

Samuel FORESTIER HorlogeSkynet

View GitHub Profile
@jaygooby
jaygooby / log4j-jndi.conf
Last active February 2, 2022 12:04
fail2ban filter rule for the log4j CVE-2021-44228 exploit
# log4j jndi exploit CVE-2021-44228 filter
# Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf
# then copy and uncomment the [log4j-jndi] section
# to /etc/fail2ban/jail.local
#
# jay@gooby.org
# https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228
# https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949
# Thanks to https://gist.github.com/kocour for a better regex
#
@motorailgun
motorailgun / idea.md
Last active June 18, 2024 06:22
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@TerrorBite
TerrorBite / bashttpd.sh
Last active February 5, 2021 11:37
A webserver… written as a shell script. This is a terrible idea. MIT license
#!/bin/bash
# Let's write a webserver in Bash because haha why not
# Copyright (c) 2017-2020 TerrorBite <terrorbite@lethargiclion.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
:0: the only difference between digitalriver and technet is the _naming_, nothing else!
:1: please VERIFY md5/sha1-sums after each download (msdn-links containing proof of sha1-sums are linked behind each iso)
:2: the isos are provided as is
:3: if you\'re a microsoft representative, please dont be pissed, i just help your customers where you leave \'em in the dark (i do not provide keys here!), thank you!
## DIGITALRIVER ## ## TECHNET ## ## MD5 ## ## SHA-1 ## ## MSDN ##
------------- de_windows_7_starter_with_sp1_x86_dvd_u_678545.iso 7e88e30b655dc9bb8ce0a2e2a4f803f3 37bb946b83ef5ed801a634bd644abf03bf15952a 46892
------------- de_windows_7_starter_n_with_sp1_x86_dvd_u_678311.iso ae512ac4abd6e5bfc9323011e19efc43 d91321298c5483ea74e2264020c36adcffccaae6 46923
------------- de_windows_7_home_basic_with_sp1_x86_dvd_u_676467.iso 9cf2cf1d30404b9fa71acf4db7e28d67 5b86b6690b2ef236e71b256794a625c44d846952 47165
@opus-x
opus-x / Spotify_Eliminate_Advertisements
Last active July 3, 2024 05:49
Eliminate Spotify Advertisements + Complete Server List
##################################################################################
# ELIMINATE SPOTIFY ADS (VERSION 1.2 - 8.5) - ABANDONED FOR NOW #
##################################################################################
#
# NOTE: SOMETIMES ONLY ANNOUNCEMENT OF AN AD WHILE USING APP VERSION 7.5-7.9?-8.x.
# USING AN OFFICIAL OLDER VERSION SOLVES THIS. TEST IT (APKMIRROR). THIS WILL NOT
# OCCUR USING CHROMECAST / GOOGLE HOME.
#
# COULD NOT SOLVE THE AUDIO AD INRO/OUTRO IN THE APP.
# SUGGESTIONS? WRITE A COMMENT BELOW.
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 8, 2024 02:26
Hyperlinks in Terminal Emulators
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@mdonkers
mdonkers / server.py
Last active June 25, 2024 18:48
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@simonw
simonw / recover_source_code.md
Last active June 21, 2024 00:11
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@ageis
ageis / systemd_service_hardening.md
Last active July 3, 2024 21:02
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict