mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
rand_check pid
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int bss = 0;
|
||||
int data = 1;
|
||||
@@ -21,13 +23,17 @@ int main(__attribute__((unused)) int argc, char **argv) {
|
||||
uint64_t uint64;
|
||||
FILE *fp;
|
||||
|
||||
printf("time(NULL) = %ju\n", (uintmax_t)time(NULL));
|
||||
/* Loaded addresses. */
|
||||
printf("&i = %p\n", (void *)&i);
|
||||
printf("&argv[0] = %p\n", (void *)&argv[0]);
|
||||
printf("&main = %p\n", (void *)(intptr_t)main);
|
||||
printf("&bss = %p\n", (void *)&bss);
|
||||
printf("&data = %p\n", (void *)&data);
|
||||
|
||||
/* Misc syscalls. */
|
||||
printf("time(NULL) = %ju\n", (uintmax_t)time(NULL));
|
||||
printf("pid = %ju\n", (uintmax_t)getpid());
|
||||
|
||||
/* malloc */
|
||||
ip = malloc(sizeof(*ip));
|
||||
printf("&malloc = %p\n", (void *)ip);
|
||||
|
||||
Reference in New Issue
Block a user