aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorexegete <nikitf-97@mail.ru>2020-10-17 22:52:35 +0300
committerexegete <nikitf-97@mail.ru>2020-10-17 22:52:35 +0300
commitf463b9b0dcfb6ed349c29b73e9a7d9e35e9f5b8e (patch)
treec29ff8534e3552bfade9b70af0e2f398e4901d8f
parentba1ce0c68a784947ac4d96675813f3b7c074895b (diff)
downloadcryptrobber-f463b9b0dcfb6ed349c29b73e9a7d9e35e9f5b8e.tar
cryptrobber-f463b9b0dcfb6ed349c29b73e9a7d9e35e9f5b8e.tar.xz
cryptrobber-f463b9b0dcfb6ed349c29b73e9a7d9e35e9f5b8e.zip
keygen
-rw-r--r--keygen.sts34
-rw-r--r--test.sts11
2 files changed, 40 insertions, 5 deletions
diff --git a/keygen.sts b/keygen.sts
new file mode 100644
index 0000000..6067c0d
--- /dev/null
+++ b/keygen.sts
@@ -0,0 +1,34 @@
+defword keygen
+ ; Increment
+ 0
+ do
+ over over = until
+ dup 2 + get
+ dup ff < if
+ 1 + over 2 + set
+ drop
+ exit
+ fi
+ drop 0 over 2 + set
+ 1 +
+ od
+ drop
+
+ ; Clean old stack data
+ dup
+ do
+ dup 0 = until
+ 1 get 2 set swap drop
+ 1 -
+ od
+ drop
+
+ 1 +
+ 0
+ do
+ over over = until
+ dup 2 get 1 set 0 2 set
+ 1 +
+ od
+ drop
+exit
diff --git a/test.sts b/test.sts
index 1e96807..168abad 100644
--- a/test.sts
+++ b/test.sts
@@ -1,12 +1,13 @@
module ia32/elf/begin.sts
module ia32/float/float.sts
+module keygen.sts
set_entry
-float_init
-4 float_iload
-5 float_iload
-float_more
-4 print_stack
+ff ff 2 keygen
+5 print_stack
+a sys_write
+keygen
+5 print_stack
sys_exit
module ia32/elf/end.sts