CTF常用工具之汇总
前言:因为最近在玩一下CTF(sql注入是真的不会玩呀?(T_T) (T_T) )所以经常会用到一些像什么进制转换呀?base64 32 16编码解码呀?当然这些工具网上都有!但是每次都打开网页 总是感觉很麻烦所以就萌生了一个想法能不自己写一个脚本把这些功能集合在一起!就像kali里面的工具一样!这样的话想用的时候岂不是很方便?所以从昨天下午开始写到今天上午中午终于把这个工具脚本写完了!我们先看一下预览图
当然这里只是集成我自己常用的一些功能!如果你们需要扩容也是非常容易的,
(1) 首先说一下这个脚本需要的包
import hashlib
import base64
from urllib import quote,unquote
import argparse
此工具需要运行在python3的环境下
(2) 下面就是代码部分,里面有详细的注释,如果还是看不懂代码里面有我的QQ
-- coding:utf-8 --
import hashlib
import base64
from urllib import quote,unquote
import argparse
“”“
名字:CTF之常用工具汇总
作者:白猫
时间:2018-3-22
QQ :1058763824
“”“
def menu():
usage = """-m MD5 encryption
-s SH1 encryption
-h Show help information
-b64 Base64 encode
-b32 Base32 encode
-b16 Base16 encode
-db64 Base64 decode
-db32 Base32 decode
-db16 Base16 decode
-urlen URL encode
-urlde URL decode
-bin Binary To Decimal
-octal Octal to Decimal
-hex Hexadecimal to Decimal
-dbin Decimal To Binary
-doctal Decimal to Octal
-dhex Decimal to Hexadecimal
-ord Letter To ASCII Example -ord asdfasfa -ord='dfafs afasfa asfasf'
-chr ASCII To Letters Example -chr 105 -chr = '102 258 654'
"""
#在使用ord 和chr命令的时候要注意如果输入的字符和数字不包含空格则直接实用例子前面的命令如果包含空格则使用后面的命令
parser = argparse.ArgumentParser()
parser.add_argument('-m',dest='md',help='MD5 encryption')
parser.add_argument('-s', dest='sh', help='SH1 encryption')
parser.add_argument('--h',action="store_true",help='Show help information')
parser.add_argument('-b64', dest='b64', help='