-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyFunction.c
More file actions
39 lines (36 loc) · 1000 Bytes
/
myFunction.c
File metadata and controls
39 lines (36 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
void CreateSeg();
void MyFunction(char *password) __attribute__ ((section(".MyFunction"))); // The section name to use
__attribute__((optimize("O0")))
void MyFunction(char *password) {
if (password[0] == 'P') {
asm("nop":::);
if (password[1] == 'A') {
asm("nop":::);
if (password[2] == 'S') {
asm("nop":::);
if (password[3] == 's') {
asm("nop":::);
if (password[4] == '1') {
asm("nop":::);
if (password[5] == '!')
{
printf("found password");
CreateSeg();
}
}
}
}
}
}
}
void CreateSeg(){
int *ptr =NULL;
printf("%d",*ptr);
}