Skip to content

Instantly share code, notes, and snippets.

@phase
phase / 1.16.4-packet-rip.md
Last active November 13, 2024 00:24
1.16.4 packet class parsing result (very wip)

net/minecraft/network/protocol/game/ClientboundAddEntityPacket

Field Name Field Type
id I
uuid Ljava/util/UUID;
x D
y D
z D
xa I
@sdrapkin
sdrapkin / Login.gov encryption is badly designed.md
Last active December 6, 2018 15:03
Login.gov encryption is badly designed

Login.gov encryption is badly designed

Disclaimer: everything that follows is a personal opinion - not an assertion of fact.

Regulatory/Compliance flaws

NIST has created Federal Information Processing Standard (FIPS) 140-2: Security Requirements for Cryptographic Modules. FIPS requirements are mandatory for Federal Government agencies, as prescribed by FISMA law. FIPS-140-2 Annex D covers Approved Key Establishment Techniques. The only FIPS-approved password-based key derivation algorithm is PBKDF2 (NIST SP800-132). Login.gov uses scrypt, which is not FIPS-approved. The FIPS-approved key-derivation algorithms are mostly covered by NIST SP800-108. Login.gov uses several custom approaches for key derivation, none of which are FIPS-approved.

Summary:
@entrypointkr
entrypointkr / Agent.java
Last active May 24, 2021 02:23
Java Byte Code Instrumentation Example
package kr.rvs.instrumentation;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.lang.instrument.ClassDefinition;
import java.lang.instrument.Instrumentation;
/**
* Created by Junhyeong Lim on 2017-02-02.
*/
@rbrick
rbrick / ReflectionUtils.java
Created December 1, 2014 04:46
Tab & Chat utils for 1.8
package me.rbrickis.testing;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
@rbrick
rbrick / Reflection.java
Created November 3, 2014 02:59
Reflection Utilities
/**
* Created by Ryan on 11/2/2014
* <p/>
* Project: Phenomenon
*
* About: Various reflection utilities created by @rbrick(Ryan)
*/
public class Reflection {
private static String VERSION = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
@rbrick
rbrick / NameTahgMinified.java
Last active August 29, 2015 14:08
A simple class that lets you edit players name tags using the bukkit api
/**
* Created by Ryan on 11/2/2014
* <p/>
* Project: NameTahg
*
* About: This is a minified version of NameTahg. This contains everything needed in one class.
* You can then shade this class into your plugin for any of your needs with ease.
* Enjoy, rbrick :)
*/
public class NameTahgMinified {
package com.gmail.filoghost.hiddenstring;
import java.nio.charset.Charset;
import org.bukkit.ChatColor;
public class HiddenStringUtils {
// String constants. TODO Change them to something unique to avoid conflict with other plugins!
private static final String SEQUENCE_HEADER = "" + ChatColor.RESET + ChatColor.UNDERLINE + ChatColor.RESET;
@rbrick
rbrick / claims.json
Created October 16, 2014 20:43
Team claim format. Contains two possible formats: One the claims are stored in the team file, the other it is stored in a separate file that stores a serialized TeamClaim object
{
"team_claims": [
{
"owning_team": "Xetha",
"maxX": 10,
"minX": -10,
"maxY": 256,
"minY": 0,
"maxZ": 10,
"minZ": -10,
@Heyitsthatonekid
Heyitsthatonekid / Calculator
Created September 21, 2014 00:50
Calculator
<html><head></head><body><form name="Calc">
<table border="8">
<tbody><tr>
<td>
<input type="text" name="Input" size="20">
<br>
</td>
</tr>
<tr>
<td>
#!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from scipy.ndimage.measurements import center_of_mass
dxy = 0.1