This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import urandom | |
from socket import create_connection | |
from cryptography.hazmat.primitives.asymmetric import padding | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.primitives.serialization import load_der_public_key | |
def read(sock, length): | |
result = b'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import struct | |
import json | |
def unpack_varint(s): | |
d = 0 | |
for i in range(5): | |
b = ord(s.recv(1)) | |
d |= (b & 0x7F) << 7*i | |
if not b & 0x80: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, marshal, functools, subprocess | |
child_script = """ | |
import marshal, sys, types; | |
fn, args, kwargs = marshal.load(sys.stdin) | |
marshal.dump( | |
types.FunctionType(fn, globals())(*args, **kwargs), | |
sys.stdout) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import socket | |
### Helper functions | |
# Read n bytes from the socket | |
def read(sock, n): | |
o = "" | |
while len(o) < n: | |
o += sock.recv(n-len(o)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import json | |
import SocketServer | |
SocketServer.TCPServer.allow_reuse_address = True | |
class MCHandler(SocketServer.BaseRequestHandler): | |
@classmethod | |
def pack_varint(cls, d): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"redirect": null, | |
"suggestions": null, | |
"type": 0, | |
"has_command": false, | |
"children": [ | |
{ | |
"redirect": null, | |
"suggestions": null, | |
"has_command": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ping($host, $port=25565, $timeout=30) { | |
//Set up our socket | |
$fp = fsockopen($host, $port, $errno, $errstr, $timeout); | |
if (!$fp) return false; | |
//Send 0xFE: Server list ping | |
fwrite($fp, "\xFE"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import chdir, path | |
from tempfile import mkdtemp | |
from shutil import rmtree | |
from struct import pack | |
from subprocess import check_output | |
def jar_contents(j_path): | |
return check_output(['jar', 'tf', j_path]).split("\n") | |
def jar_extract(j_path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import struct | |
from twisted.internet import protocol, reactor | |
PR_VERSION = "51" | |
MC_VERSION = "1.4.7" | |
class DowntimeProtocol(protocol.Protocol): | |
def __init__(self, message): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import javax.crypto.*; | |
import java.util.*; | |
import javax.crypto.spec.*; | |
import java.net.*; | |
public class decrypt { | |
static String DESpassword = "passwordfile"; | |
static byte[] salt = { 12, -99, 74, -28, 30, -125, 21, -4 }; | |
public static void main(String[] args) { |
NewerOlder