aboutsummaryrefslogtreecommitdiff
path: root/main.sts
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-10-16 22:38:45 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-10-16 22:38:45 +0300
commita5ada20d77f6fcf7bf54e49402e55d3b1c56df5e (patch)
treeb6f9a205a4da8c00c58b5da66c74b99874f4f620 /main.sts
parentce9e52469d0b12b3231ccc199e1b19bb924f54cd (diff)
downloadcryptrobber-a5ada20d77f6fcf7bf54e49402e55d3b1c56df5e.tar
cryptrobber-a5ada20d77f6fcf7bf54e49402e55d3b1c56df5e.tar.xz
cryptrobber-a5ada20d77f6fcf7bf54e49402e55d3b1c56df5e.zip
Meh.
Diffstat (limited to 'main.sts')
-rw-r--r--main.sts27
1 files changed, 20 insertions, 7 deletions
diff --git a/main.sts b/main.sts
index bf0c267..93a9ed4 100644
--- a/main.sts
+++ b/main.sts
@@ -1,17 +1,30 @@
module ia32/elf/begin.sts
+module cipher.sts
-defarr bigbad 65536 ; max size of input is 64KB
+defarr bigbad 64000 ; max size of input is 64 000 chars
+defarr bigbadres 64000 ; max size of output is 64 000 chars
+defarr passwd 3
-set_entry ; reversed echo
- 0 ; bigbad index
+set_entry
+ 31 passwd !
+ 32 passwd 1 + !
+ 33 passwd 2 + !
+
+ 0 local bigbadlen
do sys_read 0 = until
over bigbad + !
1 +
- od ; bigbad length will be on top of stack
+ od
+
+ 0 local cipherpos
+ 0 do dup bigbadlen @ = until
+ dup bigbad + @ passwd 3 cipherpos cipher
+ over bigbadres + !
+ 1 + od drop drop
- do
- 1 - dup bigbad + @ sys_write
- dup 0 = untilod drop
+ 0 do dup bigbadlen @ = until
+ dup bigbadres + @ sys_write
+ 1 + od drop drop
sys_exit
module ia32/elf/end.sts