Skip to content

Instantly share code, notes, and snippets.

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})
#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);
/*
* 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)
{