diff options
author | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2017-01-23 18:38:22 -0500 |
---|---|---|
committer | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2017-01-23 18:49:28 -0500 |
commit | d7c84268a26a4391af55a3533422367b02737435 (patch) | |
tree | 7dd461cc35542d9ca155ced836c0bda53450bc0d /findjava.py | |
parent | 7fc88c0c901b68b6e223d6f1383bc1221eae8488 (diff) |
Misc. unrecorded changes
Diffstat (limited to 'findjava.py')
-rwxr-xr-x | findjava.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/findjava.py b/findjava.py new file mode 100755 index 0000000..09f65ac --- /dev/null +++ b/findjava.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import avfs +import os, sys + +def is_jvm_class(fname): + return b'\xca\xfe\xba\xbe' == avfs.open(fname, 'rb').read(4) + +if __name__ == "__main__": + for fname in avfs.find(os.fsencode(sys.argv[1]), {b'.git'}): + try: + if is_jvm_class(fname): + print(fname.decode('utf-8', 'replace')) + except: + pass |