Gallopsled/pwntools — pull request #164 by zachriggle (2014-11-06 22:33:45+00:00)
Title: Change "wget" to use the requests library

Change "wget" to use the requests library. Also adds the entire requests library to the top level. E.g. `from pwn import *` => `get` is now a global object.

This also makes it a bit easier to extend the `wget` command with keyword arguments that could be provided to the `requests.get` method, for example `auth=(username,password)`.

This also fixes requests for when `'content-length'` is not provided as a header.

```
>>> from pwn import *
>>> import requests
>>> get == requests.get
True
>>> data = wget('http://natas0.natas.labs.overthewire.org', auth=('natas0','natas0'))
[*] Downloading 'http://natas0.natas.labs.overthewire.org'...
[*] Downloading 'http://natas0.natas.labs.overthewire.org': 1 / 385 bytes
[+] Downloading 'http://natas0.natas.labs.overthewire.org': 265 bytes
>>> print data.splitlines()[-5:-4]
['']
```