From ed2b5a7b9c835a919d824151660a83788ee82f97 Mon Sep 17 00:00:00 2001 From: Disconnect3d Date: Mon, 10 Jul 2017 23:01:56 +0200 Subject: [PATCH] Remove pwndbg/linkmap.py and malloc.py (#303) --- pwndbg/linkmap.py | 39 --------------------------------------- pwndbg/malloc.py | 30 ------------------------------ 2 files changed, 69 deletions(-) delete mode 100644 pwndbg/linkmap.py delete mode 100644 pwndbg/malloc.py diff --git a/pwndbg/linkmap.py b/pwndbg/linkmap.py deleted file mode 100644 index 806628813..000000000 --- a/pwndbg/linkmap.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -Describes the standard Linux glibc/eglibc link_map, and -allows enumeration of loaded modules under qemu-user where -/proc/X/maps may lie or be unavialable. -""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - -import gdb - -import pwndbg.elf -import pwndbg.events -import pwndbg.memoize -import pwndbg.memory - - -@pwndbg.events.new_objfile -@pwndbg.memoize.reset_on_objfile -def find(): - exe = pwndbg.elf.exe() - - if not exe: - return None - - # - # There are two places that the link_map can be. - # - # - DT_DEBUG - # - DT_PLTGOT - # - # This code is mostly copied from my implementation in - # pwntools/binjitsu. See the documentation there: - # - # - https://github.com/binjitsu/binjitsu/blob/master/pwnlib/dynelf.py - # diff --git a/pwndbg/malloc.py b/pwndbg/malloc.py deleted file mode 100644 index 936d8cf3d..000000000 --- a/pwndbg/malloc.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -Describes the EGLIBC heap mechanisms. - -Work-in-progress. -""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - -import pwndbg.arch -import pwndbg.events - -did_warn_once = False -malloc_chunk = None - -@pwndbg.events.new_objfile -def load_malloc_chunk(): - malloc_chunk = None - - -def chunk2mem(p): - "conversion from malloc header to user pointer" - return p + (2*pwndbg.arch.ptrsize) - -def mem2chunk(mem): - "conversion from user pointer to malloc header" - return mem - (2*pwndbg.arch.ptrsize)