aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-10-18 00:18:36 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-10-18 00:18:36 +0300
commit66c24def5fc23cc5c9f2d8f85ae7bf9e58a92d6c (patch)
tree0925131373a38d4774249e2d258cd276be94e5f5
parent12fc566d92d9ebd0bf065d82be5c24a3b5fb600a (diff)
downloadcryptrobber-66c24def5fc23cc5c9f2d8f85ae7bf9e58a92d6c.tar
cryptrobber-66c24def5fc23cc5c9f2d8f85ae7bf9e58a92d6c.tar.xz
cryptrobber-66c24def5fc23cc5c9f2d8f85ae7bf9e58a92d6c.zip
Keylen fix.
-rw-r--r--main.sts5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.sts b/main.sts
index ad7c100..8543626 100644
--- a/main.sts
+++ b/main.sts
@@ -55,6 +55,7 @@ checktext.count 0 = if
checktext.count float_iload
float_div float_fstore swap !
1 + od drop
+ 1a print_stack newline sys_write
; Decide if text is real:
freq_eng calcdist if 1 else
0 fi
@@ -87,8 +88,8 @@ set_entry float_init ; this is program with floats
dup 0 = untilod drop drop
local plaintext
- ; check deciphering attempt, exit if Ok or keylen = max (16)
- keylen 10 = if eeeee else length checktext fi dup until drop
+ ; check deciphering attempt, exit if Ok or keylen = max (2)
+ keylen 2 = if eeeee else length checktext fi dup until drop
; else remove the text from stack and place keylen back
0 do dup length = until
swap drop 1 +