From 92283283cc56101fd84293938edc4527b3882aad Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 16 Oct 2020 16:20:55 +0300 Subject: . --- Makefile | 11 ++++++++--- encrypt.sts | 2 +- ia32/stack.sts | 2 +- main.sts | 5 +---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 581241b..63defae 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,14 @@ -.PHONY: cryptrobber clean +all: cryptrobber encrypt +.PHONY: all clean encrpyt cryptrobber -cryptrobber: +cryptrobber: smack strans ./smack main.sts | ./strans > $@ chmod 0755 $@ +encrypt: smack strans + ./smack encrypt.sts | ./strans > $@ + chmod 0755 $@ + smack: smack.c gcc $< -o $@ @@ -11,4 +16,4 @@ strans: strans.c gcc $< -o $@ clean: - rm -f smack strans cryptrobber + rm -f smack strans cryptrobber encrypt diff --git a/encrypt.sts b/encrypt.sts index 378a686..8112d9b 100644 --- a/encrypt.sts +++ b/encrypt.sts @@ -2,7 +2,7 @@ module ia32/elf/begin.sts module cipher.sts defword encbyte - key dup if + sys_read dup if drop cipher 1 1 diff --git a/ia32/stack.sts b/ia32/stack.sts index cf1bd21..7756706 100644 --- a/ia32/stack.sts +++ b/ia32/stack.sts @@ -13,7 +13,7 @@ next defasm drop # 58 ?' ; pop eax next - + defasm dup # ff ?' # 34 ?' # 24 ?' ; push dword [esp] next diff --git a/main.sts b/main.sts index 45010ec..9bd7a63 100644 --- a/main.sts +++ b/main.sts @@ -3,9 +3,6 @@ module ia32/elf/begin.sts set_entry 30 31 32 33 0 set 34 1 set 35 2 set - emit - emit - emit -quit +sys_exit module ia32/elf/end.sts -- cgit v1.2.3