Skip to content

Commit

Permalink
Handle missing SHELL envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Jan 2, 2024
1 parent 5a388b2 commit a76fabe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def provider_libc_rip(hex_encoded_id, hash_type):
def provider_local_system(hex_encoded_id, hash_type):
if hash_type == 'id':
return None
shell_path = os.environ['SHELL'] or '/bin/sh'
shell_path = os.environ.get('SHELL', None) or '/bin/sh'
if not os.path.exists(shell_path):
log.debug('Shell path %r does not exist. Skipping local system libc matching.', shell_path)
return None
Expand Down

0 comments on commit a76fabe

Please sign in to comment.