This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import angr | |
| import sys | |
| import os | |
| def load_trace(trace_log): | |
| trace = [] | |
| with open(trace_log, 'rb') as fr: | |
| for line in fr: | |
| addr, opcode = line.rstrip().split(',') | |
| trace.append({"address":addr, "opcode":opcode}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/mman.h> | |
| #include <sys/time.h> | |
| int memtest(int pgsize, int count) | |
| { | |
| char *buf1 = malloc(pgsize); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Implementation of the sieve of Eratosthenes for finding prime numbers | |
| */ | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <math.h> | |
| // Returns 1 if n is prime, 0 otherwise | |
| static inline int is_prime(int n) | |
| { |