ADD exercices week 2
This commit is contained in:
0
01-VeryEasy2/VE2
Normal file → Executable file
0
01-VeryEasy2/VE2
Normal file → Executable file
0
01-VeryEasy2/VE2.gpr
Normal file
0
01-VeryEasy2/VE2.gpr
Normal file
11
01-VeryEasy2/VE2.rep/idata/00/00000000.prp
Normal file
11
01-VeryEasy2/VE2.rep/idata/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||
<STATE NAME="FILE_ID" TYPE="string" VALUE="a801f6fb66758882284485789" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="VE2" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
01-VeryEasy2/VE2.rep/idata/00/~00000000.db/db.2.gbf
Normal file
BIN
01-VeryEasy2/VE2.rep/idata/00/~00000000.db/db.2.gbf
Normal file
Binary file not shown.
5
01-VeryEasy2/VE2.rep/idata/~index.bak
Normal file
5
01-VeryEasy2/VE2.rep/idata/~index.bak
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:VE2:a801f6fb66758882284485789
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy2/VE2.rep/idata/~index.dat
Normal file
5
01-VeryEasy2/VE2.rep/idata/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:VE2:a801f6fb66758882284485789
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
6
01-VeryEasy2/VE2.rep/project.prp
Normal file
6
01-VeryEasy2/VE2.rep/project.prp
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="OWNER" TYPE="string" VALUE="remi" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
15
01-VeryEasy2/VE2.rep/projectState
Normal file
15
01-VeryEasy2/VE2.rep/projectState
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PROJECT>
|
||||
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||
<SAVE_STATE>
|
||||
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||
<A VALUE="VE2:" />
|
||||
</ARRAY>
|
||||
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||
</SAVE_STATE>
|
||||
</PROJECT_DATA_XML_NAME>
|
||||
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||
</TOOL_MANAGER>
|
||||
</PROJECT>
|
||||
|
11
01-VeryEasy2/VE2.rep/user/00/00000000.prp
Normal file
11
01-VeryEasy2/VE2.rep/user/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="ProgramUserData" />
|
||||
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||
<STATE NAME="FILE_ID" TYPE="string" VALUE="a801f6fa08361347999654449" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="udf_a801f6fb66758882284485789" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
01-VeryEasy2/VE2.rep/user/00/~00000000.db/db.1.gbf
Normal file
BIN
01-VeryEasy2/VE2.rep/user/00/~00000000.db/db.1.gbf
Normal file
Binary file not shown.
4
01-VeryEasy2/VE2.rep/user/~index.bak
Normal file
4
01-VeryEasy2/VE2.rep/user/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy2/VE2.rep/user/~index.dat
Normal file
5
01-VeryEasy2/VE2.rep/user/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:udf_a801f6fb66758882284485789:a801f6fa08361347999654449
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
01-VeryEasy2/VE2.rep/user/~journal.bak
Normal file
2
01-VeryEasy2/VE2.rep/user/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
||||
IADD:00000000:/udf_a801f6fb66758882284485789
|
||||
IDSET:/udf_a801f6fb66758882284485789:a801f6fa08361347999654449
|
4
01-VeryEasy2/VE2.rep/versioned/~index.bak
Normal file
4
01-VeryEasy2/VE2.rep/versioned/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
4
01-VeryEasy2/VE2.rep/versioned/~index.dat
Normal file
4
01-VeryEasy2/VE2.rep/versioned/~index.dat
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
8
01-VeryEasy2/VE2.txt
Normal file
8
01-VeryEasy2/VE2.txt
Normal file
@ -0,0 +1,8 @@
|
||||
1. Was this executable compiled with debugging symbols?
|
||||
yes, with debug_info
|
||||
|
||||
2. How is protected the secret password hard-coded into this executable?
|
||||
By shift of 'W'
|
||||
|
||||
3. What is the secret password hard-coded into this executable? You must send this value by email to pascal+sre25@mod-p.ch before Mar. 3rd, 2025, 12h00 CET to validate this lab and get 1 point.
|
||||
JSHGnQumN+sQ
|
43
01-VeryEasy2/code.c
Normal file
43
01-VeryEasy2/code.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
char ENCSECRETPASSWORD[];
|
||||
|
||||
int main(int param_1, char* *param_2) {
|
||||
int8_t output_value;
|
||||
size_t input_length;
|
||||
char acStack_19 [13];
|
||||
|
||||
if (param_1 == 2) {
|
||||
input_length = strlen((char *)param_2[1]);
|
||||
if (input_length == 12) {
|
||||
for (uint8_t i = 0; i < 13; i++) {
|
||||
acStack_19[i] = ENCSECRETPASSWORD[i] + 'W'; // JSHGnQumN+sQ
|
||||
//f3 fc f1 f0 17 fa 1e 16 f7 d4 1c fa a9
|
||||
//
|
||||
|
||||
}
|
||||
for (uint8_t i = 0; i < 13; i++) {
|
||||
if (acStack_19[i] != *(char *)((long)i + param_2[1])) {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,32,stderr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"\nCongratulations ! The right password is indeed %s :-)\n\n",param_2[1]);
|
||||
output_value = 35;
|
||||
}
|
||||
else {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,32,stderr);
|
||||
output_value = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fwrite("\nMSE-SRE Challenge VE2 --- Enjoy !\n",1,35,stderr);
|
||||
fprintf(stderr,"\nUsage: %s <password>\n\n",*param_2);
|
||||
output_value = 1;
|
||||
}
|
||||
return output_value;
|
||||
}
|
16
01-VeryEasy2/foo.c
Normal file
16
01-VeryEasy2/foo.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int main() {
|
||||
char foo[14] = {0xf3, 0xfc, 0xf1, 0xf0, 0x17, 0xfa, 0x1e, 0x16, 0xf7, 0xd4, 0x1c, 0xfa, 0xa9, '\0'};
|
||||
for (uint8_t i = 0; i<13; i++) {
|
||||
foo[i] += 'W';
|
||||
}
|
||||
foo[13] = '\0';
|
||||
printf("%s \r\t", foo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void myfunc(int a, ...) {
|
||||
|
||||
}
|
Reference in New Issue
Block a user