Skip to content

Instantly share code, notes, and snippets.

View games647's full-sized avatar

games647 games647

View GitHub Profile
@kennytv
kennytv / readme.md
Last active March 27, 2024 15:59
Signed Chat and Chat Types

Signed chat

This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.

Profile keys

After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.

On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.

Message signatures

# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
# Simulate fake processes of analysis sandbox/VM that some malware will try to evade
# This just spawn ping.exe with different names (wireshark.exe, vboxtray.exe, ...)
# It's just a PoC and it's ugly as f*ck but hey, if it works...
# Usage: .\fake_sandbox.ps1 -action {start,stop}
param([Parameter(Mandatory=$true)][string]$action)
$fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",
"VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",
@konsolas
konsolas / config.yml
Last active August 13, 2016 01:42
AAC 1.9 pre-release configuration
#### AAC Config
#
# NOTE: Most of the values here have been tried and tested to work.
# It is not recommended that you change them unless you are
# getting false positives.
#
# It would be a good idea to make sure the false positives you're getting aren't actually hackers....
#
#
# The configurable commands will replace "{player}" with the name of the player.
@tofi86
tofi86 / nagios_check_fritz.sh
Last active August 24, 2022 17:48
Nagios/Icinga command to check fritzbox status for "uptime", "upstream", "downstream", "connection" and "external ip". This is a fork of http://blog.gmeiners.net/2013/09/fritzbox-mit-nagios-uberwachen.html
#!/bin/bash
#
# Example configuration
#
# commands.cfg:
#
# define command {
# command_name check_fritz_uptime
# command_line $USER1$/check_fritz -h $HOSTADDRESS$ -f linkuptime
# }
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
package de.zh32.slp;
import com.google.gson.Gson;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
@nlinker
nlinker / all-in-one example
Created September 24, 2012 09:01
Get the network speed with sigar
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.hyperic.sigar.NetFlags;
import org.hyperic.sigar.NetInterfaceConfig;
import org.hyperic.sigar.NetInterfaceStat;
import org.hyperic.sigar.Sigar;