vignette 0.1.0

A sampling profiler as a library. Particularly oriented towards shipping software where symbols need to be hydrated later.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# given an input that is the IP output of sample_once, and a base address for the program, calculates the relative IPs.

from __future__ import print_function

import sys

base = int(sys.argv[1], 16)

ips = []
for line in sys.stdin.readlines():
    for token in line.split():
        try:
            ips.append(int(token.strip(), 16))
        except ValueError:
            pass

for ip in ips:
    print(hex(ip-base))