# 🤔What is QSNCTF?
[青少年CTF训练平台](https://www.qsnctf.com/)是一个公益、免费、供给全国青少年学习、训练的CTF在线平台。
[(本仓库)](https://github.com/Moxin1044/qsnctf-python)qsnctf是青少年CTF训练平台进行编写的一个Python包程序,意图在Python中为大家快速使用一些CTF常用功能开发的开源包。这里有很多CTF常用功能,如Base编码、hash加密,甚至少见的社会主义核心价值观编码、quipqiup等都在其中。
注意:2023年01月09日发布的Ver:0.0.8.7已经支持了压缩包密码破解和下面的所有功能,Function的文档准备迁移至:https://docs.qsnctf.com/
首次发布时间预计于2022年01月10日,敬请期待。
如果您有好的想法和建议,欢迎与我取得联系:QQ:1044631097。
![Alt](https://repobeats.axiom.co/api/embed/351178f679198f07b9f9715948c6c3e011834759.svg "Repobeats analytics image")
## 文档
其他语种:[English](https://github.com/Moxin1044/qsnctf-python/blob/master/docs/README_en.md)
函数库:[使用说明](https://docs.qsnctf.com/qsnctf/41250.html)
## 安装
首先将GitHub上的项目下载下来后可以文件中有一个`setup.py`
打开终端然后输入
```bash
python setup.py install
```
或者也可以直接使用pip来进行安装**(由于本Python库仍在开发,所以pip可能不是最新版,如果您有较高的需求,可以直接clone本仓库进行安装)**
```bash
pip install qsnctf
```
安装成功会显示
`Successfully installed PyExecJS-1.5.1 qsnctf-0.0.4`
也可以使用以下命令来更新此库
```bash
pip install --upgrade qsnctf
```
如果你想知道具体怎么使用可以导入这个包,然后使用`help(qsnctf)`查看库的用法
```bash
>>> import qsnctf
>>> help(qsnctf)
Help on package qsnctf:
NAME
qsnctf
PACKAGE CONTENTS
base
crypto
hash
main
misc
uuid
FILE
c:\users\xiniyi\appdata\local\programs\python\python39\lib\site-packages\qsnctf-0.0.4-py3.9.egg\qsnctf\__init__.py
```
然后使用help(qsnctf.PACKAGE CONTENTS)来查看具体的使用方法
## 演示
查看`base`的使用方法
```bash
>>> help(qsnctf.base)
Help on module qsnctf.base in qsnct
NAME
qsnctf.base
DESCRIPTION
# Base编码解码功能
# 2023年1月1日
# 末心
FUNCTIONS
base16_decode(text)
base16_encode(text)
base32_decode(text)
base32_encode(text)
base64_decode(text)
base64_encode(text)
base85_decode(text)
>>>
```
# 功能列表
### BASE
| base16 | base32 | base36 | base58 | base62 |
| :----------: | :----: | :----: | :----: | :-----: |
| base64 | base85 | base91 | base92 | base100 |
| 自定义base64 | | | | |
### CRYPTO
| 凯撒密码 | 凯撒爆破 | 培根密码 | ROT5 | ROT13 |
| :------: | :------: | :--------: | :--------------------: | :---: |
| ROT18 | 八卦密码 | 埃特巴什码 | 摩斯密码(支持自定义) | |
### MD5
| md5 | sha1 | sha224 | sha256 | sha384 |
| :------: | :------: | :------: | :---------: | :------: |
| sha512 | shake128 | shake256 | HMAC-SHA256 | sha3-224 |
| sha3-256 | sha3-385 | sha3-512 | | |
### MISC
| 核心价值观加密解密 | 文本逆向 | url加密解密 | 位异或 | 文本逆向(步长2) |
| :--------------------: | :--------: | :---------: | :---------: | :---------------: |
| 文本逆向(自定义步长) | 获取uuid | ord转字符串 | 字符串转ord | 字符串分割 |
| flag寻找 | 百家姓编码 | Qwerty编码 | HTM编码 | JSFUCK |
| AAencode | str2hex | hex2str | ZIP密码爆破 | ZIP解压缩(高级) |
### API
| quipqiup词频分析 | 飞书Webhook | 钉钉Talk | 微步在线 | FOFA |
| :--------------: | :---------: | :--------: | :------: | :--: |
| 大圣云沙箱 | 零零信安 | Go-CQ-HTTP | | |
### WEB
| 目录扫描 | 网站存活检测 | 取网站标题 | 子域名扫描 | 取网站描述 |
| :----------: | :-----------: | :-------------: | :--------: | :------------: |
| 取网站关键字 | 取网站ICP | 取网站a标签地址 | 取网站注释 | 取网站响应时间 |
| 取网站ICO | POST Webshell | GET Webshell | exec-shell | eval-shell |
| WebShell爆破 | | | | |
# 具体使用
## 命令行使用
第一步导入`qsnctf`库
```python
from qsnctf import *
```
例如需要使用`base64`编码
```python
base64_encode("需要编码的")# 6ZyA6KaB57yW56CB55qE
```
相同如果使用`base64`解码的话就是
```python
base64_decode("6ZyA6KaB57yW56CB55qE")# 需要编码的
```
其他的编码解码类似
------
## 编译器使用
这里还是使用base64来演示,其他的编码解码类似。
```python
from qsnctf import qsnctf
a=base64_encode("需要编码的")
print(a)
b=base64_decode("6ZyA6KaB57yW56CB55qE")
print(b)
```
`返回信息`
需要编码的
```
6ZyA6KaB57yW56CB55qE
```
**Base62的encode值应该是整数!**
```python
from qsnctf import qsnctf
a = base62_encode(34441886726)
print(a)
b = base62_decode("base62")
print(b)
```
## 传参方法
文档移动到:[Function.md](https://github.com/Moxin1044/qsnctf-python/blob/master/docs/Function.md)
## 环境
### 开发环境
`Windows11 + Python3.11 + PyCharm 2022.3.1 (Professional Edition)`
### 使用环境
支持 `python 3.x` 环境。
文档持续更新。
## ✨ Contributors
感谢下面的所有人:
<table>
<tr>
<td align="center"><a href="https://github.com/Moxin1044"><img src="https://avatars.githubusercontent.com/u/59173630?v=4" width="100px;" alt=""/><br /><sub><b>Moxin</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/wang256814742"><img src="https://avatars.githubusercontent.com/u/75202489?v=4" width="100px;" alt=""/><br /><sub><b>xinyi</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/yiye-yfs"><img src="https://avatars.githubusercontent.com/u/79006318?v=4" width="100px;" alt=""/><br /><sub><b>yiye-yfs</b></sub></a><br /></td>
</tr>
</table>
Raw data
{
"_id": null,
"home_page": "https://github.com/Moxin1044/qsnctf-python",
"name": "qsnctf",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Moxin",
"author_email": "1044631097@qq.com",
"download_url": "https://files.pythonhosted.org/packages/bb/6c/304ac174612411803b3cbd1c0c32877d11aa2e0e04a3053a7301b394a47c/qsnctf-0.0.8.10.tar.gz",
"platform": null,
"description": "# \ud83e\udd14What is QSNCTF\uff1f\n\n[\u9752\u5c11\u5e74CTF\u8bad\u7ec3\u5e73\u53f0](https://www.qsnctf.com/)\u662f\u4e00\u4e2a\u516c\u76ca\u3001\u514d\u8d39\u3001\u4f9b\u7ed9\u5168\u56fd\u9752\u5c11\u5e74\u5b66\u4e60\u3001\u8bad\u7ec3\u7684CTF\u5728\u7ebf\u5e73\u53f0\u3002\n\n[\uff08\u672c\u4ed3\u5e93\uff09](https://github.com/Moxin1044/qsnctf-python)qsnctf\u662f\u9752\u5c11\u5e74CTF\u8bad\u7ec3\u5e73\u53f0\u8fdb\u884c\u7f16\u5199\u7684\u4e00\u4e2aPython\u5305\u7a0b\u5e8f\uff0c\u610f\u56fe\u5728Python\u4e2d\u4e3a\u5927\u5bb6\u5feb\u901f\u4f7f\u7528\u4e00\u4e9bCTF\u5e38\u7528\u529f\u80fd\u5f00\u53d1\u7684\u5f00\u6e90\u5305\u3002\u8fd9\u91cc\u6709\u5f88\u591aCTF\u5e38\u7528\u529f\u80fd\uff0c\u5982Base\u7f16\u7801\u3001hash\u52a0\u5bc6\uff0c\u751a\u81f3\u5c11\u89c1\u7684\u793e\u4f1a\u4e3b\u4e49\u6838\u5fc3\u4ef7\u503c\u89c2\u7f16\u7801\u3001quipqiup\u7b49\u90fd\u5728\u5176\u4e2d\u3002\n\n\u6ce8\u610f\uff1a2023\u5e7401\u670809\u65e5\u53d1\u5e03\u7684Ver:0.0.8.7\u5df2\u7ecf\u652f\u6301\u4e86\u538b\u7f29\u5305\u5bc6\u7801\u7834\u89e3\u548c\u4e0b\u9762\u7684\u6240\u6709\u529f\u80fd\uff0cFunction\u7684\u6587\u6863\u51c6\u5907\u8fc1\u79fb\u81f3\uff1ahttps://docs.qsnctf.com/\n\n\u9996\u6b21\u53d1\u5e03\u65f6\u95f4\u9884\u8ba1\u4e8e2022\u5e7401\u670810\u65e5\uff0c\u656c\u8bf7\u671f\u5f85\u3002\n\n\u5982\u679c\u60a8\u6709\u597d\u7684\u60f3\u6cd5\u548c\u5efa\u8bae\uff0c\u6b22\u8fce\u4e0e\u6211\u53d6\u5f97\u8054\u7cfb\uff1aQQ\uff1a1044631097\u3002\n\n![Alt](https://repobeats.axiom.co/api/embed/351178f679198f07b9f9715948c6c3e011834759.svg \"Repobeats analytics image\")\n\n## \u6587\u6863\n\n\u5176\u4ed6\u8bed\u79cd\uff1a[English](https://github.com/Moxin1044/qsnctf-python/blob/master/docs/README_en.md)\n\n\u51fd\u6570\u5e93\uff1a[\u4f7f\u7528\u8bf4\u660e](https://docs.qsnctf.com/qsnctf/41250.html)\n\n## \u5b89\u88c5\n\n\u9996\u5148\u5c06GitHub\u4e0a\u7684\u9879\u76ee\u4e0b\u8f7d\u4e0b\u6765\u540e\u53ef\u4ee5\u6587\u4ef6\u4e2d\u6709\u4e00\u4e2a`setup.py`\n\n\u6253\u5f00\u7ec8\u7aef\u7136\u540e\u8f93\u5165\n\n```bash\npython setup.py install\n```\n\n\u6216\u8005\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528pip\u6765\u8fdb\u884c\u5b89\u88c5**\uff08\u7531\u4e8e\u672cPython\u5e93\u4ecd\u5728\u5f00\u53d1\uff0c\u6240\u4ee5pip\u53ef\u80fd\u4e0d\u662f\u6700\u65b0\u7248\uff0c\u5982\u679c\u60a8\u6709\u8f83\u9ad8\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u76f4\u63a5clone\u672c\u4ed3\u5e93\u8fdb\u884c\u5b89\u88c5\uff09**\n\n```bash\npip install qsnctf\n```\n\n\u5b89\u88c5\u6210\u529f\u4f1a\u663e\u793a\n\n`Successfully installed PyExecJS-1.5.1 qsnctf-0.0.4`\n\n\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0\u6b64\u5e93\n\n```bash\npip install --upgrade qsnctf\n```\n\n\u5982\u679c\u4f60\u60f3\u77e5\u9053\u5177\u4f53\u600e\u4e48\u4f7f\u7528\u53ef\u4ee5\u5bfc\u5165\u8fd9\u4e2a\u5305\uff0c\u7136\u540e\u4f7f\u7528`help(qsnctf)`\u67e5\u770b\u5e93\u7684\u7528\u6cd5\n\n```bash\n>>> import qsnctf\n>>> help(qsnctf)\nHelp on package qsnctf:\n\nNAME\n qsnctf\n\nPACKAGE CONTENTS\n base\n crypto\n hash\n main\n misc\n uuid\n\nFILE\n c:\\users\\xiniyi\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\qsnctf-0.0.4-py3.9.egg\\qsnctf\\__init__.py\n```\n\n\u7136\u540e\u4f7f\u7528help(qsnctf.PACKAGE CONTENTS)\u6765\u67e5\u770b\u5177\u4f53\u7684\u4f7f\u7528\u65b9\u6cd5\n\n## \u6f14\u793a\n\n\u67e5\u770b`base`\u7684\u4f7f\u7528\u65b9\u6cd5\n\n```bash\n>>> help(qsnctf.base) \nHelp on module qsnctf.base in qsnct\n \nNAME \n qsnctf.base \n \nDESCRIPTION \n # Base\u7f16\u7801\u89e3\u7801\u529f\u80fd \n # 2023\u5e741\u67081\u65e5 \n # \u672b\u5fc3 \n \nFUNCTIONS \n base16_decode(text) \n \n base16_encode(text) \n \n base32_decode(text) \n \n base32_encode(text) \n \n base64_decode(text) \n \n base64_encode(text) \n \n base85_decode(text)\n>>>\n```\n\n\n# \u529f\u80fd\u5217\u8868\n\n### BASE\n\n| base16 | base32 | base36 | base58 | base62 |\n| :----------: | :----: | :----: | :----: | :-----: |\n| base64 | base85 | base91 | base92 | base100 |\n| \u81ea\u5b9a\u4e49base64 | | | | |\n\n### CRYPTO\n\n| \u51ef\u6492\u5bc6\u7801 | \u51ef\u6492\u7206\u7834 | \u57f9\u6839\u5bc6\u7801 | ROT5 | ROT13 |\n| :------: | :------: | :--------: | :--------------------: | :---: |\n| ROT18 | \u516b\u5366\u5bc6\u7801 | \u57c3\u7279\u5df4\u4ec0\u7801 | \u6469\u65af\u5bc6\u7801\uff08\u652f\u6301\u81ea\u5b9a\u4e49\uff09 | |\n\n### MD5\n\n| md5 | sha1 | sha224 | sha256 | sha384 |\n| :------: | :------: | :------: | :---------: | :------: |\n| sha512 | shake128 | shake256 | HMAC-SHA256 | sha3-224 |\n| sha3-256 | sha3-385 | sha3-512 | | |\n\n\n\n### MISC\n\n| \u6838\u5fc3\u4ef7\u503c\u89c2\u52a0\u5bc6\u89e3\u5bc6 | \u6587\u672c\u9006\u5411 | url\u52a0\u5bc6\u89e3\u5bc6 | \u4f4d\u5f02\u6216 | \u6587\u672c\u9006\u5411\uff08\u6b65\u957f2\uff09 |\n| :--------------------: | :--------: | :---------: | :---------: | :---------------: |\n| \u6587\u672c\u9006\u5411\uff08\u81ea\u5b9a\u4e49\u6b65\u957f\uff09 | \u83b7\u53d6uuid | ord\u8f6c\u5b57\u7b26\u4e32 | \u5b57\u7b26\u4e32\u8f6cord | \u5b57\u7b26\u4e32\u5206\u5272 |\n| flag\u5bfb\u627e | \u767e\u5bb6\u59d3\u7f16\u7801 | Qwerty\u7f16\u7801 | HTM\u7f16\u7801 | JSFUCK |\n| AAencode | str2hex | hex2str | ZIP\u5bc6\u7801\u7206\u7834 | ZIP\u89e3\u538b\u7f29\uff08\u9ad8\u7ea7\uff09 |\n\n### API\n\n| quipqiup\u8bcd\u9891\u5206\u6790 | \u98de\u4e66Webhook | \u9489\u9489Talk | \u5fae\u6b65\u5728\u7ebf | FOFA |\n| :--------------: | :---------: | :--------: | :------: | :--: |\n| \u5927\u5723\u4e91\u6c99\u7bb1 | \u96f6\u96f6\u4fe1\u5b89 | Go-CQ-HTTP | | |\n### WEB\n\n| \u76ee\u5f55\u626b\u63cf | \u7f51\u7ad9\u5b58\u6d3b\u68c0\u6d4b | \u53d6\u7f51\u7ad9\u6807\u9898 | \u5b50\u57df\u540d\u626b\u63cf | \u53d6\u7f51\u7ad9\u63cf\u8ff0 |\n| :----------: | :-----------: | :-------------: | :--------: | :------------: |\n| \u53d6\u7f51\u7ad9\u5173\u952e\u5b57 | \u53d6\u7f51\u7ad9ICP | \u53d6\u7f51\u7ad9a\u6807\u7b7e\u5730\u5740 | \u53d6\u7f51\u7ad9\u6ce8\u91ca | \u53d6\u7f51\u7ad9\u54cd\u5e94\u65f6\u95f4 |\n| \u53d6\u7f51\u7ad9ICO | POST Webshell | GET Webshell | exec-shell | eval-shell |\n| WebShell\u7206\u7834 | | | | |\n\n# \u5177\u4f53\u4f7f\u7528\n\n## \u547d\u4ee4\u884c\u4f7f\u7528\n\n\u7b2c\u4e00\u6b65\u5bfc\u5165`qsnctf`\u5e93\n\n```python\nfrom qsnctf import *\n```\n\n\u4f8b\u5982\u9700\u8981\u4f7f\u7528`base64`\u7f16\u7801\n\n```python\nbase64_encode(\"\u9700\u8981\u7f16\u7801\u7684\")# 6ZyA6KaB57yW56CB55qE\n```\n\n\u76f8\u540c\u5982\u679c\u4f7f\u7528`base64`\u89e3\u7801\u7684\u8bdd\u5c31\u662f\n\n```python\n base64_decode(\"6ZyA6KaB57yW56CB55qE\")# \u9700\u8981\u7f16\u7801\u7684\n```\n\n\u5176\u4ed6\u7684\u7f16\u7801\u89e3\u7801\u7c7b\u4f3c\n\n------\n\n## \u7f16\u8bd1\u5668\u4f7f\u7528\n\n\u8fd9\u91cc\u8fd8\u662f\u4f7f\u7528base64\u6765\u6f14\u793a\uff0c\u5176\u4ed6\u7684\u7f16\u7801\u89e3\u7801\u7c7b\u4f3c\u3002\n\n```python\nfrom qsnctf import qsnctf\n\na=base64_encode(\"\u9700\u8981\u7f16\u7801\u7684\")\nprint(a)\nb=base64_decode(\"6ZyA6KaB57yW56CB55qE\")\nprint(b)\n```\n\n`\u8fd4\u56de\u4fe1\u606f`\n\u9700\u8981\u7f16\u7801\u7684\n```\n6ZyA6KaB57yW56CB55qE\n\n```\n\n**Base62\u7684encode\u503c\u5e94\u8be5\u662f\u6574\u6570\uff01**\n\n```python\nfrom qsnctf import qsnctf\n\na = base62_encode(34441886726)\nprint(a)\nb = base62_decode(\"base62\")\nprint(b)\n```\n\n## \u4f20\u53c2\u65b9\u6cd5\n\n\u6587\u6863\u79fb\u52a8\u5230\uff1a[Function.md](https://github.com/Moxin1044/qsnctf-python/blob/master/docs/Function.md)\n\n## \u73af\u5883\n\n### \u5f00\u53d1\u73af\u5883\n\n`Windows11 + Python3.11 + PyCharm 2022.3.1 (Professional Edition)`\n\n### \u4f7f\u7528\u73af\u5883\n\n\u652f\u6301 `python 3.x` \u73af\u5883\u3002\n\n\u6587\u6863\u6301\u7eed\u66f4\u65b0\u3002\n\n## \u2728 Contributors\n\n\u611f\u8c22\u4e0b\u9762\u7684\u6240\u6709\u4eba\uff1a\n\n<table>\n <tr>\n <td align=\"center\"><a href=\"https://github.com/Moxin1044\"><img src=\"https://avatars.githubusercontent.com/u/59173630?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Moxin</b></sub></a><br /></td>\n <td align=\"center\"><a href=\"https://github.com/wang256814742\"><img src=\"https://avatars.githubusercontent.com/u/75202489?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>xinyi</b></sub></a><br /></td>\n <td align=\"center\"><a href=\"https://github.com/yiye-yfs\"><img src=\"https://avatars.githubusercontent.com/u/79006318?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>yiye-yfs</b></sub></a><br /></td>\n </tr>\n</table>\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "\u9752\u5c11\u5e74CTF\u8bad\u7ec3\u5e73\u53f0\u63d0\u4f9b\u7684Python\u8f6f\u4ef6\u5305",
"version": "0.0.8.10",
"project_urls": {
"Homepage": "https://github.com/Moxin1044/qsnctf-python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f268c15b4953dacd1373943280f93560c4be1f0670af9fa1a07c03c6eb84816d",
"md5": "791ae950d928111366d344f610318843",
"sha256": "ebabfd1177e5b3e9ec1fa7c3e6fec0287652bb78fd8b7f367096afb5bada3d55"
},
"downloads": -1,
"filename": "qsnctf-0.0.8.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "791ae950d928111366d344f610318843",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 35751,
"upload_time": "2023-08-26T02:38:06",
"upload_time_iso_8601": "2023-08-26T02:38:06.491257Z",
"url": "https://files.pythonhosted.org/packages/f2/68/c15b4953dacd1373943280f93560c4be1f0670af9fa1a07c03c6eb84816d/qsnctf-0.0.8.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bb6c304ac174612411803b3cbd1c0c32877d11aa2e0e04a3053a7301b394a47c",
"md5": "da2954a1f369b3d857c2678f03501234",
"sha256": "035976963aa96bb536c1f3d0d36d2d86a2186555b0ae18c4a37a1ec3b8429e74"
},
"downloads": -1,
"filename": "qsnctf-0.0.8.10.tar.gz",
"has_sig": false,
"md5_digest": "da2954a1f369b3d857c2678f03501234",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 35688,
"upload_time": "2023-08-26T02:38:08",
"upload_time_iso_8601": "2023-08-26T02:38:08.597776Z",
"url": "https://files.pythonhosted.org/packages/bb/6c/304ac174612411803b3cbd1c0c32877d11aa2e0e04a3053a7301b394a47c/qsnctf-0.0.8.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-26 02:38:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Moxin1044",
"github_project": "qsnctf-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "qsnctf"
}