aboutsummaryrefslogtreecommitdiff
path: root/main.sts
blob: 93a9ed4f44440f78fceefafff547794ab8bb70b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module ia32/elf/begin.sts
module cipher.sts

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
    31 passwd !
    32 passwd 1 + !
    33 passwd 2 + !

    0 local bigbadlen
    do sys_read 0 = until
        over bigbad + !
        1 +
    od

    0 local cipherpos
    0 do dup bigbadlen @ = until
        dup bigbad + @ passwd 3 cipherpos cipher
        over bigbadres + !
    1 + od drop drop

    0 do dup bigbadlen @ = until
        dup bigbadres + @ sys_write
    1 + od drop drop
sys_exit

module ia32/elf/end.sts