diff --git a/pwndbg/__init__.py b/pwndbg/__init__.py old mode 100644 new mode 100755 index 851945d5c1a..8e7074ba81e --- a/pwndbg/__init__.py +++ b/pwndbg/__init__.py @@ -61,6 +61,7 @@ import pwndbg.commands.peda import pwndbg.commands.gdbinit import pwndbg.commands.defcon +import pwndbg.commands.elfheader diff --git a/pwndbg/commands/elfheader.py b/pwndbg/commands/elfheader.py new file mode 100755 index 00000000000..4532ac27c9c --- /dev/null +++ b/pwndbg/commands/elfheader.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import gdb +import pwndbg.commands + +@pwndbg.commands.Command +def elfheader(): + """ + Prints the section mappings contained in the ELF header + """ + gdb.execute('info files') diff --git a/pwndbg/commands/vmmap.py b/pwndbg/commands/vmmap.py old mode 100644 new mode 100755 index 0cfba38bafe..21227544702 --- a/pwndbg/commands/vmmap.py +++ b/pwndbg/commands/vmmap.py @@ -36,11 +36,3 @@ def vmmap(map=None): continue print(pwndbg.color.get(page.vaddr, text=str(page))) - -@pwndbg.commands.OnlyWhenRunning -@pwndbg.commands.QuietSloppyParsedCommand -def elfheader(map=None): - """ - Provides PEDA compatibility. See vmmap command. - """ - return vmmap(map)