Skip to content

Commit

Permalink
Made elfheader run info files
Browse files Browse the repository at this point in the history
  • Loading branch information
gsingh93 committed May 31, 2016
1 parent 0ab7574 commit 19b1bb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions pwndbg/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import pwndbg.commands.peda
import pwndbg.commands.gdbinit
import pwndbg.commands.defcon
import pwndbg.commands.elfheader



Expand Down
11 changes: 11 additions & 0 deletions pwndbg/commands/elfheader.py
Original file line number Diff line number Diff line change
@@ -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')
8 changes: 0 additions & 8 deletions pwndbg/commands/vmmap.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 19b1bb2

Please sign in to comment.