aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-10-18 12:51:07 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-10-18 12:51:07 +0300
commit139e25b6201e5713bffea5c68b96be3930f2058a (patch)
tree867cb0e5869ac19cafc70d87bbde10533408287a
parent28efe80cca2ae4f30026719e4ad4b49b15862f25 (diff)
downloadcryptrobber-139e25b6201e5713bffea5c68b96be3930f2058a.tar
cryptrobber-139e25b6201e5713bffea5c68b96be3930f2058a.tar.xz
cryptrobber-139e25b6201e5713bffea5c68b96be3930f2058a.zip
.
-rw-r--r--main.sts12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.sts b/main.sts
index ee11303..627aeeb 100644
--- a/main.sts
+++ b/main.sts
@@ -39,21 +39,23 @@ defword checktext
dup word_size mul checktext.text + @
dup dup 'z' > 0 = swap 'a' < 0 = mul if
dup 'z' swap - word_size mul checktext.fr + dup @ 1 + swap !
- checktext.count @ 1 + checktext.count !
+ checktext.count 1 + as checktext.count
fi dup dup 'Z' > 0 = swap 'A' < 0 = mul if
dup 'Z' swap - word_size mul checktext.fr + dup @ 1 + swap !
- checktext.count @ 1 + checktext.count !
+ checktext.count 1 + as checktext.count
fi dup dup 8 > 0 = swap 1 < 0 = mul if drop drop drop
+ 'x' sys_write_err
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 dup dup 1f > 0 = swap e < 0 = mul if drop drop drop
+ 'U' sys_write_err
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 drop
dup 0 = untilod drop
- ; 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
+ ; At least 1/4 characters in text should be alphabetical:
+ checktext.count @ float_iload checktext.length float_iload float_div
+ 1 float_iload 4 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