Skip to content

Commit

Permalink
Merge 37b5e42 into 0aa1a23
Browse files Browse the repository at this point in the history
  • Loading branch information
heapcrash committed May 31, 2021
2 parents 0aa1a23 + 37b5e42 commit 4958067
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The table below shows which release corresponds to each branch, and what date th
- [#1893][1893] Fix bytes warning in "pwn cyclic"
- [#1903][1903] Add zsh completion script
- [#1904][1904] Add bash completion script
- [#1906][1906] Defer import of urlrequests and urllib

[1733]: https://github.com/Gallopsled/pwntools/pull/1733
[1876]: https://github.com/Gallopsled/pwntools/pull/1876
Expand All @@ -76,6 +77,7 @@ The table below shows which release corresponds to each branch, and what date th
[1893]: https://github.com/Gallopsled/pwntools/pull/1893
[1903]: https://github.com/Gallopsled/pwntools/pull/1903
[1904]: https://github.com/Gallopsled/pwntools/pull/1904
[1906]: https://github.com/Gallopsled/pwntools/pull/1906

## 4.6.0 (`beta`)

Expand Down
1 change: 0 additions & 1 deletion pwn/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import os
import platform
import re
import requests
import socks
import signal
import string
Expand Down
10 changes: 7 additions & 3 deletions pwnlib/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
import codecs
import json
import os
import requests
import tempfile

from six.moves import urllib

from pwnlib.context import context
from pwnlib.elf import ELF
from pwnlib.log import getLogger
Expand All @@ -29,6 +26,10 @@
# https://gitlab.com/libcdb/libcdb wasn't updated after 2019,
# but still is a massive database of older libc binaries.
def provider_libcdb(hex_encoded_id, hash_type):
# Deferred import because it's slow
import requests
from six.moves import urllib

# Build the URL using the requested hash type
url_base = "https://gitlab.com/libcdb/libcdb/raw/master/hashes/%s/" % hash_type
url = urllib.parse.urljoin(url_base, hex_encoded_id)
Expand All @@ -53,6 +54,9 @@ def provider_libcdb(hex_encoded_id, hash_type):

# https://libc.rip/
def provider_libc_rip(hex_encoded_id, hash_type):
# Deferred import because it's slow
import requests

# Build the request for the hash type
# https://github.com/niklasb/libc-database/blob/master/searchengine/api.yml
if hash_type == 'build_id':
Expand Down

0 comments on commit 4958067

Please sign in to comment.