Skip to content

Commit

Permalink
Add more logs and fetch libc in hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
the-soloist committed Nov 23, 2023
1 parent 2d71793 commit 3494ee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pwnlib/commandline/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,14 @@ def main(args):
libs_id = None
hash_type = args.hash_type if args.hash_type != "buildid" else "build_id"

# search and download libc
# Search and download libc
exe_path = libcdb.search_by_hash(hash_value, hash_type, args.unstrip, args.offline)

if exe_path:
libs_id = read(exe_path + ".id").decode()

if not libs_id:
log.warn("%s(libc) == %s is not found", hash_type, hash_value)
continue

# Dump common symbols
Expand All @@ -244,6 +245,7 @@ def main(args):

libc = libcdb._pack_libs_info(exe_path, libs_id, "", symbols)
print_libc(libc)
fetch_libc(args, libc)

elif args.libc_command == 'file':
from hashlib import md5, sha1, sha256
Expand Down

0 comments on commit 3494ee2

Please sign in to comment.