19

BaseCrack:一款功能强大的Base编码解码工具

 3 years ago
source link: https://www.freebuf.com/sectool/244559.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

queUFrb.jpg!mobile

BaseCrack是一款功能强大的Base编码/解码工具,该工具采用Python语言开发,是一个能够对所有字母和数字进行解码和编码的Base编码解决方案。该工具能够接收单用户输入、来自一个文件的多个输入、来自参数的输入以及多重Base编码数据,并且能够以非常快的速度完成编码/解码。

BaseCrack能够支持目前社区使用最为频繁的Base编码机制,其中包括Base16、Base32、Base36、Base58、Base62、Base64、Base64Url、Base85、Base91、Base92等等。除此之外,该工具也可以为CTF比赛,漏洞奖励计划和数据加密解密提供有效帮助。

注意:当前版本的BaseCrack可同时支持Python2和Python3环境。

支持的编码方案

Base16

Base32

Base36

Base58

Base62

Base64

Base64Url

Base85

Base91

Base92

主要功能

  • 能够对任意模式的多重Base编码数据进行解码;
  • 能够对来自文件的多个Base编码数据进行解码;
  • 能够利用解码后的Base数据生成字典文件并输出;
  • 能够对目标Base数据的编码方案类型进行预测;

工具特殊之处

在BaseCrack的帮助下,我们就可以一次性对任意模式下的多重Base编码数据进行解码了

可能你会在一次CTF比赛中遇到一个使用了Base64、Base91、Base85等编码机制进行反复编码的数据,那么BaseCrack就可以派上用场了!

yEjUfeA.jpg!mobile

想要测试一下吗?直接向工具传递下列运行参数即可:

IX(Fp@nNG6ef<,*TFE]IT^zdINAb9EVbp,e<u=O6nN)/u+MTnU;Fo#VvQ&ampcK;mLZI#Jbdook<O{W#+gY%ooe#6pTkTa.9YPU8Uc=pl9BhSM9%kISw2k:8..u/6F2BwNndPZ2o#7NHNP3g,HlZu><*[Nv+T8

工具安装

广大研究人员可以使用下列命令将该项目源码克隆至本地:

$ git clone https://github.com/mufeedvh/basecrack.git

$ cd basecrack

$ pip install -r requirements.txt

$ python basecrack.py -h

工具使用

对来自用户输入的单个Base编码数据进行解码:

python basecrack.py

对通过参数(-b/--base)传递的单个Base编码数据进行解码:

python basecrack.py -b SGVsbG8gV29ybGQh

对通过文件(-f/--file)传递的多个Base编码数据进行解码:

python basecrack.py -f file.txt

对任意模式的多重Base编码数据进行解码(-m/--magic):

python basecrack.py --magic

使用解码的Base数据生成字典文件并输出(-o/--output):

python basecrack.py -f file.txt -o output-wordlist.txt

API接口

如果你先要将BaseCrack以外部库的形式使用的话,你可以直接将该项目代码放到你项目的目录下,然后使用import导入之后,就可以通过BaseCrack()类和decode()函数可以直接使用了。

样例:

# import the BaseCrack class from basecrack.py

from basecrack import BaseCrack

# calling the api function decode() with the encoded base

result = BaseCrack().decode('c3BhZ2hldHRp')

# printing the output

"""

result is tuple where:

result[0] = DECODED STRING

result[1] = ENCODING SCHEME

"""

print('Decoded String: {}'.format(result[0]))

print('Encoding Scheme: {}'.format(result[1]))

输出:

Decoded String: spaghetti

Encoding Scheme: Base64

没错,你还可以将BaseCrack整合到其他的自动化工具中!

工具运行截图

6b6jMfB.jpg!mobile

许可证协议

BaseCrack项目的开发与发布遵循 MIT开源许可证协议

项目地址

BaseCrack:【G itHub传送门


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK