Repository: Gallopsled/pwntools

Issue:
AttributeError: 'IntervalTree' object has no attribute 'search'
Running the latest version of pwntools from pip and python2:

```
In [1]: from pwn import *

In [2]: elf = ELF("./age_calc")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-f9356b282eac> in <module>()
----> 1 elf = ELF("./age_calc")

/home/r2/formatStringExploiter/local/lib/python2.7/site-packages/pwnlib/elf/elf.pyc in __init__(self, path, checksec)
    321
    322             #: Path to the linker for the ELF
--> 323             self.linker = self.read(seg.header.p_vaddr, seg.header.p_memsz)
    324             self.linker = self.linker.rstrip('\x00')
    325

/home/r2/formatStringExploiter/local/lib/python2.7/site-packages/pwnlib/elf/elf.pyc in read(self, address, count)
   1129         stop = address + count
   1130
-> 1131         overlap = self.memory.search(start, stop)
   1132
   1133         # Create a new view of memory, for just what we need

AttributeError: 'IntervalTree' object has no attribute 'search'
```

```
pip freeze
alabaster==0.7.12
asn1crypto==0.24.0
atomicwrites==1.2.1
attrs==18.2.0
Babel==2.6.0
backports.shutil-get-terminal-size==1.0.0
bcrypt==3.1.5
capstone==4.0.0
certifi==2018.11.29
cffi==1.11.5
chardet==3.0.4
CommonMark==0.5.4
cryptography==2.4.2
decorator==4.3.0
docutils==0.14
enum34==1.1.6
filelock==3.0.10
formatStringExploiter==0.1.4
funcsigs==1.0.2
idna==2.8
imagesize==1.1.0
intervaltree==3.0.2
ipaddress==1.0.22
ipython==5.8.0
ipython-genutils==0.2.0
Jinja2==2.10
Mako==1.0.7
MarkupSafe==1.1.0
more-itertools==4.3.0
packaging==18.0
paramiko==2.4.2
pathlib2==2.3.3
pexpect==4.6.0
pickleshare==0.7.5
pkg-resources==0.0.0
pluggy==0.8.0
pockets==0.7.2
prettytable==0.7.2
prompt-toolkit==1.0.15
psutil==5.4.8
ptyprocess==0.6.0
pwntools==3.14.0.dev0
py==1.7.0
pyasn1==0.4.4
pycparser==2.19
pyelftools==0.25
Pygments==2.3.1
PyNaCl==1.3.0
pyparsing==2.3.0
pyserial==3.4
PySocks==1.6.8
pytest==4.0.2
python-dateutil==2.7.5
pytz==2018.7
r2pipe==1.2.0
recommonmark==0.4.0
requests==2.21.0
ROPGadget==5.4
scandir==1.9.0
simplegeneric==0.8.1
six==1.12.0
snowballstemmer==1.2.1
sortedcontainers==1.5.10
Sphinx==1.8.2
sphinx-rtd-theme==0.4.2
sphinxcontrib-napoleon==0.7
sphinxcontrib-websupport==1.1.0
toml==0.10.0
tox==3.6.0
traitlets==4.3.2
typing==3.6.6
unicorn==1.0.1
urllib3==1.24.1
virtualenv==16.1.0
wcwidth==0.1.7
```


Discussion:
Confirming that this is affecting `dev`.  I really wish intervaltree would stop breaking... #1154 was pretty recent (though from a sub-dependency).  It looks like the 3.x release removed the `search` method.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@
                         'pypandoc',
                         'packaging',
                         'psutil>=3.3.0',
-                        'intervaltree',
+                        'intervaltree<3.0', # See Gallopsled/pwntools#1238
                         'sortedcontainers<2.0', # See Gallopsled/pwntools#1154
                         'unicorn']
 


Test patch: