0x00 简介
培根密码,培根所用的密码是一种本质上用二进制数设计的,没有用通常的0和1来表示,而是采用a和b
培根密码加密有两种方式:
A aaaaa B aaaab C aaaba D aaabb E aabaa F aabab G aabba H aabbb I abaaa J abaab K ababa L ababb M abbaa N abbab O abbba P abbbb Q baaaa R baaab S baaba T baabb U babaa V babab W babba X babbb Y bbaaa Z bbaab
方式二:
a AAAAA g AABBA n ABBAA t BAABA
b AAAAB h AABBB o ABBAB u-v BAABB
c AAABA i-j ABAAA p ABBBA w BABAA
d AAABB k ABAAB q ABBBB x BABAB
e AABAA l ABABA r BAAAA y BABBA
f AABAB m ABABB s BAAAB z BABBB
通常加密者只需要两种不同的字体或使用大小写来代替ab即可,例如明文为bling,加密为:aaaab ababb abaaa abbab aabba,此时再随意找句句子,使用大小写来代替ab。密文如下:good GoOd STuDy day DAy Up hAHa
0x01 解密代码
#! python3
# -*- coding: utf-8 -*-
# @Time : 2017/8/26 上午12:07
# @Author : BlingBling
# @File : Baconian.py
# @Software: PyCharm Community Edition
import re
class