Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "kpe.h"
- int main(){
- struct kpe_cmd_opts opts, *opts_p;
- opts_p = &opts;
- opts.start = 0xc0101a50;
- opts.end = 0xc0101a55;
- opts.duration = 100;
- opts.dump = 1;
- opts.name = "testing";
- opts.location = "somewhere";
- printf("Pointer to struct: %p with size: %i\n", opts_p, sizeof(opts));
- printf("Location: %s\n", opts.location);
- FILE * fp = fopen("/proc/uptime", "rw");
- //if (fwrite(fp, opts.location) == NULL) printf("Error writing address location");
- int i = 0;
- char c;
- char line[17];
- ### while((c = fgetc(fp)) != EOF) strcat(line, &c);
- printf("Location passed: %s", line);
- return 0;
- }
Add Comment
Please, Sign In to add comment