Aggiunta istruzione GRMN a encrypt. Creato file per compilare tutto a una botta

This commit is contained in:
Giulio De Pasquale 2017-06-01 18:52:00 +02:00
parent 394cd5d9c6
commit 0a7210eb10
4 changed files with 37 additions and 23 deletions

View File

@ -98,6 +98,7 @@ poop r1
retn
def main:
grmn
movi r0, 0xadde
movi r1, 0x0bb0
stri 0, r0

View File

@ -79,29 +79,29 @@ int main(int argc, char *argv[]) {
0x2f, 0x2f, 0x5c, 0x2f, 0x2f, 0x5c, 0x2f, 0x2f, 0x5c, 0x2f, 0x2f, 0x5c,
0x2f, 0x2f, 0x5c, 0x2f, 0x20, 0x20, 0x20};
unsigned char bc[] = {
0x48, 0x00, 0xde, 0xad, 0x48, 0x01, 0xb0, 0x0b, 0xd4, 0x00, 0x00, 0x00,
0xd4, 0x02, 0x00, 0x01, 0x48, 0x00, 0xb0, 0x0b, 0x48, 0x01, 0xfa, 0xce,
0xd4, 0x04, 0x00, 0x00, 0xd4, 0x06, 0x00, 0x01, 0x48, 0x00, 0x00, 0x00,
0xd8, 0xd9, 0x00, 0xcb, 0x20, 0x48, 0x04, 0x00, 0x00, 0xde, 0x04, 0x48,
0x00, 0x00, 0x00, 0x48, 0x01, 0x02, 0x00, 0x39, 0x04, 0x39, 0x14, 0xd8,
0x5a, 0x00, 0x5c, 0x04, 0x05, 0x04, 0x01, 0x00, 0xd7, 0x42, 0x93, 0x2d,
0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x01, 0x02, 0x00, 0x22, 0x02, 0x04,
0x00, 0x22, 0x03, 0x06, 0x00, 0x5d, 0xde, 0x01, 0xde, 0x02, 0xde, 0x03,
0x12, 0x20, 0x12, 0x31, 0x48, 0x04, 0x00, 0x00, 0x48, 0x05, 0x00, 0x00,
0xde, 0x04, 0x05, 0x05, 0x6f, 0x62, 0xde, 0x05, 0xcb, 0x43, 0x20, 0x04,
0x04, 0x00, 0x05, 0x04, 0x65, 0x70, 0xcb, 0x53, 0x5c, 0x07, 0x39, 0x57,
0xde, 0x07, 0xb1, 0x45, 0xde, 0x04, 0xcb, 0x43, 0x36, 0x04, 0x05, 0x00,
0x05, 0x04, 0x65, 0x70, 0x5c, 0x05, 0xb1, 0x45, 0x39, 0x24, 0xcb, 0x42,
0x20, 0x04, 0x04, 0x00, 0x05, 0x04, 0x75, 0x72, 0xcb, 0x52, 0x5c, 0x07,
0x39, 0x57, 0xde, 0x07, 0xb1, 0x45, 0xde, 0x04, 0xcb, 0x42, 0x36, 0x04,
0x05, 0x00, 0x05, 0x04, 0x73, 0x6e, 0x5c, 0x05, 0xb1, 0x45, 0x39, 0x34,
0x5c, 0x05, 0x5c, 0x04, 0x05, 0x04, 0x01, 0x00, 0xf4, 0x04, 0x7f, 0x93,
0x6c, 0x00, 0x4e, 0x02, 0x4e, 0x13, 0x5c, 0x03, 0x5c, 0x02, 0x5c, 0x01,
0xbb, 0xde, 0x01, 0xde, 0x02, 0xde, 0x03, 0xcb, 0x60, 0x48, 0x05, 0x00,
0x00, 0x12, 0x46, 0xf4, 0x04, 0x00, 0x38, 0xff, 0x00, 0x48, 0x06, 0x00,
0x00, 0x05, 0x05, 0x01, 0x00, 0x39, 0x65, 0x12, 0x46, 0xf4, 0x04, 0x00,
0xae, 0xed, 0x00, 0xcb, 0x05, 0x5c, 0x03, 0x5c, 0x02, 0x5c, 0x01, 0xbb};
unsigned int bclen = 264;
0xc3, 0x48, 0x00, 0xde, 0xad, 0x48, 0x01, 0xb0, 0x0b, 0xd4, 0x00, 0x00,
0x00, 0xd4, 0x02, 0x00, 0x01, 0x48, 0x00, 0xb0, 0x0b, 0x48, 0x01, 0xfa,
0xce, 0xd4, 0x04, 0x00, 0x00, 0xd4, 0x06, 0x00, 0x01, 0x48, 0x00, 0x00,
0x00, 0xd8, 0xd6, 0x00, 0xcb, 0x20, 0x48, 0x04, 0x00, 0x00, 0xde, 0x04,
0x48, 0x00, 0x00, 0x00, 0x48, 0x01, 0x02, 0x00, 0x39, 0x04, 0x39, 0x14,
0xd8, 0x5b, 0x00, 0x5c, 0x04, 0x05, 0x04, 0x04, 0x00, 0xd7, 0x42, 0x93,
0x2e, 0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x01, 0x02, 0x00, 0x22, 0x02,
0x04, 0x00, 0x22, 0x03, 0x06, 0x00, 0x5d, 0xde, 0x01, 0xde, 0x02, 0xde,
0x03, 0x12, 0x20, 0x12, 0x31, 0x48, 0x04, 0x00, 0x00, 0x48, 0x05, 0x00,
0x00, 0xde, 0x04, 0x05, 0x05, 0x6f, 0x62, 0xde, 0x05, 0xcb, 0x43, 0x20,
0x04, 0x04, 0x00, 0x05, 0x04, 0x65, 0x70, 0xcb, 0x53, 0x5c, 0x07, 0xde,
0x07, 0xb1, 0x45, 0xde, 0x04, 0xcb, 0x43, 0x36, 0x04, 0x05, 0x00, 0x05,
0x04, 0x65, 0x70, 0x5c, 0x05, 0xb1, 0x45, 0x39, 0x24, 0xcb, 0x42, 0x20,
0x04, 0x04, 0x00, 0x05, 0x04, 0x75, 0x72, 0xcb, 0x52, 0x5c, 0x07, 0xde,
0x07, 0xb1, 0x45, 0xde, 0x04, 0xcb, 0x42, 0x36, 0x04, 0x05, 0x00, 0x05,
0x04, 0x73, 0x6e, 0x5c, 0x05, 0xb1, 0x45, 0x39, 0x34, 0x5c, 0x05, 0x5c,
0x04, 0x05, 0x04, 0x01, 0x00, 0xf4, 0x04, 0x7f, 0x93, 0x6d, 0x00, 0x4e,
0x02, 0x4e, 0x13, 0x5c, 0x03, 0x5c, 0x02, 0x5c, 0x01, 0xbb, 0xde, 0x01,
0xde, 0x02, 0xde, 0x03, 0xcb, 0x60, 0x48, 0x05, 0x00, 0x00, 0x12, 0x46,
0xf4, 0x04, 0x00, 0x38, 0xfc, 0x00, 0x48, 0x06, 0x00, 0x00, 0x05, 0x05,
0x01, 0x00, 0x39, 0x65, 0x12, 0x46, 0xf4, 0x04, 0x00, 0xae, 0xea, 0x00,
0xcb, 0x05, 0x5c, 0x03, 0x5c, 0x02, 0x5c, 0x01, 0xbb};
unsigned int bclen = 261;
unsigned char opcode_key[] = {0x48, 0x61, 0x76, 0x65, 0x46, 0x75, 0x6e,
0x21, 0x50, 0x6f, 0x6c, 0x69, 0x43, 0x54,

13
polictf/create_files.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# tea algos
gcc ./tea_cversion/tea-decrypt.c -o ./decrypt.elf
gcc ./tea_cversion/tea-encrypt.c -o ./encrypt.elf
# client / server
g++ ./server/pasticciotto_server.cpp ../vm/vm.cpp ../vm/vmas.cpp -o ./server.elf
g++ ./client/pasticciotto_client.cpp ../vm/vm.cpp ../vm/vmas.cpp -o ./client.elf
# debug versions
g++ ./server/pasticciotto_server.cpp ../vm/vm.cpp ../vm/vmas.cpp -DDBG -o ./server-debug.elf
g++ ./client/pasticciotto_client.cpp ../vm/vm.cpp ../vm/vmas.cpp -DDBG -o ./client-debug.elf