blob: addb51dc1ba6bf03e9a99d8a0b0071b9cee1616a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env python3
import avfs
import os, sys
def is_elf(fname):
return b'\x7fELF' == avfs.open(fname, 'rb').read(4)
if __name__ == "__main__":
for fname in avfs.find(os.fsencode(sys.argv[1]), {b'.git'}):
try:
if is_elf(fname):
print(fname.decode('utf-8', 'replace'))
except:
pass
|