This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: leaky | |
format: 2.0 | |
#debug: true | |
name: belphemur/http-wordpress-login-xmlrpc | |
description: "Detect attempt to access to wp-login and xmlrpc" | |
filter: "evt.Meta.log_type == 'http_access-log' && (evt.Parsed.file_name == 'wp-login.php' || evt.Parsed.file_name == 'xmlrpc.php') && evt.Parsed.verb == 'POST'" | |
groupby: "evt.Meta.source_ip" | |
#distinct: evt.Parsed.request | |
capacity: 4 | |
leakspeed: 2m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//source: https://damieng.com/blog/2015/04/24/make-home-end-keys-behave-like-windows-on-mac-os-x/ | |
//Move DefaultKeyBinding.dict in your ~/Library/KeyBindings folder | |
//Log out log back in | |
{ | |
"\UF729" = moveToBeginningOfParagraph:; // home | |
"\UF72B" = moveToEndOfParagraph:; // end | |
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home | |
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end | |
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home | |
"^\UF72B" = moveToEndOfDocument:; // ctrl-end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# | |
# Author: Cyril Jaquier | |
# Modified: Yaroslav O. Halchenko <debian@onerussian.com> | |
# made active on all ports from original iptables.conf | |
# Modified: Antoine Aflalo <antoine@aaflalo.me> | |
# Used the iptables-allports.conf as base for TARPIT. | |
# | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# names of latest versions of each package | |
export NGINX_VERSION=1.15.5 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
export VERSION_LIBRESSL=libressl-2.8.1 | |
export VERSION_PCRE=pcre-8.42 | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script work on any system using systemd as the init process. | |
# It works on Debian/Raspbian Jessie. | |
# If you have Debian/Rapbian Wheezy and want to use this script with systemd | |
# follow the information here : https://wiki.debian.org/systemd | |
# To easily download, install and set at startup: | |
# wget -O /tmp/download https://gist.github.com/Belphemur/3f6d3bf211b0e8a18d93/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/systemd/system/ && sudo systemctl --reload-daemon && sudo systemctl enable Node-RED | |
# To consult the log : journalctl -u Node-RED | |
[Unit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: node-red | |
# Required-Start: $local_fs $remote_fs $network | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start or stop the node-red server | |
### END INIT INFO | |
# Can be downloaded and installed in one go by using this command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parse Arguments | |
Param( | |
[Parameter(Mandatory, HelpMessage = "The path for the Manifest.")] | |
[String] $Manifest | |
) | |
if (-not (Test-Path -Path $Manifest -PathType Leaf)) { | |
throw 'The Manifest file does not exist.' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SERVICE_FILE=nextdns-catchall.service | |
SOURCE_FILE_PATH=/data/${SERVICE_FILE} | |
SYSTEMD_FILE_PATH=/etc/systemd/system/${SERVICE_FILE} | |
if [ ! -f $SOURCE_FILE_PATH ]; | |
then | |
echo "Can't find service file" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define physical ethernet interface to be bridged | |
# with TAP interface(s) above. | |
eth="eth0" | |
eth_ip="192.168.42.2" | |
eth_netmask="255.255.255.0" | |
eth_broadcast="192.168.42.255" | |
eth_gateway="192.168.42.1" | |
eth_mac="XX:XX:XX:XX:XX:XX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pytube import YouTube | |
from moviepy.editor import * | |
import openai | |
import textwrap | |
openai.api_key = "YOUR KEY" | |
def download_youtube_video(url, output_path): | |
yt = YouTube(url) | |
video = yt.streams.filter(file_extension='mp4').first() | |
video.download(output_path) |