Skip to content

Instantly share code, notes, and snippets.

View Liki4's full-sized avatar
:octocat:
Boop!

Liki4 Liki4

:octocat:
Boop!
View GitHub Profile
@Liki4
Liki4 / ALGO-KEEP-ENKZIP.MD
Last active May 22, 2026 15:50
Decrypt Keep App enkzip data

算法总结

enkzip 格式:<nonce_b64url>.<ciphertext+tag_b64url>,其中两部分都使用 base64url(无填充)编码。

加解密流程(Enigma.b.a / Enigma.b.b):

  1. 取 user_id:从 Authorization: Bearer 的 JWT payload 中读取 _id(24 位 ObjectId hex),见 libenigmaa.so.c:8958 中的 JWT 解析。
  2. 派生 AES 密钥:将 user_id 左旋 13 字节 → user_id[13:] + user_id[:13],对其做 MD5,把 16 字节摘要转成 32 位小写 hex,再以 ASCII 字节序列作为 AES‑256 密钥(32 字节)。libenigmaa.so.c:6693 中的反编译用 MD5 初值(0x67452301/0xefcdab89/0x98badcfe/0x10325476)和最后一个块拼接 param_2[0:8] + param_2[5:13] 到 offset 11/16,正好把原 _id 旋转成上述形式。
  3. AES‑256‑GCM:12 字节 nonce、空 AAD、16 字节 tag。libenigmaa.so.c:8025/8347 是 J0 = nonce‖0x00000001、E_K(J0) 做 tag mask 的标准 GCM。

Picture Share gist repo

@Liki4
Liki4 / worker.js
Created February 11, 2025 02:30
cmd5 telegram webhook bot deploy on cloudflare
/**
* https://github.com/cvzi/telegram-bot-cloudflare
*/
const TOKEN = ENV_BOT_TOKEN // Get it from @BotFather https://core.telegram.org/bots#6-botfather
const WEBHOOK = '/endpoint'
const SECRET = ENV_BOT_SECRET // A-Z, a-z, 0-9, _ and -
const EMAIL = ENV_CMD5_EMAIL
const KEY = ENV_CMD5_KEY
<config>
<input>
<jar in="Woodpecker-plugin.jar" out="Woodpecker-plugin-obf.jar"/>
</input>
<classpath>
<jar name="woodpecker-sdk-0.3.0.jar"/>
<jar name="woodpecker-tools-0.1.1.jar"/>
<jar name="javassist-3.30.2-GA.jar"/>
</classpath>
@Liki4
Liki4 / decrypt_dbvis.py
Last active April 19, 2024 03:41 — forked from gerry/decrypt_dbvis.py
A quick hack to extract and decrypt credentials from DbVisualizer config files.
#!/usr/bin/env python
# decrypt_dbvis.py ~ gerry@twitter.com
# DbVisualizer uses PBEWithMD5AndDES with a static key to store passwords.
# This is a quick hack to extract and decrypt credentials from DbVisualizer config files.
# Tested against DbVisualizer Free 9.0.9 and 9.1.6
"""
[2014-03-25 02:05:30][not-the-sea workspace]$ security/p/gerry/misc/decrypt_dbvis.py
[+] DbVisualizer Password Extractor and Decryptor (@gerryeisenhaur)
[+] Additional Usage Options:
[+] security/p/gerry/misc/decrypt_dbvis.py <config filename>

first-time boot

# disable SELinux and firewalld
sudo sed -i s/^SELINUX=.*$/SELINUX=permissive/ /etc/selinux/config
sudo systemctl disable firewalld
sudo sed -i 's|# %wheel|%wheel|g' /etc/sudoers

sudo reboot
@Liki4
Liki4 / Android_CN.sh
Created December 13, 2022 03:30 — forked from chenyiping1995/Android_CN.sh
Changes the NTP server and Captive Portal Server for Chinese users.
# Settings to the NTP server since Android 4.0
adb -d shell settings put global ntp_server time.pool.aliyun.com
# Android 4.2 - 6.0.1
adb -d shell settings put global captive_portal_detection_enabled 1
adb -d shell settings put global captive_portal_server www.google.cn
# Android 7.0 - 7.1
adb -d shell settings put global captive_portal_detection_enabled 1
adb -d shell settings put global captive_portal_use_https 1
@Liki4
Liki4 / install_pwndbg.md
Created December 13, 2022 03:30 — forked from niklaskeerl/install_pwndbg.md
Install pwndbg and gdb on arch linux

How to install pwndbg and gdb on arch linux

sudo pacman -S gdb
sudo pacman -S pwndbg
echo 'source /usr/share/pwndbg/gdbinit.py' >> ~/.gdbinit
@Liki4
Liki4 / ohmyzsh.md
Created December 13, 2022 03:29 — forked from yovko/ohmyzsh.md
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

@Liki4
Liki4 / keys.txt
Created November 12, 2022 05:21 — forked from f0r34chb3t4/keys.txt
Proxifier.txt
Portable Version KEYS:
P6Z3T-UYJC9-YAK3F-APN9M-6ZDSD
FGZPK-93CWX-Q33Y6-D5URV-YXC3X
9CZQX-9YAQA-PF33L-XVUQH-NSD48
8RZ3L-H3Y5L-W2RY5-Z5M8N-C7Z2U
CCZNU-LW3LF-K9V2T-MYZFF-94667
EWZM6-3W4UX-KH922-C96GK-VGBH2
Standard Version KEYS:
4AZNW-S2YHE-LLMWM-J6EL8-7QKDL