소스 검색

better handling of binary files

tags/v0.3.0
Jonathan Cobb 4 년 전
부모
커밋
11b4029e2d
2개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. +6
    -2
      automation/roles/mitmproxy/files/bubble_modify.py
  2. +1
    -1
      bubble-web

+ 6
- 2
automation/roles/mitmproxy/files/bubble_modify.py 파일 보기

@@ -53,6 +53,10 @@ def bubble_filter_chunks(chunks, req_id, content_encoding, content_type, device,
def bubble_modify(req_id, content_encoding, content_type, device, matchers):
return lambda chunks: bubble_filter_chunks(chunks, req_id, content_encoding, content_type, device, matchers)

def send_bubble_response(response):
for chunk in response.iter_content(8192):
yield chunk


def responseheaders(flow):

@@ -66,7 +70,7 @@ def responseheaders(flow):
}
response = None
if flow.request.method == 'GET':
response = requests.get(uri, headers=headers)
response = requests.get(uri, headers=headers, stream=True)
elif flow.request.method == 'POST':
bubble_log('responseheaders: special bubble request: POST content is '+str(flow.request.content))
headers['Content-Length'] = str(len(flow.request.content))
@@ -79,7 +83,7 @@ def responseheaders(flow):
for key, value in response.headers.items():
flow.response.headers[key] = value
flow.response.status_code = response.status_code
flow.response.stream = lambda chunks: response.text
flow.response.stream = lambda chunks: send_bubble_response(response)

elif (HEADER_BUBBLE_MATCHERS in flow.request.headers
and HEADER_BUBBLE_DEVICE in flow.request.headers):


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit a8a820526b70c31df378e7eceb7125e25faef40c
Subproject commit 3b10b3694ff737ad5c47338d493cfc59c1993dae

불러오는 중...
취소
저장