Hook SM-crypto
# Hook_SMcrypto.js โ Extract SM algorithm parameters
Hooks the SM2, SM3, and SM4 algorithms in SM-crypto.
Thanks to @Hosinoharu (opens new window) for the idea and initial script.
# Supported algorithms
| Algorithm | Type |
|---|---|
| SM2 | Asymmetric encryption |
| SM3 | Hashing |
| SM4 | Symmetric encryption |
# When to use it
If a website's requests or responses contain encrypted parameters, enable this script to help analyze the encryption quickly. Example output:

# Frequently asked questions
# Why is there no console output after enabling the script?
console.logmay have been disabled
Try enabling hook log to prevent JavaScript from overwriting the logging method.
- The website does not use SM-crypto for encryption
This script only logs cryptographic operations performed by SM-crypto. If the website uses another library for encryption or decryption, it will produce no output. If you have confirmed that the website uses SM-crypto but still see no output, contact me (WeChat: I-0xsdeo).