OXIESEC PANEL
- Current Dir:
/
/
lib
/
python2.7
/
site-packages
/
pip
/
_vendor
/
urllib3
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 12:45:09 PM
rwxr-xr-x
📄
__init__.py
2.79 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
__init__.pyc
3.02 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
__init__.pyo
3.02 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
_collections.py
9.96 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
_collections.pyc
12.89 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
_collections.pyo
12.89 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
connection.py
12.7 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
connection.pyc
10.6 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
connection.pyo
10.6 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
connectionpool.py
34.53 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
connectionpool.pyc
26.6 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
connectionpool.pyo
26.6 KB
04/21/2022 06:08:34 PM
rw-r--r--
📁
contrib
-
03/16/2023 12:45:09 PM
rwxr-xr-x
📄
exceptions.py
6.45 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
exceptions.pyc
13.03 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
exceptions.pyo
13.03 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
fields.py
5.8 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
fields.pyc
6.67 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
fields.pyo
6.67 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
filepost.py
2.27 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
filepost.pyc
3.25 KB
04/21/2022 06:08:34 PM
rw-r--r--
📄
filepost.pyo
3.25 KB
04/21/2022 06:08:34 PM
rw-r--r--
📁
packages
-
03/16/2023 12:45:09 PM
rwxr-xr-x
📄
poolmanager.py
16.43 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
poolmanager.pyc
14.7 KB
04/21/2022 06:08:35 PM
rw-r--r--
📄
poolmanager.pyo
14.7 KB
04/21/2022 06:08:35 PM
rw-r--r--
📄
request.py
5.81 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
request.pyc
5.96 KB
04/21/2022 06:08:35 PM
rw-r--r--
📄
request.pyo
5.96 KB
04/21/2022 06:08:35 PM
rw-r--r--
📄
response.py
22.37 KB
04/21/2022 06:08:21 PM
rw-r--r--
📄
response.pyc
19.13 KB
04/21/2022 06:08:35 PM
rw-r--r--
📄
response.pyo
19.13 KB
04/21/2022 06:08:35 PM
rw-r--r--
📁
util
-
03/16/2023 12:45:09 PM
rwxr-xr-x
Editing: filepost.py
Close
from __future__ import absolute_import import codecs from uuid import uuid4 from io import BytesIO from .packages import six from .packages.six import b from .fields import RequestField writer = codecs.lookup('utf-8')[3] def choose_boundary(): """ Our embarrassingly-simple replacement for mimetools.choose_boundary. """ return uuid4().hex def iter_field_objects(fields): """ Iterate over fields. Supports list of (k, v) tuples and dicts, and lists of :class:`~urllib3.fields.RequestField`. """ if isinstance(fields, dict): i = six.iteritems(fields) else: i = iter(fields) for field in i: if isinstance(field, RequestField): yield field else: yield RequestField.from_tuples(*field) def iter_fields(fields): """ .. deprecated:: 1.6 Iterate over fields. The addition of :class:`~urllib3.fields.RequestField` makes this function obsolete. Instead, use :func:`iter_field_objects`, which returns :class:`~urllib3.fields.RequestField` objects. Supports list of (k, v) tuples and dicts. """ if isinstance(fields, dict): return ((k, v) for k, v in six.iteritems(fields)) return ((k, v) for k, v in fields) def encode_multipart_formdata(fields, boundary=None): """ Encode a dictionary of ``fields`` using the multipart/form-data MIME format. :param fields: Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`). :param boundary: If not specified, then a random boundary will be generated using :func:`mimetools.choose_boundary`. """ body = BytesIO() if boundary is None: boundary = choose_boundary() for field in iter_field_objects(fields): body.write(b('--%s\r\n' % (boundary))) writer(body).write(field.render_headers()) data = field.data if isinstance(data, int): data = str(data) # Backwards compatibility if isinstance(data, six.text_type): writer(body).write(data) else: body.write(data) body.write(b'\r\n') body.write(b('--%s--\r\n' % (boundary))) content_type = str('multipart/form-data; boundary=%s' % boundary) return body.getvalue(), content_type