From 4e5a9ec691625e7e76625ff1781e170ed8e23151 Mon Sep 17 00:00:00 2001 From: rusinthread Date: Sun, 5 Feb 2017 18:07:41 +0300 Subject: add latest cyphertexts --- analyze_new.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'analyze_new.py') diff --git a/analyze_new.py b/analyze_new.py index 93322c1..3999c8c 100755 --- a/analyze_new.py +++ b/analyze_new.py @@ -43,17 +43,18 @@ def dump_lines(): print('%d ' % i, end='') print(l) i += 1 + sys.exit() alphabet = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ' a = spaceitout(alphabet, 1) a = a.replace(' ', ',') -print(a) -sys.exit() +#print(a) +#sys.exit() -text = '' -text += load_text(1) + "\n" -text += load_text(2) + "\n" -text += load_text(3) + "\n" +text = load_text(10) +#text += load_text(1) + "\n" +#text += load_text(2) + "\n" +#text += load_text(3) + "\n" #text += load_text(4) text = text.upper() @@ -81,7 +82,6 @@ table = {} lines = text.split("\n") #dump_lines() -#sys.exit() for a in alphabet: table[a] = {} @@ -104,7 +104,7 @@ variants = [] for line in lines: valid = [] for a in table: - if False: + if True: index = letter_pos(a) if index == None: continue @@ -134,6 +134,8 @@ for line in lines: except IndexError: continue + if len(valid) == 0: + valid = ['?'] variants.append(valid) #print('('+''.join(valid)+')') @@ -141,7 +143,6 @@ variants = list(filter(lambda a: len(a), variants)) #variants = list(map(lambda l: sorted(l), variants)) #die(variants) -#variants = variants[63:72] variants = variants[:7] res = list(itertools.product(*variants)) for r in res: -- cgit v1.2.3