diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-10-18 12:24:39 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-10-18 12:24:39 +0300 |
commit | 28efe80cca2ae4f30026719e4ad4b49b15862f25 (patch) | |
tree | ebef92eceb8a9a008e01a6e04cf02a1f6a5c85b0 | |
parent | 89eed10ae9034dd334eddd3cb305e2a355dfa291 (diff) | |
download | cryptrobber-28efe80cca2ae4f30026719e4ad4b49b15862f25.tar cryptrobber-28efe80cca2ae4f30026719e4ad4b49b15862f25.tar.xz cryptrobber-28efe80cca2ae4f30026719e4ad4b49b15862f25.zip |
More alphas in text.
-rw-r--r-- | encrypt.sts | 4 | ||||
-rw-r--r-- | main.sts | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/encrypt.sts b/encrypt.sts index 2422e66..edc9bbc 100644 --- a/encrypt.sts +++ b/encrypt.sts @@ -2,8 +2,8 @@ module ia32/elf/begin.sts module cipher.sts set_entry - 31 32 local password - 2 as passlen + 31 local password + 1 as passlen passlen 1 - local pos do sys_read 0 = until password passlen pos cipher sys_write @@ -51,11 +51,12 @@ defword checktext drop drop drop drop drop drop drop drop drop drop drop drop drop 0 exit fi drop dup 0 = untilod drop -; ZERO DIVISION SHALL NOT PASS -checktext.count 0 = if drop - drop drop drop drop drop drop drop drop drop drop drop drop drop - drop drop drop drop drop drop drop drop drop drop drop drop drop -0 exit fi + ; At least half characters in text should be alphabetical: + checktext.count float_iload checktext.length float_iload float_div + 1 float_iload 2 float_iload float_div float_more if drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + 0 exit fi ; normalize: 0 do dup 1a = until dup word_size mul checktext.fr + dup @ float_iload @@ -82,6 +83,7 @@ set_entry float_init ; this is program with floats do ; generate next key to try keygen as keylen local key + '.' sys_write_err ; decipher text (length is the same as for ciphertext) keylen 1 - length do 1 - |