Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heap analysis #1785

Draft
wants to merge 181 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
1c83fbb
added MemoryMap classes to util.proc
zer1t0 Dec 30, 2019
3beff0d
added maps method to process
zer1t0 Dec 30, 2019
5c434d0
changed path access from process to MemoryAccess through proc module
zer1t0 Dec 30, 2019
88fbc55
fixed test in process.maps with uncommon binary path
zer1t0 Dec 30, 2019
18a689c
added MemoryMaps instead of list of MemoryMap
zer1t0 Dec 31, 2019
e1d7340
added heap module
Jan 27, 2020
f558916
added method to process to return the heap explorer
Jan 27, 2020
56dc290
added construct dependency
Jan 27, 2020
66775af
resolved heap import problems
Jan 27, 2020
3546228
added __str__ methods to heap items
Jan 29, 2020
1e89373
added __str__ methods to heap items
Jan 29, 2020
912a5ae
updated MemoryMaps
Jan 29, 2020
fb89d38
added rst file for heap module
Jan 29, 2020
028fd38
added heap_explorer to heap.rst
Jan 30, 2020
af2dda7
removed arguments from HeapExplorer in heap.rst
Jan 30, 2020
3f63324
added malloc_chunk to heap documentation
Jan 30, 2020
9d75ac5
added heap class to heap documentation
Jan 30, 2020
7cb4eed
added malloc state to the documentation
Jan 30, 2020
9b8eab1
added property attributes to malloc_stat Bins docstring
Jan 31, 2020
50b7d91
added bins classes to documentation
Jan 31, 2020
9e68270
added override of bins type in bins documentation
Jan 31, 2020
da01633
added explanation for non used types in bins entries
Jan 31, 2020
804febc
added the type of each bin entry for each bin type
Jan 31, 2020
0077874
added headers to separate each bin type
Jan 31, 2020
4dab1b3
added documentation for the arena to the rst files
Jan 31, 2020
91741c5
added heap module use examples
Jan 31, 2020
8111e59
remove TODO comments
Jan 31, 2020
20c4215
Merge branch 'dev' into process_maps
zer1t0 Jan 31, 2020
9c88b7f
fix test invalid syntax in proc.MemoryMap.is_in_range
Jan 31, 2020
3676de5
Merge branch 'process_maps' of https://github.com/Zer1t0/pwntools int…
Jan 31, 2020
62cf594
imported process into heap tests
Jan 31, 2020
2bbbbb1
added skip doctest in heap_explorer.tcaches()>>> try:
Jan 31, 2020
37e728a
added try context to test in heap_explorer.tcaches()
Jan 31, 2020
7b494b4
fix typo in proc.MemoryMap.is_in_range
Jan 31, 2020
83290a1
added public method describe to ELF to print security checks and fixe…
Jan 31, 2020
9b08ecd
added check in case libc is not found, as statically linked files
Feb 1, 2020
a7298a8
added example to arenas_count
Feb 1, 2020
ccce1e2
added example to HeapExplorer.malloc_state
Feb 1, 2020
a3a2b08
added example to HeapExplorer.heap
Feb 1, 2020
bced600
added example to HeapExplorer.unsorted_bin
Feb 1, 2020
7e57d96
added example to HeapExplorer.small_bins
Feb 1, 2020
c3b82b9
added example to HeapExplorer.large_bins
Feb 1, 2020
81f3270
added example to HeapExplorer.fast_bins
Feb 1, 2020
65184f8
added example to process.heap_explorer
Feb 1, 2020
23fdec8
added examples to MemoryMap.address and MemoryMap.size
Feb 1, 2020
864bbdd
added example to MemoryMap.readable
Feb 1, 2020
4a616a6
added example to MemoryMap.writable
Feb 1, 2020
c6fa558
added example to MemoryMap.executable
Feb 1, 2020
0f4da5f
added example to MemoryMap.shared
Feb 1, 2020
a156466
added example to MemoryMap.private
Feb 1, 2020
7fde593
added example to MemoryMapFlags.shared
Feb 1, 2020
c24be31
added example to MemoryMaps.heap
Feb 1, 2020
d3d3d17
added example to MemoryMaps.stack
Feb 1, 2020
a4cfff2
refactorized MemoryMaps, added function _look_map
Feb 1, 2020
c60338d
added example to MemoryMaps.map_with_address
Feb 1, 2020
3aa3b36
added example to MemoryMaps.from_str
Feb 1, 2020
ab0aab0
added example to MemoryMaps.from_process
Feb 1, 2020
c823b4b
added example to MemoryMap.from_str
Feb 1, 2020
8735f2f
fixed indentation in HeapExplorer.malloc_state example
Feb 1, 2020
5a20b8e
fixed string format error in MemoryMaps.from_str example
Feb 1, 2020
8ff1c0e
added exception process._libc (and therefore process.libc) in case of…
Feb 1, 2020
a052c0e
added process detail to the libc exception
Feb 1, 2020
99e3a60
added addresss details to the MemoryMaps.map_with_address exception
Feb 1, 2020
b590b44
modify example of MemoryMaps.map_with_address
Feb 1, 2020
1f5cd36
changed heap examples process to sh
Feb 1, 2020
5b6cf77
removed __repr__ from SmallBins
Feb 2, 2020
1a3aec8
removed __repr__ from UnsortedBin
Feb 2, 2020
a6011df
increased scope of HeapExplorer.heap example
Feb 2, 2020
9af661b
removed __repr__ from LargeBin
Feb 2, 2020
e07e420
added explicit imports to heap.malloc_state.malloc_state.parser
Feb 2, 2020
be6eec2
added explicit imports to heap.malloc_state.malloc_state.__init__
Feb 2, 2020
5be297c
added explicit imports to heap.malloc_state.fastbinsy
Feb 2, 2020
0333430
added explicit imports to heap.malloc_state.bins.parser
Feb 2, 2020
8067c92
added explicit imports to heap.malloc_state.bins.bins and set descrip…
Feb 2, 2020
648ea2d
added explicit imports to heap.malloc_state.bins.__init__
Feb 2, 2020
6274f80
added explicit imports to heap.malloc_state.__init__
Feb 2, 2020
ffe1a76
added explicit imports to heap.heap.heap_info.py
Feb 2, 2020
f558e7b
added explicit imports to heap.heap.heap_parser
Feb 2, 2020
02c3b96
added explicit imports to heap.heap.__init__
Feb 2, 2020
5b6210b
added explicit imports to heap.process_informer
Feb 2, 2020
a1e8d59
added explicit imports to heap.malloc_chunk
Feb 2, 2020
6d5c86d
added explicit imports to heap.arena.arena
Feb 2, 2020
a60b5a5
added explicit imports to heap.arena.parser
Feb 2, 2020
c8eb681
added explicit imports to heap.arena.__init__
Feb 2, 2020
da3e48e
added explicit imports to heap.bins.bin_parser
Feb 2, 2020
646950e
added explicit imports to heap.bins.fast_bin
Feb 2, 2020
e1c1bfa
added explicit imports to heap.bins.larg_bin
Feb 2, 2020
09caa63
added explicit imports to heap.bins.small_bin
Feb 2, 2020
1e3b1ee
added explicit imports to heap.bins.unsorted_bin
Feb 2, 2020
0f7dc29
added explicit imports to heap.bins.tcache.tcache_per_thread_struct
Feb 2, 2020
345f22f
added explicit imports to heap.bins.tcache.tcache and moved TcacheEnt…
Feb 2, 2020
d742609
fixed imports to heap.bins.tcache.tcache_per_thread_struct
Feb 2, 2020
c83128f
added explicit imports to heap.bins.tcache.parser
Feb 2, 2020
af0b035
added explicit imports to heap.bins.tcache.__init__
Feb 2, 2020
87093e7
added explicit imports to heap.bins.__init__
Feb 2, 2020
be04ecc
fixed imports in heap.bins.__init__ and heap.bins.tcache.__init__
Feb 2, 2020
0c2c5ac
added explicit imports to heap.bins.heap_explorer
Feb 2, 2020
6c97800
added imports to heap.__init__
Feb 2, 2020
9696b86
expanded heap_explorer.arena example scope
Feb 2, 2020
7c9258e
fixed import in heap.heap_explorer
Feb 2, 2020
dac4486
removed unused functions from heap.utils
Feb 2, 2020
badf8d1
removed unused method __repr__ of MallocState and __str__ of malloc_s…
Feb 2, 2020
19b1fe7
added examples to all public methods of HeapExplorer
Feb 2, 2020
3c2a72f
included NoTcacheError in heap.__init__
Feb 2, 2020
1edb105
added initialization to cat in process examples
Feb 2, 2020
30e85e4
removed Fastbin.__repr__
Feb 2, 2020
a882946
removed TcachePerthreadStruct.__repr__
Feb 2, 2020
0e4ca38
added code to examples to make sh use the heap and the bins
Feb 2, 2020
58d48e6
added coverage for bin arrays
Feb 2, 2020
b059668
expanded scope of MemoryMaps example
Feb 2, 2020
9c71609
changed process.libc example to python
Feb 2, 2020
43a1e2f
fix raise NotImplementedError in TcacheParser
Feb 2, 2020
96f3b0e
fix format in heap.arena.arena and heap.heap.heap_parser
Feb 2, 2020
9e6f363
added __all__ to heap.__init__
Feb 2, 2020
52475db
added __all__ to heap __init__ files
Feb 2, 2020
fad98c0
added IOError exception handler in bins parser (bin, fast and tcache)…
zer1t0 Feb 20, 2020
bf30ad4
use #: to document Arena attributes
zer1t0 Mar 13, 2021
8a6f2a3
use #: to document Bin attributes
zer1t0 Mar 13, 2021
8d2b625
use #: to document fast bin attributes
zer1t0 Mar 13, 2021
4e5b059
fix error in FastBinEntry
zer1t0 Mar 13, 2021
2cdf58d
use #: to document large bin attributes
zer1t0 Mar 13, 2021
b3eec70
use #: to document small bin attributes
zer1t0 Mar 13, 2021
42df6d3
use #: to document unsorted bin attributes
zer1t0 Mar 13, 2021
20f7087
use #: to document tcache attributes
zer1t0 Mar 13, 2021
a271f45
use #: to document tcache per thread struct attributes
zer1t0 Mar 13, 2021
85aa480
use #: to document heap attributes
zer1t0 Mar 13, 2021
3d1540d
use #: to document HeapInfo attributes
zer1t0 Mar 13, 2021
10c3624
use #: to document malloc state bins attributes
zer1t0 Mar 13, 2021
d02de96
use #: to document malloc state fastbinsy attributes
zer1t0 Mar 13, 2021
d74886b
use #: to document malloc chunk attributes
zer1t0 Mar 13, 2021
f846e68
use #: to document malloc state attributes
zer1t0 Mar 13, 2021
239e7f0
use #: to document heap explorer attributes
zer1t0 Mar 13, 2021
21b6782
create glmalloc module
zer1t0 Mar 13, 2021
3cdf2e0
fix imports in glmalloc files
zer1t0 Mar 13, 2021
57b9d69
add glmalloc to docs
zer1t0 Mar 13, 2021
e718743
reorganize heap documentation
zer1t0 Mar 13, 2021
4a5a821
add timeout to process heap_explorer
zer1t0 Mar 15, 2021
3313ac2
create _waitfor_libc method in process
zer1t0 Mar 15, 2021
d8f5f64
change heap_explorer to a method in examples
zer1t0 Mar 15, 2021
88fe03d
establish minimum width in heap messages
zer1t0 Mar 15, 2021
f594775
use ellipsis in heap_explorer examples
zer1t0 Mar 15, 2021
2941124
set glmalloc examples as code-blocks
zer1t0 Mar 15, 2021
782b4dd
remove SKIP from glmalloc examples
zer1t0 Mar 15, 2021
d8b65e8
set heap_explorer parsers as properties
zer1t0 Mar 15, 2021
8ee042e
create HeapError
zer1t0 Mar 15, 2021
cb05671
fix error loading heap_explorer without [heap] map
zer1t0 Mar 15, 2021
81fcb68
add HeapError to documentation
zer1t0 Mar 15, 2021
c76ba7e
add tcache parameter to process.heap_explorer
zer1t0 Mar 15, 2021
2d73b93
add safe-link demangling in tcaches
zer1t0 Mar 15, 2021
5fa91d1
add demangle and tcaches parameters to process
zer1t0 Mar 15, 2021
47e2358
add safe-link demangle to fast bins
zer1t0 Mar 16, 2021
52ee590
use fd_demangled in tcache parser
zer1t0 Mar 16, 2021
a289588
simplify tcaches check in heap explorer
zer1t0 Mar 16, 2021
efc2dc6
print correctly bins with safe-link
zer1t0 Mar 16, 2021
2905261
change demangle term by safe-link
zer1t0 Mar 16, 2021
689f56e
use packing in malloc chunk
zer1t0 Mar 20, 2021
edeca4f
use Timeout in _waitfor_libc
zer1t0 Mar 20, 2021
36b90b6
format import in arena.py
zer1t0 Mar 20, 2021
f965dc6
remove packing functions from glmalloc/utils
zer1t0 Mar 20, 2021
b3b5a48
pass ProcessInformer as argument to HeapExplorer
zer1t0 Jun 6, 2021
a33e276
remove pid from MallocChunk
zer1t0 Jun 6, 2021
9b9ce85
Created CoreFileInformer
zer1t0 Jun 12, 2021
aec1d10
get correct main heap from corefile in heap parser
zer1t0 Jun 12, 2021
d41ff5b
use corefile instead of process to read heap
zer1t0 Jun 12, 2021
79d94df
move heap_explorer to Corefile
zer1t0 Jun 12, 2021
1b20381
add corefile samples for heap explorer testing
zer1t0 Jun 12, 2021
94a8e29
add libc-2.32.so to samples
zer1t0 Jun 12, 2021
7f3a2cb
add custom libc_path option to heap_explorer
zer1t0 Jun 12, 2021
84d9ec0
add corefile as import for tests
zer1t0 Jun 12, 2021
ac28007
add fast bins corefile
zer1t0 Jun 12, 2021
307a479
put tests in methods
zer1t0 Jun 12, 2021
1e52515
remove maps from CoreFileInformer
zer1t0 Jun 12, 2021
ea696ca
move test samples to pwnlib.data.heap
zer1t0 Jun 13, 2021
c3d246a
change process mappings for corefile mappings
zer1t0 Jun 13, 2021
0ca2072
remove MemoryMaps
zer1t0 Jun 13, 2021
7817933
use ProcessInformer to parse process memory
zer1t0 Jun 13, 2021
aedf3b8
change 126 number for constant
zer1t0 Jun 13, 2021
32e0e1f
handle gracefully get_libc_version_from_name
zer1t0 Jun 13, 2021
3ec9aff
add libc_version parameter to manually indicate the libc version
zer1t0 Jun 13, 2021
13d3555
put elf.describe as an exclusive example
zer1t0 Jun 13, 2021
72d99e4
add corefile tests for all HeapExplorer public methods
zer1t0 Jun 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ venv
*.egg-info
*.core
.coverage
.idea
18 changes: 18 additions & 0 deletions docs/source/heap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. testsetup:: *

from pwnlib.heap import *
from pwnlib.tubes.process import process


:mod:`pwnlib.heap` --- Heap
===================================================

.. automodule:: pwnlib.heap

Allocators
-------------
.. toctree::
:maxdepth: 1
:glob:

heap/glmalloc
23 changes: 23 additions & 0 deletions docs/source/heap/glmalloc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. testsetup:: *

from pwnlib.heap.glmalloc import *
from pwnlib.tubes.process import process


:mod:`pwnlib.heap.glmalloc` --- glibc malloc
===================================================

Items
-------------
.. toctree::
:maxdepth: 1
:glob:

glmalloc/*


Examples
------------
.. automodule:: pwnlib.heap.glmalloc


17 changes: 17 additions & 0 deletions docs/source/heap/glmalloc/arena.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. testsetup:: *

from pwnlib.heap.glmalloc.arena import *

:mod:`pwnlib.heap.glmalloc.arena` --- Arena of libc
========================================================================

Arena
-------
.. autoclass:: pwnlib.heap.glmalloc.Arena()
:members:

NoTcacheError
--------------
.. autoclass:: pwnlib.heap.glmalloc.NoTcacheError()
:members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/source/heap/glmalloc/bins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. testsetup:: *

from pwnlib.heap.glmalloc.bins import *

:mod:`pwnlib.heap.glmalloc.bins` --- Bins of the libc
=========================================================

This modules contains the classes used to represent the different
bins of the libc.

Bins
-----
.. toctree::
:maxdepth: 2
:glob:

bins/*

20 changes: 20 additions & 0 deletions docs/source/heap/glmalloc/bins/bins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Bins (abstract classes)
==========================
Classes with generic behaviour that are inherit by the all
the bins types.


Bins
-----
.. autoclass:: pwnlib.heap.glmalloc.Bins()
:members:

Bin
----
.. autoclass:: pwnlib.heap.glmalloc.Bin()
:members:

BinEntry
---------
.. autoclass:: pwnlib.heap.glmalloc.BinEntry()
:members:
21 changes: 21 additions & 0 deletions docs/source/heap/glmalloc/bins/fastbins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Fast bins
==========
Classes to represent the tcache bins of the libc.

FastBins
---------
.. autoclass:: pwnlib.heap.glmalloc.FastBins()
:members:
:show-inheritance:

FastBin
--------
.. autoclass:: pwnlib.heap.glmalloc.FastBin()
:members:
:show-inheritance:

FastBinEntry
-------------
.. autoclass:: pwnlib.heap.glmalloc.FastBinEntry()
:members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/heap/glmalloc/bins/largebins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Large bins
===========
Classes to represent the large bins of the libc.

LargeBins
-----------
.. autoclass:: pwnlib.heap.glmalloc.LargeBins()
:members:
:show-inheritance:

LargeBin
----------
.. autoclass:: pwnlib.heap.glmalloc.LargeBin()
:members:
:show-inheritance:

LargeBinEntry
---------------
.. autoclass:: pwnlib.heap.glmalloc.LargeBinEntry()
:members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/heap/glmalloc/bins/smallbins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Small bins
===========
Classes to represent the small bins of the libc.

SmallBins
-----------
.. autoclass:: pwnlib.heap.glmalloc.SmallBins()
:members:
:show-inheritance:

SmallBin
----------
.. autoclass:: pwnlib.heap.glmalloc.SmallBin()
:members:
:show-inheritance:

SmallBinEntry
--------------
.. autoclass:: pwnlib.heap.glmalloc.SmallBinEntry()
:members:
:show-inheritance:
23 changes: 23 additions & 0 deletions docs/source/heap/glmalloc/bins/tcaches.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Tcaches
========
Classes to represent the tcache bins of the libc. Tcaches were
incorporated in libc 2.26, therefore this classes are only
used if the current libc version of the process is at least 2.26.

Tcaches
--------
.. autoclass:: pwnlib.heap.glmalloc.Tcaches()
:members:
:show-inheritance:

Tcache
-------
.. autoclass:: pwnlib.heap.glmalloc.Tcache()
:members:
:show-inheritance:

TcacheEntry
------------
.. autoclass:: pwnlib.heap.glmalloc.TcacheEntry()
:members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/heap/glmalloc/bins/unsortedbin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Unsorted bin
==============
Classes to represent the unsorted bin of the libc.

UnsortedBins
--------------
.. autoclass:: pwnlib.heap.glmalloc.UnsortedBins()
:members:
:show-inheritance:

UnsortedBin
-------------
.. autoclass:: pwnlib.heap.glmalloc.UnsortedBin()
:members:
:show-inheritance:

UnsortedBinEntry
------------------
.. autoclass:: pwnlib.heap.glmalloc.UnsortedBinEntry()
:members:
:show-inheritance:

16 changes: 16 additions & 0 deletions docs/source/heap/glmalloc/heap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. testsetup:: *

from pwnlib.heap.glmalloc.heap import *

:mod:`pwnlib.heap.glmalloc.heap` --- Heap managed by the libc
========================================================================

Heap
------
.. autoclass:: pwnlib.heap.glmalloc.Heap()
:members:

HeapError
-----------
.. autoclass:: pwnlib.heap.glmalloc.HeapError()
:members:
13 changes: 13 additions & 0 deletions docs/source/heap/glmalloc/heap_explorer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. testsetup:: *

from pwnlib.heap.glmalloc import *
from pwnlib.tubes.process import process
from pwnlib.elf.corefile import Corefile

Heap Explorer
===============

HeapExplorer
--------------
.. autoclass:: pwnlib.heap.glmalloc.HeapExplorer()
:members:
11 changes: 11 additions & 0 deletions docs/source/heap/glmalloc/malloc_chunk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. testsetup:: *

from pwnlib.heap.glmalloc.malloc_chunk import *

:mod:`pwnlib.heap.glmalloc.malloc_chunk` --- Chunks with metadata managed by libc
===================================================================================

MallocChunk
---------------
.. autoclass:: pwnlib.heap.glmalloc.MallocChunk()
:members:
24 changes: 24 additions & 0 deletions docs/source/heap/glmalloc/malloc_state.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. testsetup:: *

from pwnlib.heap.glmalloc.malloc_state import *

:mod:`pwnlib.heap.glmalloc.malloc_state` --- Malloc state of each arena of the libc
=====================================================================================


MallocState
------------
.. autoclass:: pwnlib.heap.glmalloc.MallocState()
:members:


FastBinsY
-----------
.. autoclass:: pwnlib.heap.glmalloc.malloc_state.FastBinsY()
:members:

Bins
------
.. autoclass:: pwnlib.heap.glmalloc.malloc_state.Bins()
:members:

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Each of the ``pwntools`` modules is documented here.
flag
fmtstr
gdb
heap
libcdb
log
memleak
Expand Down
1 change: 1 addition & 0 deletions pwn/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
from pwnlib.util.sh_string import sh_string, sh_prepare, sh_command_with
from pwnlib.util.splash import *
from pwnlib.util.web import *
from pwnlib.heap import *

# Promote these modules, so that "from pwn import *" will let you access them

Expand Down
1 change: 1 addition & 0 deletions pwnlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'util',
'adb',
'update',
'heap'
]

for module in __all__:
Expand Down
1 change: 1 addition & 0 deletions pwnlib/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# These files are not distributed with Pwntools, but
# are in the source tree and used for testing.
from pwnlib.data import elf
from pwnlib.data import heap
except ImportError:
pass

Expand Down
8 changes: 8 additions & 0 deletions pwnlib/data/heap/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from __future__ import absolute_import
from pwnlib.data.heap import x86_64

import os
path = os.path.dirname(__file__)

def get(x):
return os.path.join(path, x)
5 changes: 5 additions & 0 deletions pwnlib/data/heap/x86_64/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import os
path = os.path.dirname(__file__)

def get(x):
return os.path.join(path, x)
Binary file added pwnlib/data/heap/x86_64/core.23.fast_bins1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/core.32.large_bins1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/core.32.sample1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/core.32.small_bins1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/core.32.tcaches1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/core.32.unsorted_bins1
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/libc-2.23.so
Binary file not shown.
Binary file added pwnlib/data/heap/x86_64/libc-2.32.so
Binary file not shown.
Loading