Skip to content

Instantly share code, notes, and snippets.

View arxenix's full-sized avatar

Ankur Sundara arxenix

View GitHub Profile
@arxenix
arxenix / Bukkit FuzzySearch for Commands
Created August 31, 2013 00:08
Bukkit FuzzySearch for commands. Easily fuzzy search for the correct command! Easy to use with subCommands, and support for multiple commands.
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import org.apache.commons.lang.StringUtils;
public class FuzzySearch {
private static HashMap<String,String[]> searchers = new HashMap<String,String[]>();
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@arxenix
arxenix / MOTD with ProtocolLib
Created September 6, 2013 20:53
Set Minecraft MOTD with ProtocolLib
ProtocolLibrary.getProtocolManager().addPacketListener(
new PacketAdapter(this, ConnectionSide.SERVER_SIDE,
Packets.Server.KICK_DISCONNECT) {
@Override
public void onPacketSending(PacketEvent event) {
StructureModifier<String> packetStr = event.getPacket().getSpecificModifier(String.class);
String p = (String)packetStr.read(0);
String prep = p.substring(0, 3);
@arxenix
arxenix / Bukkit Annotation Commands
Last active December 29, 2015 23:39
Bukkit Annotation Commands
package YOUR_PACKAGE_HERE;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
import org.bukkit.help.GenericCommandHelpTopic;
import org.bukkit.help.HelpTopic;
import org.bukkit.help.HelpTopicComparator;
import org.bukkit.help.IndexHelpTopic;
@arxenix
arxenix / ImgMessage
Last active February 6, 2023 10:39
ImgMessage util class to send images to players with the chat bar!
package your-package;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.HashMap;
/**
@arxenix
arxenix / ItemSerialization.java
Created June 30, 2015 03:58
ItemSerialization w/ NBT for 1.8
package me.bobacadodl.dataapi.items;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.lang.reflect.InvocationTargetException;
import java.math.BigInteger;
import me.bobacadodl.dataapi.utils.ReflectionUtils;
import org.bukkit.inventory.ItemStack;
@arxenix
arxenix / keybase.md
Created December 10, 2015 03:28
Keybase Verification

Keybase proof

I hereby claim:

  • I am bobacadodl on github.
  • I am bobacadodl (https://keybase.io/bobacadodl) on keybase.
  • I have a public key whose fingerprint is 6884 5C72 30CD A5C9 AA3B 4EC3 8043 DDFA 4EA3 F64E

To claim this, I am signing this object:

@arxenix
arxenix / aes.txt
Last active September 24, 2016 11:49
AES Mess
abctf{tugger_waifed}:fecf893a1a0d5fa680fb5271f6e86abfdb8d4fa057cce26249b3d18731de479c
abctf{sarsar_clags_calic_spaer_miro_filii_piers}:e7bdff77bfb478a6cee3a267c7d6ab696cc414a1cc949f8776590960de8aa3a50ba41028803e1dd99600819c4fc07b66
abctf{libris_yarded}:3187dfcacb1a1c37b0f23cfb8759b60441a9b707b891f1b1454f2b4b0488cee4
abctf{adhaka_hanced_peags_nimbus_sucken_atabek_grands}:f0c678f4c3a1d36ae6d64a95f015ac231c6c6080c023fd7c52e649e3ab0a46f4e80f0010814d925ed9c226ff73d0d9c82f957d6be3c5eef7701b724ddcd74254
abctf{bagass_unshy_con_booed_thitsi_vagrom_ola}:110c7f959acf0a16498061fed8347ab8b8f95de482d9cdc10ff9b9ff5e50cb3851ed071bbe953def278dd6f6e2ae339c
abctf{doni_hakea_mexico_stew_enodal_pod}:a1e3e0f1a6669cdee47c901bf08016dd046935f85f4b44a9f07fdf61ac3124fea4587e0b86aa2b91878a2c4b88a676ef
abctf{extant_chimer_bart}:60357794658ff43cf868d62bc0eca6e892bb5067e5dcb4d71fe17f293fa6734e
abctf{skis_envies_shrogs_birder_irone_pickle_bogy}:02de2eb084744ef77998b7cf91884e3104d55403e5821919936204df132bdb9cf61f3cc7e7ade2008c23b01016fd58bc1
@arxenix
arxenix / broadcast.txt
Last active September 24, 2016 11:50
Small Broadcast - FIXED
Problem updated on 7/17/16 @ 8PM EST - fixed values
I RSA encrypted the same message 3 different times with the same exponent. Can you decrypt it?
N1:79608037716527910392060670707842954224114341083822168077002144855358998405023007345791355970838437273653492726857398313047195654933011803740498167538754807659255275632647165202835846338059572102420992692073303341392512490988413552501419357400503232190597741120726276250753866130679586474440949586692852365179
C1:34217065803425349356447652842993191079705593197469002356250751196039765990549766822180265723173964726087016890980051189787233837925650902081362222218365748633591895514369317316450142279676583079298758397507023942377316646300547978234729578678310028626408502085957725408232168284955403531891866121828640919987
N2:58002222048141232855465758799795991260844167004589249261667816662245991955274977287082142794911572989261856156040536668553365838145271642812811609687362700843661481653274617983708937827484947856793885821586285570844274545385852401777678956217807768
@arxenix
arxenix / primey_rsa.txt
Created June 18, 2016 15:39
Primey RSA problem
Your friend sent you an RSA encrypted message, but all you have is the public key.
Can you decrypt it?
N= 783949009604721773062671385703560162276953281000402407136755498403805325573871739224718132041263674805095745730360032456390771004653528645418609485611285972347768801288078405739359537027510763093101466339010391468526065882213132642606727066648907089863555137412937880587640902191876372019617661767541914486532426154355941876213379704860899070512163415028956242773211194938669142126831249205301582117092914150610138627549493093118832692994906018076043123209714003367654405914750914105794398885868868138989303423588666001189801604514215795662056626995322594204045330812833643921001621378187921795314603685153801858317274843037788908177180533949587026647728428640595415673082608586182157804859771910060725906999656669264071344413847948322035342776831739326498872673499644746067588205954665756088233284157872340201635503233214321917542354622127013889
e= 65537
c= 7792045924207499503793994447927048053324455636069539411832