Skip to content

Instantly share code, notes, and snippets.

View goaround's full-sized avatar

Johannes Kinast goaround

View GitHub Profile
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@mahype
mahype / php.ini
Created February 26, 2021 11:39
Minimal xdebug config with Xdebug 3
zend_extension="xdebug.so"
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active April 19, 2024 11:33
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
@Zodiac1978
Zodiac1978 / projekt26-2020.md
Last active January 21, 2022 22:55
Teilnehmerinnen und Teilnehmer sowie alle Beiträge zur #Projekt26 Challenge im Jahr 2020

Am 28.12. habe ich mit einem Tweet zur #Projekt26 Challenge herausgefordert. Alle zwei Wochen bloggen und kommentieren, über Wordpress oder Verwandtes, in Deutsch oder Englisch. Alle Details dazu in diesem Artikel: https://torstenlandsiedel.de/2019/12/28/projekt26-jetzt-erst-recht/

Für 2021 geht es hier weiter: https://gist.github.com/Zodiac1978/2f13339f8431d1e5edf3365c39bdb12d

KW 1+2

const WordpressPurgeCSS = {
whitelist: [
"rtl",
"home",
"blog",
"archive",
"date",
"error404",
"logged-in",
"admin-bar",
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active January 17, 2023 18:52
Chrome headless Puppeteer- capture DOM element screenshot using
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});
@cyberwani
cyberwani / contact-form-7-assets-on-form-page.php
Created July 15, 2017 04:36
Contact Form 7 plugin: Load Javascript and CSS on Pages, Posts and CPTs where Contact Form 7 shortcode is used.
<?php
// Unload CF7 assests
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
add_action( 'the_content', 'load_cf7_assets' );
function load_cf7_assets($content){
global $post;
@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active March 28, 2024 15:45
Laravel Forge deploy script without downtime
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
@a-vasyliev
a-vasyliev / example.com.conf
Created March 25, 2015 11:42
Nginx: proxy cache without utm_* parameters (remove query parameter, remove utm tags nginx)
server {
listen 443;
server_name example.com;
error_log /var/log/nginx/example_com_error.log warn;
ssl on;
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains
ssl_certificate_key /etc/nginx/ssl/your.key; #private key