Fin implémentation programme vulnerable
This commit is contained in:
parent
589f250420
commit
b7270479a5
2 changed files with 12 additions and 12 deletions
|
@ -1 +1 @@
|
|||
Subproject commit bff261fa01129da9135f95f16bf4124366ea24fe
|
||||
Subproject commit cf119a9a257d0885c86920f0cd6945cbbf4134fa
|
|
@ -1,5 +1,6 @@
|
|||
int lire_tableau() {
|
||||
int tab[5] = {0,0,0,0,0};
|
||||
|
||||
printf(255);
|
||||
stop(20);
|
||||
printf(0);
|
||||
|
@ -9,24 +10,20 @@ int lire_tableau() {
|
|||
printf(0);
|
||||
stop(200);
|
||||
int val = get();
|
||||
int i = 0;
|
||||
while (i<7) {
|
||||
tab[5-i] = i;
|
||||
i = i + 1;
|
||||
}
|
||||
int i = 0;
|
||||
while (i<5) {
|
||||
printf(tab[i]);
|
||||
|
||||
int i = 1;
|
||||
while (i<8) {
|
||||
tab[5-i] = val;
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
int youVeBeenHacked() {
|
||||
while (1) {
|
||||
printf(0);
|
||||
stop(20);
|
||||
printf(255);
|
||||
stop(20);
|
||||
stop(10);
|
||||
printf(0);
|
||||
stop(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +39,9 @@ int legitimeFunction() {
|
|||
}
|
||||
|
||||
int main() {
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
lire_tableau();
|
||||
legitimeFunction();
|
||||
printf(a);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue