aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-10-18 23:25:49 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-10-18 23:25:49 +0300
commit6f41f04184cbd1fac433dae61ec3574cb3f6f77f (patch)
treea7cea378195cb35b0117aeb331c4dcd047255adf
parentc3f3626c8b9ffc97875f55c92cc830324f065e52 (diff)
downloadcryptrobber-6f41f04184cbd1fac433dae61ec3574cb3f6f77f.tar
cryptrobber-6f41f04184cbd1fac433dae61ec3574cb3f6f77f.tar.xz
cryptrobber-6f41f04184cbd1fac433dae61ec3574cb3f6f77f.zip
Spanish added.
-rw-r--r--README3
-rw-r--r--cryptrobber.sts20
2 files changed, 15 insertions, 8 deletions
diff --git a/README b/README
index 88213dc..edc2706 100644
--- a/README
+++ b/README
@@ -26,3 +26,6 @@ will met requirements cryptrobber will output predicted language and key.
So the thing is breaking encrypted files, use it as:
./cryptrobber < path_to_encrypted_data > path_to_save_decrypted_data
+
+This software can determ if text is in english or in spanish.
+Language and kwy in hex will be outputed into error stream.
diff --git a/cryptrobber.sts b/cryptrobber.sts
index e56fbdf..35f338b 100644
--- a/cryptrobber.sts
+++ b/cryptrobber.sts
@@ -32,7 +32,7 @@ defword calcdist ; distance from ideal as sqrt sum square diff
calcdist.textfr + @ float_fload
float_sub float_fstore dup float_fload float_fload
float_mul float_fstore swap calcdist.fr + !
- 1 + od
+ 1 + od drop
0 do dup 2bd = until
swap float_fload swap float_fload float_add float_fstore swap
1 + od drop
@@ -101,17 +101,21 @@ defword checktext
1 + od drop
; Decide if text is real:
bifreq_eng freq_eng calcdist nicedist float_less if
- 1
+ bifreq_sp freq_sp calcdist bifreq_eng freq_eng calcdist float_less if
+ 2
+ else
+ 1
+ fi
else
-; bifreq_sp freq_sp calcdist nicedist float_less if
-; 2
-; else
+ bifreq_sp freq_sp calcdist nicedist float_less if
+ 2
+ else
0
-; fi
+ fi
fi
; Remove frequencies from stack:
- 2c1 set
- 2c1 clear
+ 2c0 set
+ 2c0 clear
exit
set_entry float_init ; this is program with floats