This file contains hidden or 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 os | |
import argparse | |
from multiprocessing import Pool | |
def convert_quest(fn): | |
if not os.path.exists(args.path + fn): | |
print(fn, 'does not exist') | |
return | |
if os.path.exists(args.path + fn + '.bak'): |
This file contains hidden or 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 http.server | |
import socketserver | |
from urllib.parse import parse_qs | |
port = 80 | |
print_headers = True | |
print_params = True | |
class CustomHandler(http.server.SimpleHTTPRequestHandler): |
This file contains hidden or 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 os | |
d = 'bin/events' | |
out = 'begin;insert into event_quests(max_players, quest_type, quest_id, mark)values' | |
for y, _, x in os.walk(d): | |
for z in x: | |
f = os.path.join(y, z) | |
if os.stat(f).st_size < 352: | |
continue | |
with open(f, 'rb') as p: |
This file contains hidden or 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
do | |
$$ | |
declare guild_to_resort integer := <guild id>; | |
declare f record; | |
declare i integer := 2; | |
declare char_id integer; | |
begin | |
for f in select gc.id | |
from public.guild_characters gc |
This file contains hidden or 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
func (s *Session) makeSignIn002Resp(uid int) []byte { | |
chars, err := s.server.getCharactersForUser(uid) | |
if err != nil { | |
s.logger.Warn("Error getting characters from DB", zap.Error(err)) | |
} | |
rand.Seed(time.Now().UnixNano()) | |
token := randSeq(16) | |
bf := byteframe.NewByteFrame() | |
bf.WriteUint8(1) //resp |
This file contains hidden or 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 os | |
import zlib | |
def crc32(file): | |
with open(file, 'rb') as fp: | |
h = 0 | |
while True: | |
s = fp.read(65536) | |
if not s: |
This file contains hidden or 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
BEGIN; | |
ALTER TABLE IF EXISTS public.users | |
ALTER rights SET DEFAULT 14; | |
ALTER TABLE IF EXISTS public.users | |
ALTER rights SET NOT NULL; | |
UPDATE public.users SET rights=14 WHERE rights IS NULL; |
This file contains hidden or 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
# Monster Hunter Frontier packet decryption PoC. | |
import socket | |
import struct | |
import sys | |
from hexdump import hexdump | |
ENCRYPT_KEY = b'\x90\x51\x26\x25\x04\xBF\xCF\x4C\x92\x02\x52\x7A\x70\x1A\x41\x88\x8C\xC2\xCE\xB8\xF6\x57\x7E\xBA\x83\x63\x2C\x24\x9A\x67\x86\x0C\xBE\x72\xFD\xB6\x7B\x79\xB0\x22\x5A\x60\x5C\x4F\x49\xE2\x0E\xF5\x3A\x81\xAE\x11\x6B\xF0\xA1\x01\xE8\x65\x8D\x5B\xDC\xCC\x93\x18\xB3\xAB\x77\xF7\x8E\xEC\xEF\x05\x00\xCA\x4E\xA7\xBC\xB5\x10\xC6\x6C\xC0\xC4\xE5\x87\x3F\xC1\x82\x29\x96\x45\x73\x07\xCB\x43\xF9\xF3\x08\x89\xD0\x99\x6A\x3B\x37\x19\xD4\x40\xEA\xD7\x85\x16\x66\x1E\x9C\x39\xBB\xEE\x4A\x03\x8A\x36\x2D\x13\x1D\x56\x48\xC7\x0D\x59\xB2\x44\xA3\xFE\x8B\x32\x1B\x84\xA0\x2E\x62\x17\x42\xB9\x9B\x2B\x75\xD8\x1C\x3C\x4D\x76\x27\x6E\x28\xD3\x33\xC3\x21\xAF\x34\x23\xDD\x68\x9F\xF1\xAD\xE1\xB4\xE7\xA6\x74\x15\x4B\xFA\x3D\x5F\x7C\xDA\x2F\x0A\xE3\x7D\xC8\xB7\x12\x6F\x9E\xA9\x14\x53\x97\x8F\x64\xF4\xF8\xA2\xA4\x2A\xD2\x47\x9D\x71\xC5\xE9\x06\x98\x20\x54\x80\xAA\xF2\xAC\x50\xD6\x7F\xD9\xC9\xCD\x69\x46\x6D\x30\x |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func pwr(a int, b int) int { | |
return int(math.Pow(float64(a), float64(b))) | |
} |
This file contains hidden or 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
setInterval(function() { | |
var responseTime = 100; | |
var before = new Date().getTime(); | |
debugger; | |
var after = new Date().getTime(); | |
if (after - before > responseTime) { | |
document.body.innerHTML = ""; | |
location.reload(); | |
} | |
}, 50); |
NewerOlder