Skip to content

Instantly share code, notes, and snippets.

View weibo.py
import struct
p = struct.Struct("<QQ")
i = 0
out = open('weibo.bin', 'wb')
with open('weibo.txt', 'r', errors='ignore') as f:
f.readline()
while True:
line = f.readline()
if not line:
View sshpass.c
#define UNICODE
#include <windows.h>
#include <stdio.h>
#include <string>
#include <vector>
#include <thread>
#pragma comment(lib, "shell32.lib")
std::wstring Win32ErrorToString(int ErrorCode)
@shuax
shuax / binwalk.bat
Created Aug 6, 2020
windows binwalk
View binwalk.bat
python %~dp0binwalk %*
View ecdsa.py
from Crypto.PublicKey import ECC
from Crypto.Hash import SHA256
from Crypto.Signature import DSS
text = b"123456"
h = SHA256.new(text)
print(h)
key = ECC.generate(curve='P-256')
View chrome_pass.py
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))
View wt.json
// This file was initially generated by Windows Terminal Preview 1.2.2022.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
View sublime.json
{
"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",
@shuax
shuax / qpys.py
Created Apr 28, 2019
qq拼音皮肤格式
View qpys.py
# pip install olefile
# pip install pywin32
import os
import zlib
import struct
import binascii
import olefile
import pythoncom
from win32com import storagecon
View getedge.py
import requests
requests.packages.urllib3.disable_warnings()
channels = [
'56EB18F8-B008-4CBD-B6D2-8C97FE7E9062',
'2CD8A007-E189-409D-A2C8-9AF4EF3C72AA',
'0D50BFEC-CD6A-4F9A-964C-C7416E3ACB10',
'65C35B14-6C1D-4122-AC46-7148CC9D6497',
]
View PfromC.py
import math
import random
def PfromC(C):
if not isinstance(C, float):
C = float(C)
pProcOnN = 0.0
pProcByN = 0.0
sumNpProcOnN = 0.0
You can’t perform that action at this time.