Skip to content

Instantly share code, notes, and snippets.

View nsporillo's full-sized avatar
🎯
Focusing

Nick Porillo nsporillo

🎯
Focusing
View GitHub Profile
@nsporillo
nsporillo / keybase.md
Created August 7, 2019 11:55
keybase.md

Keybase proof

I hereby claim:

  • I am nsporillo on github.
  • I am milkywayz (https://keybase.io/milkywayz) on keybase.
  • I have a public key ASB9k5hXKj8K8Lm7dH95H5rgt0Ln9E9KXsymu1gfQP4qDQo

To claim this, I am signing this object:

@nsporillo
nsporillo / error.log
Last active July 27, 2019 15:52
Paper Startup Exception (BukkitCommandManager)
[11:44:27 ERROR]: Error occurred while enabling GlobalWarming v1.0.4 (Is it up to date?)
java.lang.NullPointerException: null
at org.spigotmc.CustomTimingsHandler.<init>(CustomTimingsHandler.java:79) ~[patched_1.14.4.jar:git-Paper-148]
at net.porillo.shade.aikar.timings.lib.SpigotTiming.<init>(SpigotTiming.java:11) ~[?:?]
at net.porillo.shade.aikar.timings.lib.TimingType$1.newTiming(TimingType.java:11) ~[?:?]
at net.porillo.shade.aikar.timings.lib.TimingManager.of(TimingManager.java:72) ~[?:?]
at net.porillo.shade.aikar.timings.lib.TimingManager.of(TimingManager.java:38) ~[?:?]
at net.porillo.shade.aikar.commands.BukkitCommandManager.<init>(BukkitCommandManager.java:97) ~[?:?]
at net.porillo.GlobalWarming.onEnable(GlobalWarming.java:91) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.14.4.jar:git-Paper-148]
[
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',

Keybase proof

I hereby claim:

  • I am nsporillo on github.
  • I am milkywayz (https://keybase.io/milkywayz) on keybase.
  • I have a public key whose fingerprint is F94E F5F9 6404 DB95 850F 379A BA88 49F6 6105 D3FD

To claim this, I am signing this object:

@nsporillo
nsporillo / minechat.js
Last active November 18, 2017 06:16
Decent CLI chat client for minecraft 1.6.4 using minecraft-protocol Uses https://github.com/loopj/commonjs-ansi-colorDoesn't support all colors AFAIK, furthermore it's probably not the most efficient way to handle colored chat. Used buffers to deal with the § character, not sure if this can be done without doing that.
var readline = require('readline');
var color = require("ansi-color").set;
var mc = require('../');
var c = new Buffer("§", "utf-8")
var colors = new Array();
colors[c.toString('utf-8') + '0'] = 'black+white_bg';
colors[c.toString('utf-8') + '1'] = 'white+blue_bg';
colors[c.toString('utf-8') + '2'] = 'green';
colors[c.toString('utf-8') + '3'] = 'blue';

Keybase proof

I hereby claim:

  • I am nsporillo on github.
  • I am milkywayz (https://keybase.io/milkywayz) on keybase.
  • I have a public key ASBVD6nI_D3phxSomqNAnG0FK20-eEIyIdyUW0mDjyA9wwo

To claim this, I am signing this object:

I’ve come to think that the position that the client should never, ever be trusted on the ground that it doesn’t allow to achieve logically perfect security, while true, is too extremist.
It can be a difficult business case to build and maintain heavy dedicated servers (especially for such a not quite “Massive” MMO game as the division), whereas (in my experience as a gameplay programmer on another “mmo” using p2p networking) there are a lots of ways to make client side hacking by memory editing and code injection too difficult to figure out for most hackers.
Combine it with silently detecting and reporting what you can’t outright prevent and delayed response to those red flags so they have no idea how you found them, and you can have a pretty good (even if imperfect) effect against cheating.
People who hack games aren’t in my experience as insanely bright as you may first think by looking at what they do. Expert cheat engine users, for instance, often seem very knowledgeable because they have notions of a
@nsporillo
nsporillo / gist:429bddc88896cf147d24
Created February 10, 2016 03:39
Client chat exception
Successfully connected to ------.---:25565 // redacted ip
/Users/milkywayz/Github/node-minecraft-protocol/examples/client_chat/client_chat.js:157
if('color' in chatObj) parentState.color = chatObj['color'];
^
TypeError: Cannot use 'in' operator to search for 'color' in undefined
at parseChat (/Users/milkywayz/Github/node-minecraft-protocol/examples/client_chat/client_chat.js:157:19)
at /Users/milkywayz/Github/node-minecraft-protocol/examples/client_chat/client_chat.js:175:15
at Array.forEach (native)
at parseChat (/Users/milkywayz/Github/node-minecraft-protocol/examples/client_chat/client_chat.js:174:19)
@nsporillo
nsporillo / conf.json
Created February 4, 2016 07:02
Working conf file
{
"baseCommandAliases": [
"f"
],
"allowNoSlashCommand": true,
"colorMember": "GREEN",
"colorAlly": "LIGHT_PURPLE",
"colorTruce": "DARK_PURPLE",
"colorNeutral": "WHITE",
"colorEnemy": "RED",
@nsporillo
nsporillo / commentkiller
Last active January 23, 2016 00:47
Simple Python script which removes all comments from a source generated from JD-GUI
import os
import fnmatch
import re
pattern = re.compile(r"(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)")
for root, dirs, files in os.walk("."):
for name in fnmatch.filter(files, "*.java"):
file = os.path.join(root, name)
with open(file, mode='r+') as f: