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