Skip to content

Instantly share code, notes, and snippets.

@AvasDream
AvasDream / log-analysis.md
Last active August 31, 2023 07:36
Monitor your ssh login attempts with Fail2ban and make a graph with python and the shodan api.

Analyse SSH Logins

We are looking at the auth.log file in /var/log/auth.log.

All the login attempts were captured in a time frame of ~3 Hours.

Get all Ips from logfile.

sudo cat /var/log/auth.log | grep "Failed password" | awk -F 'from' '{print $2}' | cut -d" " -f2 > failed-login-ips.txt
@kleo
kleo / format.sh
Last active August 24, 2023 16:27
Format usb flash drive and mount as sdcard for the WiFi Pineapple Nano
#!/bin/bash
#2018 - Zylla - (adde88@gmail.com)
#Format usb flash drive as sdcard for the WiFi Pineapple Nano
#Source https://forums.hak5.org/topic/39096-mana-attack-for-the-pineapple/?do=findComment&comment=303054
#You can also manually partition your usb flash drive on your computer
[[ -f /tmp/usb_format.progress ]] && {
exit 0
}
@fbartho
fbartho / 0. Synology RAID Expansion-Resync Performance.md
Last active April 17, 2024 17:46
Walkthrough of what I did to increase performance on my Synology NAS box during an expansion, and afterwards.

Performance on Synology RAIDs

(especially while expanding)

Warning: The exact commands may not match for your particular linux OS / Synology(NAS) device. I had to customize the commands after exploring my particular system's setup.

If you're new to linux, or this is a new piece of hardware / a new synology device, jump down to the section called "Inspecting a setup"

Contents

@JonnyWong16
JonnyWong16 / update_all_metadata.py
Last active March 19, 2024 17:31
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active March 26, 2024 12:52
Fail2ban Config with Nginx and SSH
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =