Skip to content

Instantly share code, notes, and snippets.

@jaygooby
jaygooby / log4j-jndi.conf
Last active Feb 2, 2022
fail2ban filter rule for the log4j CVE-2021-44228 exploit
View log4j-jndi.conf
# 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
#
@dleonard00
dleonard00 / explode-opvn.sh
Created Jan 15, 2017
extract the certificate and key from an .ovpn file
View explode-opvn.sh
#!/bin/bash
# This script will extract the certificate and key from an .ovpn file
# into their own files, which makes it possible to use them to configure
# the VPN using Ubuntu's network manager
# Usage example:
# >> ovpnconvert username.dev.ovpn
# You can keep following these instructions here:
@cerlestes
cerlestes / nginx-baduris.conf
Last active Nov 24, 2022
A fail2ban filter configuration to catch vulnerabilities-testing software
View nginx-baduris.conf
# Fail2Ban filter for catching failed accesses to most likely unwanted, exposing and dangerous files.
# This will catch a lot of different scanning tools that are trying to find vulnerable applications.
#
# IMPORTANT
# This filter is quite heavy. If you enable it for the nginx access log, it will have to run a giant
# regular expression on each line. Please check out the best practice wiki page for more information
# on how to enable your nginx configuration to minimize the load on Fail2Ban:
# https://github.com/fail2ban/fail2ban/wiki/Best-practice
#
# EXAMPLE USAGE
@olasd
olasd / stream_to_youtube.sh
Created Mar 28, 2014
Stream video to youtube via ffmpeg
View stream_to_youtube.sh
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube