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 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') |
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
python %~dp0binwalk %* |
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
// 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", |
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
#define UNICODE | |
#include <windows.h> | |
#include <stdio.h> | |
#include <string> | |
#include <vector> | |
#include <thread> | |
#pragma comment(lib, "shell32.lib") | |
std::wstring Win32ErrorToString(int ErrorCode) |
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 struct | |
_DELTA = 0x9E3779B9 | |
def _long2str(v, w): | |
n = (len(v) - 1) << 2 | |
if w: | |
m = v[-1] | |
if (m < n - 3) or (m > n): return '' | |
n = m |
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 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: |
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 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', | |
] |
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
#include <algorithm> | |
#include <random> | |
#include <vector> | |
#include <chrono> | |
template<typename RandomAccessIterator, typename Order, typename Reporter> | |
void sort_with_progress(RandomAccessIterator first, RandomAccessIterator last, Order order, const size_t &total, size_t &progress, Reporter report) | |
{ | |
if (last - first > 1) | |
{ |
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 zlib | |
import struct | |
def export_skn(path, data): | |
head = data[:20] | |
reserve = data[20:20+256] # 未知数据,全为0,大小是256,可能是给文件头扩容保留的 | |
body = data[20+256:] | |
sign, version, size = struct.unpack('<04sQQ', head) | |
if sign!=b'FSPQ': |
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 zipfile | |
import xxtea | |
import re | |
import os | |
# setXXTEAKeyAndSign | |
apk = zipfile.ZipFile("xxxx.apk", "r") | |
probe_file = [] |