mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
netlib.strutils -> mitmproxy.utils.strutils
This commit is contained in:
parent
1407830280
commit
f45f4e677e
@ -2,7 +2,7 @@ import string
|
||||
import lxml.html
|
||||
import lxml.etree
|
||||
from mitmproxy import contentviews
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
class ViewPigLatin(contentviews.View):
|
||||
|
@ -15,7 +15,7 @@ import pytz
|
||||
import mitmproxy
|
||||
|
||||
from mitmproxy import version
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib.http import cookies
|
||||
|
||||
HAR = {}
|
||||
|
@ -8,7 +8,7 @@ tcp_message Inline Script Hook API Demonstration
|
||||
example cmdline invocation:
|
||||
mitmdump -T --host --tcp ".*" -q -s examples/tcp_message.py
|
||||
"""
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
def tcp_message(tcp_msg):
|
||||
|
@ -9,7 +9,7 @@ from mitmproxy import ctx
|
||||
from mitmproxy import exceptions
|
||||
from mitmproxy import flowfilter
|
||||
from mitmproxy.utils import human
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
def indent(n, text):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import urllib
|
||||
import hashlib
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from mitmproxy import exceptions
|
||||
from mitmproxy import ctx
|
||||
from mitmproxy import io
|
||||
|
@ -35,7 +35,7 @@ from mitmproxy import exceptions
|
||||
from mitmproxy.contrib.wbxml import ASCommandResponse
|
||||
from netlib import http
|
||||
from netlib import multidict
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib.http import url
|
||||
|
||||
try:
|
||||
|
@ -40,7 +40,7 @@ from mitmproxy import http
|
||||
from mitmproxy import tcp
|
||||
from mitmproxy import flow
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
import pyparsing as pp
|
||||
from typing import Callable
|
||||
|
@ -5,7 +5,7 @@ This module handles the import of mitmproxy flows generated by old versions.
|
||||
from typing import Any
|
||||
|
||||
from mitmproxy import version
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
def convert_011_012(data):
|
||||
|
@ -4,7 +4,7 @@ import os
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
from OpenSSL import SSL, crypto
|
||||
|
||||
|
@ -4,7 +4,7 @@ import struct
|
||||
from OpenSSL import SSL
|
||||
from mitmproxy import exceptions
|
||||
from mitmproxy.proxy.protocol import base
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib import tcp
|
||||
from netlib import websockets
|
||||
|
||||
|
@ -4,7 +4,7 @@ from typing import Callable, Optional
|
||||
import urwid
|
||||
from mitmproxy.tools.console import signals
|
||||
from mitmproxy.tools.console.grideditor import base
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
def read_file(filename: str, callback: Callable[..., None], escaped: bool) -> Optional[str]:
|
||||
|
@ -35,7 +35,9 @@ from mitmproxy.tools.console import signals
|
||||
from mitmproxy.tools.console import statusbar
|
||||
from mitmproxy.tools.console import window
|
||||
from mitmproxy.flowfilter import FMarked
|
||||
from netlib import tcp, strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
from netlib import tcp
|
||||
|
||||
EVENTLOG_SIZE = 500
|
||||
|
||||
|
@ -2,7 +2,7 @@ import re
|
||||
|
||||
import collections
|
||||
from netlib import multidict
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
# See also: http://lucumr.pocoo.org/2013/7/2/the-updated-guide-to-unicode/
|
||||
|
||||
|
@ -2,7 +2,9 @@ import re
|
||||
import warnings
|
||||
from typing import Optional
|
||||
|
||||
from netlib import encoding, strutils, basetypes
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib import encoding
|
||||
from netlib import basetypes
|
||||
from netlib.http import headers
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ import re
|
||||
import urllib
|
||||
|
||||
from netlib import multidict
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib.http import multipart
|
||||
from netlib.http import cookies
|
||||
from netlib.http import headers as nheaders
|
||||
|
@ -10,7 +10,7 @@ import binascii
|
||||
|
||||
from typing import Optional # noqa
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
import certifi
|
||||
from backports import ssl_match_hostname
|
||||
|
@ -3,7 +3,7 @@ import struct
|
||||
import io
|
||||
|
||||
from netlib import tcp
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib import utils
|
||||
from mitmproxy.utils import human
|
||||
from .masker import Masker
|
||||
|
@ -8,7 +8,8 @@ import base64
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
from netlib import http, strutils
|
||||
from netlib import http
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
MAGIC = b'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
|
||||
VERSION = "13"
|
||||
|
@ -3,7 +3,9 @@ import traceback
|
||||
import urllib
|
||||
import io
|
||||
|
||||
from netlib import http, tcp, strutils
|
||||
from netlib import http
|
||||
from netlib import tcp
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
|
||||
class ClientConn:
|
||||
|
@ -4,7 +4,7 @@ import abc
|
||||
import functools
|
||||
import pyparsing as pp
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from mitmproxy.utils import human
|
||||
|
||||
from . import generators, exceptions
|
||||
|
@ -1,6 +1,6 @@
|
||||
import abc
|
||||
from . import actions, exceptions
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
|
||||
LOG_TRUNCATE = 1024
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import random
|
||||
import string
|
||||
import netlib.websockets
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
import pyparsing as pp
|
||||
from . import base, generators, actions, message
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import time
|
||||
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from mitmproxy.utils import human
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ import OpenSSL.crypto
|
||||
import logging
|
||||
|
||||
from netlib.tutils import treq
|
||||
from netlib import strutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib import tcp, certutils, websockets, socks
|
||||
from netlib import exceptions
|
||||
from netlib.http import http1
|
||||
|
@ -1,4 +1,5 @@
|
||||
from netlib import strutils, tutils
|
||||
from mitmproxy.utils import strutils
|
||||
from netlib import tutils
|
||||
|
||||
|
||||
def test_always_bytes():
|
Loading…
Reference in New Issue
Block a user