Metadata-Version: 2.4
Name: ret2shell-steganography
Version: 0.1.1
Summary: 回归终端使用的动态flag隐写库
Author-email: Zonglin Xiao <xiaozonglin@stu.xidian.edu.cn>
Project-URL: Homepage, https://github.com/Xiaozonglin/ret2shell-steganography
Project-URL: Bug Tracker, https://github.com/Xiaozonglin/ret2shell-steganography/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pycryptodome
Requires-Dist: Crypto
Requires-Dist: uuid
Dynamic: license-file

# Ret2Shell Steganography

### How to use?

```
pip install ret2shell-steganography
```

leet mode
```python
from ret2shell_steganography import LeetStego
# 初始化一个密钥，需要与平台上设置的相同
stego = LeetStego("your_secret_key")

# 定义 Flag 模板，获取ID（team_id优先，user_id次之）
template = "this-is-an-example"
data_id = 12345

# 生成 Flag 内容
encoded = stego.encode(template, data_id)
print(f"编码结果 {encoded}")

# 解码验证
decoded = stego.decode(template, encoded)
print(f"解码结果 {decoded}")  # 12345
```

uuid mode
```python
from ret2shell_steganography import UUIDStego

# 初始化（带连字符格式）
uuid_stego = UUIDStego("your_secret_key", with_hyphen=True)

template = "this-is-an-example"
data_id = 12345

# 生成 UUID
encoded = uuid_stego.encode(template, data_id)
print(f"UUID: {encoded}")

# 解码
decoded = uuid_stego.decode(template, encoded)
print(f"解码结果: {decoded}")  # 12345
```
