Skip to content

Commit

Permalink
Don't change log level for Corefile._parse_stack() (#2222)
Browse files Browse the repository at this point in the history
* Don't change log level for Corefile._parse_stack()

If we don't want to see the log, don't print it. There are no spammy
debug logs anymore.

Fixes #1666

* Fix doctest
  • Loading branch information
peace-maker committed Jul 9, 2023
1 parent 1399c7a commit 83e1921
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pwnlib/elf/corefile.py
Expand Up @@ -530,7 +530,6 @@ class Corefile(ELF):
>>> io = elf.process()
>>> io.wait(2)
>>> core = io.corefile
[!] End of the stack is corrupted, skipping stack parsing (got: 41414141)
>>> core.argc, core.argv, core.env
(0, [], {})
>>> core.stack.data.endswith(b'AAAA')
Expand Down Expand Up @@ -666,7 +665,7 @@ def __init__(self, *a, **kw):
log.warn('Could not find the stack!')
self.stack = None

with context.local(bytes=self.bytes, log_level='warn'):
with context.local(bytes=self.bytes):
try:
self._parse_stack()
except ValueError:
Expand Down

0 comments on commit 83e1921

Please sign in to comment.