函数库 - 我应该如何使用 由于Base、各种加密的方法较多,传参方法也花样百出。这里给大家写出这个文档方便参考,包含了供给大家使用的函数的说明、注意事项、参数和返回值等信息。
Scan class-DirScan DirScan 函数名 返回类型 位置 说明 DirScan list web.py 网站目录扫描 参数名 是否可空 传参类型 说明 url False string 网站地址,格式:https://bbs.qsnctf.com 如果后面存在/会自动删去 threadline True int 线程数(需要传整数)不可以太高了哦 默认10线程 sleep_time True int 每次扫描间隔时间 默认是0 dirlist True list DirScan的列表,格式[‘/www.zip’,‘/index.php’] 默认扫描库路径下的/plugin/txt/dirs.txt中的内容 return_code True list 返回结果的状态列表,格式[200, 301, 302, 401, 403, 500] ,格式也是默认值 echo True Boolean 是否直接输出扫描结果 默认值为False wait True Boolean 是否等待线程结束 默认值为True Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 from qsnctf import *dir = DirScan('https://bbs.qsnctf.com/' , 10 , 0.5 )print (dir .results_code) print (dir .results) DirScan('https://bbs.qsnctf.com/' , 100 , 0.1 , echo=True ) """ https://bbs.qsnctf.com/admin.php 200 https://bbs.qsnctf.com/robots.txt 200 https://bbs.qsnctf.com/sitemap.txt 200 https://bbs.qsnctf.com/home.php 200 https://bbs.qsnctf.com/sitemap.xml 200 https://bbs.qsnctf.com/index.php 200 https://bbs.qsnctf.com/install/ 403 """
class-UrlScan UrlScan 函数名 返回类型 位置 说明 UrlScan list web.py 网站状态扫描 参数名 是否可空 传参类型 说明 url_list False string 网站地址,格式:https://bbs.qsnctf.com 如果后面存在/会自动删去 threadline True int 线程数(需要传整数)不可以太高了哦 默认10线程 sleep_time True int 每次扫描间隔时间 默认是0 return_code True list 返回结果的状态列表,格式[200, 301, 302, 401, 403, 404, 500] ,格式也是默认值 echo True Boolean 是否直接输出扫描结果 默认值为False wait True Boolean 是否等待线程结束 默认值为True Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 7 8 9 10 11 12 13 from qsnctf import *list = ["https://bbs.qsnctf.com/admin.php" , "https://bbs.qsnctf.com/robots.txt" , "https://www.qsnctf.com/" ]dir = UrlScan(list , 10 , 0.5 )print (dir .results_code) print (dir .results) UrlScan(list , 100 , 0.1 , echo=True ) """ https://bbs.qsnctf.com/robots.txt 200 No Title https://bbs.qsnctf.com/admin.php 200 登录管理中心 https://www.qsnctf.com/ 200 青少年CTF训练平台 | 原中学生CTF平台 | 青少年CTF """
说明:No Title是没有找到HTML网页中的Title标签
class-DomainScan DomainScan 函数名 返回类型 位置 说明 DomainScan list web.py 子域名扫描 参数名 是否可空 传参类型 说明 domain False string 网站域名,格式:qsnctf.com threadline True int 线程数(需要传整数)不可以太高了哦 默认10线程 sleep_time True int 每次扫描间隔时间 默认是0 domainlist True list 扫描的子域名列表,格式[‘abc’,‘www’] 默认扫描库路径下的/plugin/txt/domain.txt中的内容 return_code True list 返回结果的状态列表,格式[200, 301, 302, 401, 403, 404, 500] ,格式也是默认值 echo True Boolean 是否直接输出扫描结果 默认值为False wait True Boolean 是否等待线程结束 默认值为True
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 7 8 from qsnctf import *a = DomainScan("qsnctf.com" ) print (a.results_title)print (a.results)
取网站信息 取网站标题 get_url_title 函数名 返回类型 位置 说明 get_url_title string web.py 取网站标题 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *a = get_url_title("https://www.baidu.com/" ) print (a)
说明:No Title是没有找到HTML网页中的Title标签
取网站描述 get_url_description 函数名 返回类型 位置 说明 get_url_description string web.py 取网站描述 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_description('https://www.qsnctf.com/' ) print (a)
说明:No description是没有找到HTML网页中的description标签
取网站关键词 get_url_keywords 函数名 返回类型 位置 说明 get_url_keywords string web.py 取网站关键字 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_keywords('https://www.qsnctf.com/' ) print (a)
说明:No keywords是没有找到HTML网页中的keywords标签
取网站ICP备案号 get_url_ICP 函数名 返回类型 位置 说明 get_url_ICP string web.py 取网站ICP备案号 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_ICP('https://www.qsnctf.com/' ) print (a)
说明:No ICP是没有找到HTML网页中的ICP标签
取网站中的href地址 get_url_a_href 函数名 返回类型 位置 说明 get_url_a_href list web.py 取网站a标签的href 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_a_href('https://www.qsnctf.com/' ) print (a)
说明:No href是没有找到HTML网页中的href标签
取网站中的URL地址 get_url_img 函数名 返回类型 位置 说明 get_url_img list web.py 取网站img 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_a_href('https://www.qsnctf.com/' ) print (a)
说明:No src是没有找到HTML网页中的src标签
取网站的注释 函数名 返回类型 位置 说明 get_url_comment list web.py 取网站中注释 参数名 是否可空 传参类型 说明 url False string 网站地址 Cookie True string 网站Cookie,可空
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_comment('https://www.qsnctf.com/' ) print (a)
说明:No comment是没有找到HTML网页中的注释节点
取网站响应时间 get_url_time 函数名 返回类型 位置 说明 get_url_time string web.py 取网站响应时间 参数名 是否可空 传参类型 说明 url False string 网站地址
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_time('https://www.qsnctf.com/' ) print (a)
取网站的ICO get_url_ico 函数名 返回类型 位置 说明 get_url_ico string web.py 取网站ico地址 参数名 是否可空 传参类型 说明 url False string 网站地址
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_url_ico('https://www.qsnctf.com/' ) print (a)
WebShell操作 此功能仅限CTF和管理自己的网站使用,请勿用于非法用途。
POST方式测试WebShell密码 get_webshell_post 函数名 返回类型 位置 说明 get_webshell_post string web.py 测试Webshell 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_webshell_post('http://localhost/shell.php' , 'cmd' ) print (a)
GET方式测试WebShell密码 get_webshell_get 函数名 返回类型 位置 说明 get_webshell_get string web.py 测试Webshell 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_webshell_get('http://localhost/shell.php' , 'cmd' ) print (a)
exec-webshell命令执行(POST) get_exec_webshell_post 函数名 返回类型 位置 说明 get_exec_webshell_post string web.py exec命令执行 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key shell Fasle string 执行的命令
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_exec_webshell_post('http://localhost/shell.php' , 'cmd' , 'whoami' ) print (a)
exec-webshell命令执行(get) get_exec_webshell_get 函数名 返回类型 位置 说明 get_exec_webshell_get string web.py exec命令执行 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key shell Fasle string 执行的命令
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_exec_webshell_get('http://localhost/shell.php' , 'cmd' , 'whoami' ) print (a)
eval-webshell代码执行(get) get_eval_webshell_get 函数名 返回类型 位置 说明 get_eval_webshell_get string web.py eval代码执行 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key shell Fasle string 执行的代码
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_eval_webshell_get('http://localhost/shell.php' , 'cmd' , 'print("123");' ) print (a)
eval-webshell代码执行(post) get_eval_webshell_post 函数名 返回类型 位置 说明 get_eval_webshell_post string web.py eval代码执行 参数名 是否可空 传参类型 说明 url False string shell地址 key False string key shell Fasle string 执行的代码
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = get_eval_webshell_post('http://localhost/shell.php' , 'cmd' , 'print("123");' ) print (a)
WebShell爆破 WebShellCracking 函数名 返回类型 位置 说明 WebShellCracking string web.py WebShell密码爆破 参数名 是否可空 传参类型 说明 url False string shell地址 threadline False int 线程数 sleep_time Fasle int 访问延时 passlist False list 可能的密码列表 mode False string GET or POST 默认 POST
说明:请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *a = WebShellCracking('http://localhost/shell.php' , threadline=50 ,mode="GET" ) print (a.results)
quipqiup class-quipqiup quipqiup 函数名 返回类型 位置 说明 quipqiup string、json、list api.py quipqiup 词频分析(需联网) 参数名 是否可空 传参类型 说明 ciphertext False string 分析的内容 clues True string 分析线索,默认为空,For example G=R QVW=THE
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *a = quipqiup('test' ) print (a.text) print (a.json) print (a.list )
飞书Webhook class-FeishuWebhook FeishuWebhook 函数名 返回类型 位置 说明 FeishuWebhook None api.py 飞书Webhook通知 参数名 是否可空 传参类型 说明 title False string 通知的标题 message False string 通知的消息 token False string 飞书的Token,取飞书机器人/v2/hook/后面的内容 send_type False string 发送的类型:text、card 分别为文本消息和卡片消息
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *FeishuWebhook('青少年CTF' , '你好,我是末心' , 'xxxx-xxxxx-xxxx-xxxx-xxxxx' ,'card' )
DingTalk class-DingTalk DingTalk 函数名 返回类型 位置 说明 DingTalk None api.py 钉钉Webhook通知 参数名 是否可空 传参类型 说明 title False string 通知的标题 message False string 通知的消息 token False string 钉钉的Token
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *DingTalk('青少年CTF' , '你好,我是末心' , 'xxxx-xxxxx-xxxx-xxxx-xxxxx' )
微步在线 class-ThreatBook ThreatBook 函数名 返回类型 位置 说明 ThreatBook object api.py 微步在线 参数名 是否可空 传参类型 说明 api_key False string 微步在线API Key
API Key 获取地址:https://x.threatbook.com/v5/myApi
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *tb = ThreatBook('***' )
微步-IP信誉 ip_reputation 函数名 返回类型 位置 说明 ip_reputation json api.py 微步在线IP信誉 参数名 是否可空 传参类型 说明 ip False string 需要查询的IP地址
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 from qsnctf import *tb = ThreatBook('***' ) a = tb.ip_reputation('127.0.0.1' ) print (a)
1 2 { 'data': { '127.0 .0 .1 ': { 'severity': '无威胁', 'judgments': [ '白名单', '保留地址'] , 'tags_classes': [ ] , 'basic': { 'carrier': '', 'location': { 'country': '', 'province': '', 'city': '', 'lng': '', 'lat': '', 'country_code': 'B1'} } , 'asn': { } , 'scene': '', 'confidence_level': '高', 'is_malicious': False, 'update_time': '2023 -01 -05 18 : 41 : 54 '} } , 'response_code': 0 , 'verbose_msg': '成功'}
文件上传分析 file_upload 函数名 返回类型 位置 说明 file_upload json api.py 微步文件反病毒引擎检测报告 参数名 是否可空 传参类型 说明 file_path False string 上传的路径 file_name False string 需要上传的文件名 sandbox_type True string 沙箱环境,默认win7_sp1_enx64_office2013
沙箱运行环境,用户可以指定文件的沙箱运行环境,可选环境包括:
Windows win7_sp1_enx64_office2013 win7_sp1_enx86_office2013 win7_sp1_enx86_office2010 win7_sp1_enx86_office2007 win7_sp1_enx86_office2003 Linux ubuntu_1704_x64 centos_7_x64 说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *tb = ThreatBook('***' ) a = tb.file_upload('./' ,'1.exe' ) print (a)
微步文件反病毒引擎检测报告 file_report_multiengines 函数名 返回类型 位置 说明 file_report_multiengines json api.py 微步文件反病毒引擎检测报告 参数名 是否可空 传参类型 说明 sha256 False string 文件的sha256
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *tb = ThreatBook('***' ) a = tb.file_report_multiengines('******' ) print (a)
微步文件报告 file_report 函数名 返回类型 位置 说明 file_report json api.py 微步文件报告 参数名 是否可空 传参类型 说明 sha256 False string 文件的sha256 sandbox_type True string 沙箱环境,默认win7_sp1_enx64_office2013
沙箱运行环境,用户可以指定文件的沙箱运行环境,可选环境包括:
Windows win7_sp1_enx64_office2013 win7_sp1_enx86_office2013 win7_sp1_enx86_office2010 win7_sp1_enx86_office2007 win7_sp1_enx86_office2003 Linux ubuntu_1704_x64 centos_7_x64 说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *tb = ThreatBook('***' ) a = tb.file_report('******' ) print (a)
GO-CQ-HTTP class-GoCQHttp GoCQHttp Key 获取地址:https://fofa.info/
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *cq = GoCQHttp('http://www.baidu.com:1700' , True , "check me" )
发送私聊消息 send_private_msg 函数名 返回类型 位置 说明 send_private_msg object api.py GoCQHttp 发送私聊消息参数名 是否可空 传参类型 说明 userid False int 接收消息的QQ号 message False string 发送的内容
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *cq = GoCQHttp('http://www.baidu.com:1700' , True , "check me" ) cq.send_private_msg(1044631097 , '早上该起床啦!' )
发送群消息 send_group_msg 函数名 返回类型 位置 说明 send_group_msg object api.py GoCQHttp 发送群聊消息参数名 是否可空 传参类型 说明 group_id False int 接收消息的群号 message False string 发送的内容
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *cq = GoCQHttp('http://www.baidu.com:1700' , True , "check me" ) cq.send_group_msg(797842833 , '大家好哦!' )
FOFA class-FOFA FOFA 函数名 返回类型 位置 说明 FOFA object api.py FOFA_SDK 参数名 是否可空 传参类型 说明 email False string FOFA Email key False string FOFA Key
Key 获取地址:https://fofa.info/
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *fofa = FOFA('***' ,'xxxx' )
FOFA用户信息 userinfo 函数名 返回类型 位置 说明 userinfo json api.py FOFA 用户信息 参数名 是否可空 传参类型 说明
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *fofa = FOFA('***' ,'xxxx' ) print (fofa.userinfo())
1 2 3 4 5 6 7 8 9 10 11 12 13 { "error" : false , "email" : "****@qq.com" , "username" : "***" , "fcoin" : 48 , "isvip" : true , "vip_level" : 2 , "is_verified" : false , "avatar" : "https://i.nosec.org/avatar/system/****" , "message" : "" , "fofacli_ver" : "4.0.3" , "fofa_server" : true }
FOFA查询 search 函数名 返回类型 位置 说明 search json api.py FOFA 查询接口调用 参数名 是否可空 传参类型 说明 query_text False string 支持FOFA高级语句 field True string 默认 host,ip,port page True int 页数 size True int 每页查询数量 full True Boolean 默认搜索一年内的数据,指定为true即可搜索全部数据
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *fofa = FOFA('***' ,'xxxx' ) print (fofa.search('title="bing"' ))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 { "error" : false , "size" : 8683 , "page" : 1 , "mode" : "extended" , "query" : "title\u003d\"bing\"" , "results" : [ [ "46.101.204.107" , "hotel-bing.hotels-rimini-it.com" , "80" ] , [ "104.21.32.129" , "https://peapix.com" , "443" ] , [ "193.8.37.83" , "https://www.thorsmindecamping.dk" , "443" ] ] }
FOFA统计聚合 search_stats 函数名 返回类型 位置 说明 search_stats json api.py FOFA 统计聚合查询 参数名 是否可空 传参类型 说明 query_text False string 需要进行查询的语句,即输入的查询内容 field True string 可选字段,默认title,详见附录2
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 5 6 from qsnctf import *fofa = FOFA('***' ,'xxxx' ) print (fofa.search_stats('ip="103.35.168.38"' ))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "error" : false , "distinct" : { "ip" : 1 , "title" : 1 } , "aggs" : { "countries" : [ ] , "title" : [ { "count" : 1 , "name" : "RouterOS router configuration page" } ] } , "lastupdatetime" : "2022-06-11 07:00:00" }
FOFA HOST 聚合 search_host 函数名 返回类型 位置 说明 search_host json api.py FOFA HOST聚合查询 参数名 是否可空 传参类型 说明 host False string host名,通常是ip detail True Boolean 显示端口详情
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *fofa = FOFA('***' ,'xxxx' ) print (fofa.search_host('78.48.50.249' ))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 { "error" : false , "host" : "78.48.50.249" , "ip" : "78.48.50.249" , "asn" : 6805 , "org" : "Telefonica Germany" , "country_name" : "Germany" , "country_code" : "DE" , "protocol" : [ "http" , "sip" , "https" ] , "port" : [ 8089 , 5060 , 7170 , 80 , 443 ] , "category" : [ "CMS" ] , "product" : [ "Synology-WebStation" ] , "update_time" : "2022-12-29 05:00:00" }
大圣云沙箱 class-DaSheng DaSheng 函数名 返回类型 位置 说明 DaSheng object api.py 大圣云沙箱 参数名 是否可空 传参类型 说明 id False string 客户端ID key False string 客户端密钥
Key 获取地址:https://sandbox.freebuf.com/cloudApi
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *ds = DaSheng('***' ,'xxxx' )
Token获取 token 一般不写操作可能没啥用
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *ds = DaSheng('***' ,'xxxx' ) print (ds.token())
文件上传 upload 函数名 返回类型 位置 说明 upload object api.py 样本上传 参数名 是否可空 传参类型 说明 file_dir False string 路径 file_name False string 文件名
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *ds = DaSheng('***' ,'xxxx' ) print (ds.upload('路径' ,'文件名' ))
查询结果 search 函数名 返回类型 位置 说明 search object api.py 样本查询 参数名 是否可空 传参类型 说明 sha1 False string 文件sha1
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *ds = DaSheng('***' ,'xxxx' ) print (ds.search('sha1' ))
零零信安 class-ZeroZeon ZeroZeon 函数名 返回类型 位置 说明 ZeroZeon object api.py 零零信安 参数名 是否可空 传参类型 说明 key False string api_key
Key 获取地址:https://0.zone/plug-in-unit
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 from qsnctf import *zero = ZeroZeon('xxxx' )
零零信安查询 search 函数名 返回类型 位置 说明 search json api.py 大圣云沙箱 Token参数名 是否可空 传参类型 说明 title False string 查询语句,支持高级搜索
一般不写操作可能没啥用
说明:此功能需要连接网络,请注意比赛规则进行使用。
使用示例 1 2 3 4 from qsnctf import *zero = ZeroZeon('xxxx' ) print (zero.search('title==零零信安' ))
Base家族 Base100 base100_encode 函数名 返回类型 位置 说明 base100_encode string base.py base100编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base100_decode 函数名 返回类型 位置 说明 base100_decode string base.py base100解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base100_encode('青少年CTF' ) print (a) a = base100_decode('📠💔💉📜💧💈📜💰💫🐺👋🐽' ) print (a)
Base92 base92_encode 函数名 返回类型 位置 说明 base92_encode string base.py base92编码(无法编码中文哦) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容
base92_decode 函数名 返回类型 位置 说明 base92_decode string base.py base92解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base92_encode('qsnctf123QSN' ) print (a) a = base92_decode('ItHYSr3{(eF*?n>' ) print (a)
Base91 base91_encode 函数名 返回类型 位置 说明 base91_encode string base.py base91编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容
base91_decode 函数名 返回类型 位置 说明 base91_decode string base.py base91解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base91_encode('青少年CTF' ) print (a) a = base91_decode('N_jjjief!gTFU,I' ) print (a)
Base85 base85_encode 函数名 返回类型 位置 说明 base85_encode string base.py base85编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base85_decode 函数名 返回类型 位置 说明 base85_decode string base.py base85解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base85_encode('青少年CTF' ) print (a) a = base85_decode('>7A10u#x4tv_n)z' ) print (a)
自定义Base64 base64_encode_custom 函数名 返回类型 位置 说明 base64_encode_custom string base.py base64编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 custom_table False string 编码表 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base64_decode_custom 函数名 返回类型 位置 说明 base64_decode_custom string base.py base64解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 custom_table False string 编码表 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 from qsnctf import *data = 'SGVsbG8sIFdvcmxkIQ==' custom_table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-' a = base64_encode_custom(data, custom_table) print (a)
Base64 base64_encode 函数名 返回类型 位置 说明 base64_encode string base.py base64编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base64_decode 函数名 返回类型 位置 说明 base64_decode string base.py base64解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base64_encode('青少年CTF' ) print (a) a = base64_decode('6Z2S5bCR5bm0Q1RG' ) print (a)
Base62 base62_encode 函数名 返回类型 位置 说明 base62_encode string base.py base62编码(只能是整数哦) 参数名 是否可空 传参类型 说明 ints False int 需要编码的内容
base62_decode 函数名 返回类型 位置 说明 base62_decode int base.py base62解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base62_encode(123456 ) print (a) a = base62_decode('W7E' ) print (a)
Base58 base58_encode 函数名 返回类型 位置 说明 base58_encode string base.py base58编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base58_decode 函数名 返回类型 位置 说明 base58_decode string base.py base58解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base58_encode('青少年CTF' ) print (a) a = base58_decode('5QhHM9SSxYiJbYQMj' ) print (a)
Base36 base36_encode 函数名 返回类型 位置 说明 base36_encode string base.py base36编码(只能是整数哦) 参数名 是否可空 传参类型 说明 encoded False int 需要编码的内容
base36_decode 函数名 返回类型 位置 说明 base36_decode int base.py base36解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base36_encode(123456 ) print (a) a = base36_decode('2n9c' ) print (a)
Base32 base32_encode 函数名 返回类型 位置 说明 base32_encode string base.py base32编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base32_decode 函数名 返回类型 位置 说明 base32_decode string base.py base32解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base32_encode('青少年CTF' ) print (a) a = base32_decode('5GOZFZNQSHS3TNCDKRDA====' ) print (a)
Base16 base16_encode 函数名 返回类型 位置 说明 base16_encode string base.py base16编码(支持中文) 参数名 是否可空 传参类型 说明 text False string 需要编码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
base16_decode 函数名 返回类型 位置 说明 base16_decode string base.py base16解码 参数名 是否可空 传参类型 说明 text False string 需要解码的内容 encoding True string 解码文本时的编码,默认值utf-8 decoding True string 输出文本时的编码,默认值utf-8
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = base16_encode('青少年CTF' ) print (a) a = base16_decode('E99D92E5B091E5B9B4435446' ) print (a)
各种编码 核心价值观 Chinese_socialism_encode 函数名 返回类型 位置 说明 Chinese_socialism_encode string misc.py 社会主义核心价值观编码 参数名 是否可空 传参类型 说明 string False string 需要编码的内容
Chinese_socialism_decode 函数名 返回类型 位置 说明 Chinese_socialism_decode string misc.py 社会主义核心价值观解码 参数名 是否可空 传参类型 说明 string False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = Chinese_socialism_encode('青少年CTF' ) print (a) a = Chinese_socialism_decode('友善爱国敬业敬业诚信和谐敬业文明友善爱国平等诚信民主富强敬业民主友善爱国平等友善平等敬业诚信民主自由自由和谐平等自由自由公正' ) print (a)
URL编码 url_encode 函数名 返回类型 位置 说明 url_encode string misc.py URL编码 参数名 是否可空 传参类型 说明 string False string 需要编码的内容
url_decode 函数名 返回类型 位置 说明 url_decode string misc.py URL解码 参数名 是否可空 传参类型 说明 string False string 需要解码的内容
使用示例 1 2 3 4 5 6 7 from qsnctf import *a = url_encode('青少年CTF=中学生CTF' ) print (a) a = url_decode('%E9%9D%92%E5%B0%91%E5%B9%B4CTF%3D%E4%B8%AD%E5%AD%A6%E7%94%9FCTF' ) print (a)
百家姓编码 baijiaxing_encode 函数名 返回类型 位置 说明 baijiaxing_encode string misc.py 百家姓编码 参数名 是否可空 传参类型 说明 source_text False string 需要编码的内容
baijiaxing_decode 函数名 返回类型 位置 说明 baijiaxing_decode string misc.py 百家姓解码 参数名 是否可空 传参类型 说明 source_text False string 需要解码的内容
使用示例 1 2 3 4 5 6 from qsnctf import *a = baijiaxing_encode('abcde' ) print (a) b = baijiaxing_decode('褚卫蒋沈韩' ) print (b)
Qwerty编码 qwerty_encode 函数名 返回类型 位置 说明 qwerty_encode string crypto.py qwerty密码 参数名 是否可空 传参类型 说明 source_text False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = qwerty_encode('abcd' ) print (a)
qwerty_decode 函数名 返回类型 位置 说明 qwerty_decode string crypto.py qwerty密码 参数名 是否可空 传参类型 说明 source_text False string 需要解密的内容
使用示例 1 2 3 4 from qsnctf import *a = qwerty_decode('qwer' ) print (a)
HTML编码 html_encode 函数名 返回类型 位置 说明 html_encode string crypto.py HTML编码 参数名 是否可空 传参类型 说明 string False string 需要编码的内容
使用示例 1 2 3 4 from qsnctf import *a = html_encode('<script>' ) print (a)
html_decode 函数名 返回类型 位置 说明 html_decode string crypto.py HTML编码 参数名 是否可空 传参类型 说明 string False string 需要解码的内容
使用示例 1 2 3 4 from qsnctf import *b = html_decode('<script>' ) print (b)
JSfuck jsfuck_encode 函数名 返回类型 位置 说明 jsfuck_encode string crypto.py JSFUCK 参数名 是否可空 传参类型 说明 string False string 需要编码的内容
使用示例 1 2 3 4 from qsnctf import *b = jsfuck_encode('abcdefg' ) print (b)
jsfuck_decode 函数名 返回类型 位置 说明 jsfuck_decode string crypto.py JSFUCK 参数名 是否可空 传参类型 说明 string False string 需要解码的内容
使用示例 1 2 3 4 from qsnctf import *a = jsfuck_decode('(![]+[])[+!+[]]+([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]+[])[!+[]+!+[]+!+[]]' ) print (a)
AAencode aaencode 函数名 返回类型 位置 说明 aaencode string crypto.py JSFUCK 参数名 是否可空 传参类型 说明 string False string 需要编码的内容
使用示例 1 2 3 4 from qsnctf import *a = aaencode('qsnctf' ) print (a)
aadecode 函数名 返回类型 位置 说明 aadecode string crypto.py JSFUCK 参数名 是否可空 传参类型 说明 string False string 需要解码的内容
使用示例 1 2 3 4 from qsnctf import *b = aadecode(r"゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');" ) print (b)
字符串操作 逆向字符串 string_reverse 函数名 返回类型 位置 说明 string_reverse string misc.py 逆向字符串,字符串倒序、翻转 参数名 是否可空 传参类型 说明 string False string 需要逆向的内容
使用示例 1 2 3 4 5 from qsnctf import *a = string_reverse('青少年CTF' ) print (a)
逆向字符串(包含步长) string_reverse_step 函数名 返回类型 位置 说明 string_reverse_step2 string misc.py 步长为2的字符串逆向 参数名 是否可空 传参类型 说明 string False string 需要逆向的内容 step False int 步长,一般是2以上
使用示例 1 2 3 4 from qsnctf import *print (string_reverse_step('abc123' , 3 ))
string_reverse_step2 函数名 返回类型 位置 说明 string_reverse_step2 string misc.py 步长为2的字符串逆向 参数名 是否可空 传参类型 说明 string False string 需要逆向的内容
使用示例 1 2 3 4 5 from qsnctf import *a = string_reverse_step2('abc123' ) print (a)
列表异或 xor_list 函数名 返回类型 位置 说明 xor_list string misc.py URL编码 参数名 是否可空 传参类型 说明 lt_data False list 异或数据 lt_root False list 异或根
使用示例 1 2 3 4 5 6 from qsnctf import *a = "abcde" b = "01234" c = xor_list(a, b) print (c)
UUID get_uuid 函数名 返回类型 位置 说明 get_uuid string misc.py URL编码 参数名 是否可空 传参类型 说明
使用示例 1 2 3 4 from qsnctf import *c = get_uuid() print (c)
字符串转换 string_split 函数名 返回类型 位置 说明 string_split list misc.py 根据内容自动分割 参数名 是否可空 传参类型 说明 s False string 需要分割成列表的文本
使用示例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 from qsnctf import *a = string_split("abcdefg" ) print (a)a = string_split("a,b,c,d,e,f,g" ) print (a)a = string_split("a b c d e f g" ) print (a)""" ['a', 'b', 'c', 'd', 'e', 'f', 'g'] ['a', 'b', 'c', 'd', 'e', 'f', 'g'] ['a', 'b', 'c', 'd', 'e', 'f', 'g'] """
说明:可以根据不同的内容判断进行截取,最终结果是一致的
ord_to_str 函数名 返回类型 位置 说明 ord_to_str string misc.py ord值转str 参数名 是否可空 传参类型 说明 ord False int 需要转换的ord值
使用示例 1 2 3 4 from qsnctf import *print (ord_to_str(97 ))
ord_list_to_str_list 函数名 返回类型 位置 说明 ord_list_to_str_list list misc.py ord值转str(列表支持) 参数名 是否可空 传参类型 说明 ord_list False list 需要转换的ord列表
使用示例 1 2 3 4 5 from qsnctf import *a = ord_list_to_str_list(['97' , '98' , '99' ]) print (a)
ord_str_to_str 函数名 返回类型 位置 说明 ord_str_to_str string misc.py ord值转str(字符串支持) 参数名 是否可空 传参类型 说明 ord_str False list ord字符串,可以用逗号和空格分开
使用示例 1 2 3 4 5 from qsnctf import *a = ord_str_to_str('97,98,99' ) print (a)
chr_to_ord 函数名 返回类型 位置 说明 chr_to_ord string misc.py char转ord值 参数名 是否可空 传参类型 说明 char False int 需要转换的char(字符)
使用示例 1 2 3 4 from qsnctf import *print (chr_to_ord('a' ))
chr_list_to_ord_list 函数名 返回类型 位置 说明 chr_list_to_ord_list list misc.py chr列表转ord列表 参数名 是否可空 传参类型 说明 chr_list False list 需要转换的chr列表
使用示例 1 2 3 4 5 from qsnctf import *a = chr_list_to_ord_list(['a' , 'b' , 'c' ]) print (a)
chr_str_to_ord_str 函数名 返回类型 位置 说明 chr_str_to_ord_str string misc.py chr转ord字符串 参数名 是否可空 传参类型 说明 chr_str False list chr字符串,可以用逗号、空格分开,也可以不分
使用示例 1 2 3 4 5 from qsnctf import *a = ord_str_to_str('abc' ) print (a)
search_flag 函数名 返回类型 位置 说明 search_flag string misc.py 通过正则查找flag 参数名 是否可空 传参类型 说明 text False string 疑似包含flag的内容 flag_prefix True string Flag前缀,格式flag|qsnctf|ctf
使用示例 1 2 3 4 5 from qsnctf import *a = search_flag('hello, i will give you flag flag{qsnctf-12345}' ) print (a)
压缩包操作 压缩包爆破 class-ZipPasswordCracking 函数名 返回类型 位置 说明 ZipPasswordCracking string misc.py ZIP压缩包密码爆破 参数名 是否可空 传参类型 说明 filename False string zip的文件位置 threadline True int 线程数 sleep_time True int 等待时间(非网络操作一般不用) pass_list True list 自定义密码列表 path True string 解压缩的目录
说明:这里支持伪加密压缩包了哦!
使用示例 1 2 3 4 5 6 7 8 9 10 from qsnctf import *zip = ZipPasswordCracking("pass.zip" )print (zip .results)plist = ['1234' ,'test' ,'123123' ] zip = ZipPasswordCracking("pass.zip" , threadline=100 , pass_list=plist, path="file" )print (zip .results)
ZIP解压缩 zip_unzip 函数名 返回类型 位置 说明 zip_unzip Boolean misc.py ZIP解压缩 参数名 是否可空 传参类型 说明 filename False string zip的文件位置 password True string 这里是string类型,如果没有密码留空 members True list 需要解压的文件 path True string 解压缩的目录
使用示例 1 2 3 from qsnctf import *zip_unzip("pass.zip" )
密码学 凯撒密码 caesar_encrypt 函数名 返回类型 位置 说明 caesar_encrypt string crypto.py 凯撒密码加密 参数名 是否可空 传参类型 说明 text False string 需要加密的内容 shift False int or string 偏移量,传入可为string,会转换int
caesar_decrypt 函数名 返回类型 位置 说明 caesar_decrypt string crypto.py 凯撒密码解密 参数名 是否可空 传参类型 说明 string False string 需要解密的内容 shift False int or string 偏移量,传入可为string,会转换int
使用示例 1 2 3 4 5 6 from qsnctf import *a = caesar_encrypt('qsnctf' , 8 ) print (a) b = caesar_decrypt('yavkbn' , 8 ) print (b)
凯撒密码爆破 caesar_decrypt_cracking 函数名 返回类型 位置 说明 caesar_decrypt_cracking json crypto.py 凯撒密码解密爆破 参数名 是否可空 传参类型 说明 ciphertext False string 需要的内容
caesar_encrypt_cracking 函数名 返回类型 位置 说明 caesar_encrypt_cracking json crypto.py 凯撒密码加密爆破 参数名 是否可空 传参类型 说明 ciphertext False string 需要加密的内容
使用示例 1 2 3 4 5 6 7 8 from qsnctf import *a = caesar_encrypt_cracking('qsnctf' ) print (a) b = caesar_decrypt_cracking('yavkbn' ) print (b)
注意:加密爆破和解密爆破的最终返回均为json,两个集是完全不同的,加密爆破是考虑偏题题点写的,所以不要混为一谈。
培根密码 bacon_encrypt 函数名 返回类型 位置 说明 bacon_encrypt string crypto.py 培根密码加密 参数名 是否可空 传参类型 说明 string False string 需要加密的内容
bacon_decrypt 函数名 返回类型 位置 说明 bacon_decrypt string crypto.py 培根密码解密 参数名 是否可空 传参类型 说明 string False string 需要解密的内容,如果出现小写一定要转为大写
使用示例 1 2 3 4 5 6 from qsnctf import *a = bacon_encrypt('qsnctf' ) print (a) b = bacon_decrypt('BAAAABAABAABBABAAABABAABBAABAB' ) print (b)
ROT13 rot13 函数名 返回类型 位置 说明 rot13 string crypto.py rot13 参数名 是否可空 传参类型 说明 text False string 需要加密或解密的内容
使用示例 1 2 3 4 5 6 from qsnctf import *a = rot13('qsnctf' ) print (a) b = rot13('dfapgs' ) print (b)
ROT5 rot5 函数名 返回类型 位置 说明 rot5 string crypto.py rot5 参数名 是否可空 传参类型 说明 text False string 需要加密或解密的内容
使用示例 1 2 3 4 5 6 from qsnctf import *a = rot5('12345' ) print (a) b = rot5('67890' ) print (b)
ROT18 rot18 函数名 返回类型 位置 说明 rot18 string crypto.py rot18 参数名 是否可空 传参类型 说明 text False string 需要加密或解密的内容
使用示例 1 2 3 4 5 6 from qsnctf import *a = rot18('qsnctf2022' ) print (a) b = rot18('dfapgs7577' ) print (b)
八卦密码 eight_diagrams_encrypt 函数名 返回类型 位置 说明 eight_diagrams_encrypt string crypto.py 八卦密码加密 参数名 是否可空 传参类型 说明 text False string 需要加密的内容
eight_diagrams_decrypt 函数名 返回类型 位置 说明 eight_diagrams_decrypt string crypto.py 八卦密码解密 参数名 是否可空 传参类型 说明 text False string 需要解密的内容
使用示例 1 2 3 4 5 6 from qsnctf import *a = eight_diagrams_encrypt('qsnctf' ) print (a) a = eight_diagrams_decrypt('正巽震~正巽兑~正离巽~正艮兑~正巽艮~正艮巽~' ) print (a)
埃特巴什码 atbash_cipher 函数名 返回类型 位置 说明 atbash_cipher string crypto.py 埃特巴什码 参数名 是否可空 传参类型 说明 text False string 需要加密或解密的内容
使用示例 1 2 3 4 5 6 7 8 from qsnctf import *a = atbash_cipher('qsnctf.com' ) print (a) a = atbash_cipher('jhmxgu.xln' ) print (a)
摩斯密码加密 morse_encrypt 函数名 返回类型 位置 说明 morse_encrypt string crypto.py 摩斯密码加密 参数名 是否可空 传参类型 说明 message False string 需要加密的内容 split True string 分隔符(默认为空格)可以设置为"/" point True string 点 用做替换摩斯密码的“.” bar True string 横 用作替换摩斯密码的“-”
使用示例 1 2 3 4 from qsnctf import *a = morse_encrypt('QSNCTF' ,'/' ) print (a)
摩斯密码解密 morse_decrypt 函数名 返回类型 位置 说明 morse_decrypt string crypto.py 摩斯密码解密 参数名 是否可空 传参类型 说明 cipher False string 需要解密的内容 split True string 分隔符(默认为空格)可以设置为"/" point True string 点 用做替换摩斯密码的“.” bar True string 横 用作替换摩斯密码的“-”
使用示例 1 2 3 4 from qsnctf import *b = morse_decrypt('..-./---/.-/.-.-/./--.-' ,'/' , '-' , '.' ) print (b)
Hash MD5 md5 函数名 返回类型 位置 说明 md5 string hash.py md5 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = md5('qsnctf2022' ) print (a)
SHA1 sha1 函数名 返回类型 位置 说明 sha1 string hash.py sha1 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha1('qsnctf2022' ) print (a)
SHA224 sha224 函数名 返回类型 位置 说明 sha224 string hash.py sha224 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha224('qsnctf2022' ) print (a)
SHA256 sha256 函数名 返回类型 位置 说明 sha256 string hash.py sha256 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha256('qsnctf2022' ) print (a)
SHA384 sha384 函数名 返回类型 位置 说明 sha384 string hash.py sha384 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha384('qsnctf2022' ) print (a)
SHA512 sha512 函数名 返回类型 位置 说明 sha512 string hash.py sha512 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha512('qsnctf2022' ) print (a)
SHAKE128 shake128 函数名 返回类型 位置 说明 shake_128 string hash.py shake128 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容 bits False int or string 用于指定输出的散列值的长度。
使用示例 1 2 3 4 from qsnctf import *a = shake_128('qsnctf2022' ,"10" ) print (a)
SHAKE256 shake256 函数名 返回类型 位置 说明 shake_256 string hash.py shake256 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容 bits False int or string 用于指定输出的散列值的长度。
使用示例 1 2 3 4 from qsnctf import *a = shake_256('qsnctf2022' ,"10" ) print (a)
HMAC-SHA256 hmac-sha256 函数名 返回类型 位置 说明 HMAC_SHA256_HEX string hash.py hmac_sha256 参数名 是否可空 传参类型 说明 secret False string 需要加密的内容 data False int or string 加密的密钥
使用示例 1 2 3 4 from qsnctf import *a = HMAC_SHA256_HEX('qsnctf2022' ,123 ) print (a)
SHA3_224 sha3_224 函数名 返回类型 位置 说明 sha3_224 string hash.py sha3_224 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha3_224('qsnctf2022' ) print (a)
SHA3_256 sha3_256 函数名 返回类型 位置 说明 sha3_256 string hash.py sha3_256 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha3_256('qsnctf2022' ) print (a)
SHA3_384 sha3_384 函数名 返回类型 位置 说明 sha3_384 string hash.py sha3_384 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha3_384('qsnctf2022' ) print (a)
SHA3_512 sha3_512 函数名 返回类型 位置 说明 sha3_512 string hash.py sha3_512 参数名 是否可空 传参类型 说明 input_string False string 需要加密的内容
使用示例 1 2 3 4 from qsnctf import *a = sha3_512('qsnctf2022' ) print (a)