Skip to content

Instantly share code, notes, and snippets.

import os
import re
import zlib
import urllib.request
from struct import unpack
class QQWayIPSeekerUpdate():
@classmethod
def __download_meta(cls):
@shuax
shuax / windows 10
Last active August 29, 2015 14:07
windows 10
#include <windows.h>
#include <stdio.h>
int width = 0;
HWND TaskListHwnd = NULL;
BOOL CALLBACK SearchTrayButton(HWND hwnd, LPARAM lParam)
{
TCHAR buff[256];
if(GetClassName(hwnd, buff, 255))
import zlib
with open("3231.zl", "rb") as encrypted_file:
data = encrypted_file.read()
decrypted_text = zlib.decompress(data)
with open('3231.bin', 'wb') as decrypted_file:
decrypted_file.write(decrypted_text)
local function check_endless_loop()
local stat = {}
local function hook_line(e, line)
local source = debug.getinfo(2).source
if not stat[source] then
stat[source] = {}
end
if not stat[source][line] then
stat[source][line] = 0
import random
def shuffle_assign(total, num):
remain = total - num
assert remain >= 0
points = []
for i in range(1, num):
point = random.randint(0, remain)
points.append(point)
points.append(remain)
points.sort()
import math
import random
def PfromC(C):
if not isinstance(C, float):
C = float(C)
pProcOnN = 0.0
pProcByN = 0.0
sumNpProcOnN = 0.0
@shuax
shuax / qpys.py
Created April 28, 2019 07:34
qq拼音皮肤格式
# pip install olefile
# pip install pywin32
import os
import zlib
import struct
import binascii
import olefile
import pythoncom
from win32com import storagecon
{
"color_scheme": "Packages/ayu/ayu-mirage.sublime-color-scheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
import base64
# https://github.com/chromium/chromium/blob/master/components/os_crypt/os_crypt_win.cc
# Local State -> os_crypt.encrypted_key
# start with "DPAPI"
encrypted_key = "RFBBUElHFVPkvx6wPkLGBufud/s3Mjg5QwQqbPJ3kTB7aajsZw=="
encrypted_key = base64.b64decode(encrypted_key)[5:]
print('encrypted_key', encrypted_key, len(encrypted_key))
from array import array
with open("Assembly-CSharp.dll", "rb") as encrypted_file:
data = encrypted_file.read()
key = "*********"
S = list(range(256))
j = 0
out = []