Skip to content

Instantly share code, notes, and snippets.

View TransparentLC's full-sized avatar
🐟
Touching fish _(:зゝ∠)_

✨小透明・宸✨ TransparentLC

🐟
Touching fish _(:зゝ∠)_
View GitHub Profile
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>522: Connection timed out</title>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://cloudflare-dns.com/cdn-cgi/styles/main.css">
@TransparentLC
TransparentLC / maimai_py_arcade_credential.py
Created October 10, 2025 17:11
在 maimai.py 使用的加密的机台 PlayerIdentifier 的 credentials 和用户 ID 之间互转
import base64
import hmac
import os
import time
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
# maimai.py/maimai-ffi 直接使用了 cryptography.Fernet 对用户 ID 进行加密
# 实际的密文格式如下
# https://github.com/fernet/spec/blob/master/Spec.md
import asyncio
import httpx
import ipaddress
import orjson
import re
import sys
import urllib.parse
from datetime import datetime, timezone, timedelta
async def hookRaiseForStatus(r: httpx.Response):
import sys
from PIL import Image
if len(sys.argv) < 2:
print(f'Usage: python3 {sys.argv[0]} /path/to/image [/path/to/output]')
sys.exit(1)
f = sys.stdout if len(sys.argv) < 3 else open(sys.argv[2], 'w', encoding='utf-8')
literal = False
import re
import requests
s = requests.Session()
r = s.get('https://moderatecontent.com/')
logid = re.search(r"var log_id = '([\da-f]+)';", r.text).group(1)
# r = s.post(
# 'https://moderatecontent.com/api/upload.php',
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\miniserve]
@="使用 Miniserve 共享文件夹"
[HKEY_CLASSES_ROOT\Directory\Background\shell\miniserve\command]
@="miniserve --hide-theme-selector --dirs-first --enable-tar --enable-tar-gz --enable-zip --show-wget-footer --readme --verbose \"%V\""
// https://github.com/terser/html-minifier-terser#options-quick-reference
const htmlMinifierConfig = {
collapseWhitespace: true,
collapseBooleanAttributes: true,
decodeEntities: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
removeEmptyAttributes: true,
@TransparentLC
TransparentLC / vscode-powermode-particles.js
Last active February 24, 2022 09:41
Generate animated particle svgs for VSCode extension "vscode-power-mode".
const count = 10;
const size = 5;
const duration = 1000;
const random = (a, b) => Math.random() * (b - a) + a;
let svg = Array(count).fill().map(() => {
const sizeR = Math.round(size * random(.6, 1.2), 2);
const startX = Math.round(100 - size / 2 + size * random(-1, 1), 2);
const startY = Math.round(100 - size / 2 + size * random(-1, 1), 2);
@TransparentLC
TransparentLC / transfersh.py
Last active October 10, 2022 04:54
CLI of https://transfer.sh/ with encryption support.
#!/usr/bin/env python3
import argparse
import hashlib
import os
import secrets
import requests
import typing
from Crypto.Cipher import AES
@TransparentLC
TransparentLC / multi-watcher.py
Last active April 23, 2023 01:57
在一些账号有更新时使用 Windows 的通知卡片发送提醒
import abc
import bs4
import csv
import dataclasses
import functools
import hashlib
import lxml.etree
import orjson
import os
import re