#!/usr/bin/env python3 import argparse import glob import os.path import shutil import subprocess import struct import sys from smolshared import * def readbyte(blob, off): return struct.unpack(' NOT FOUND" if len(libs) == 0 else (" -> " + libs[0])) ht = dict({}) if len(libs) == 0 else build_hashtab(args.scanelf, libs[0]) while True: hashv, j = readint(blob, j) if (hashv & 0xFF) == 0: break sys.stdout.write(" * " + hex(hashv)) print(" -> NOT FOUND" if hashv not in ht else (" -> " + ht[hashv])) j = bakoff break else: # 64-bit eprintf("Currently unsuppored, sorry.") sys.exit(1) if __name__ == '__main__': main()