Skip to content

Instantly share code, notes, and snippets.

from binaryninja import *
class Slicer():
def __init__(self, instruction):
self.visited = set()
self.instruction = instruction
self.function = instruction.function
def visit_backward(self, instruction):
for var in instruction.vars_read:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
puts("Basic allocation example.\n");
char* a = malloc(0x10);
strcpy(a, "AAAAAAAAAAAAAAA"); // A * 15
char* b = malloc(0x12);
memcpy(b, "BBBBBBBBBBBBBBBBBBBBBBBB", 24); // B * 23