httpdbg 2.1.2__tar.gz → 2.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {httpdbg-2.1.2 → httpdbg-2.1.4}/PKG-INFO +1 -1
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/__init__.py +1 -1
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/__main__.py +5 -5
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/api.js +50 -55
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/render.js +1 -1
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg.egg-info/PKG-INFO +1 -1
- {httpdbg-2.1.2 → httpdbg-2.1.4}/LICENSE +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/README.md +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/args.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/env.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/exception.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/export.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/__init__.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/aiohttp.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/all.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/external.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/fastapi.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/flask.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/generic.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/h2.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/http.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/httpx.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/pytest.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/record.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/recordhttp1.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/recordhttp2.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/requests.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/socket.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/starlette.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/template_sitecustomize.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/unittest.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/urllib3.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/utils.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/hooks/uvicorn.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/http_status_code.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/initiator.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/log.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/mode_console.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/mode_module.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/mode_script.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/preview.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/records.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/server.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/utils.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/__init__.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/api.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/app.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/column.css +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/configuration.css +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/configuration.js +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/detail.css +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/favicon.ico +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/filter.js +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/download-install-line-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/engine-gears-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/eye-blind-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/eye-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/files-papers-outline-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/filter-outline-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/lock-line-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/lock-open-line-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/math-multiplication-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/push-pin-green-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/recycle-bin-line-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/wait-sandclock-icon.svg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/index.htm +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/main.js +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/mustache.min.js +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/style.css +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/table.css +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg.egg-info/SOURCES.txt +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg.egg-info/dependency_links.txt +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg.egg-info/entry_points.txt +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg.egg-info/top_level.txt +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/pyproject.toml +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/setup.cfg +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_api.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_cli.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_context_manager.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_aiohttp.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_h2.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_httpx.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_pytest.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_requests.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_unittest.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_hook_urllib3.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_initiator.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_mode_console.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_mode_module_pytest.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_mode_script.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_multiprocess.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_preview.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_pyhttpdbg_server.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_server.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_server_hook_fastapi.py +0 -0
- {httpdbg-2.1.2 → httpdbg-2.1.4}/tests/test_server_hook_flask.py +0 -0
|
@@ -28,11 +28,6 @@ def pyhttpdbg(
|
|
|
28
28
|
|
|
29
29
|
set_env_for_logging(params.log_level, params.log)
|
|
30
30
|
|
|
31
|
-
url = f"http://{params.host}:{params.port}/{'?hi=on' if params.console else ''}"
|
|
32
|
-
|
|
33
|
-
if not params.no_banner:
|
|
34
|
-
print_msg(f" httpdbg - HTTP(S) requests available at {url}")
|
|
35
|
-
|
|
36
31
|
sys.path.insert(0, "") # to mimic the default python command behavior
|
|
37
32
|
|
|
38
33
|
def run_recorder(
|
|
@@ -58,6 +53,11 @@ def pyhttpdbg(
|
|
|
58
53
|
export_html(records, Path(params.export_html))
|
|
59
54
|
|
|
60
55
|
else:
|
|
56
|
+
url = f"http://{params.host}:{params.port}/{'?hi=on' if params.console else ''}"
|
|
57
|
+
|
|
58
|
+
if not params.no_banner:
|
|
59
|
+
print_msg(f" httpdbg - HTTP(S) requests available at {url}")
|
|
60
|
+
|
|
61
61
|
with httpdbg_srv(params.host, params.port) as records:
|
|
62
62
|
|
|
63
63
|
run_recorder(records, params.initiator, not params.only_client, test_mode)
|
|
@@ -84,37 +84,35 @@ async function get_all_requests() {
|
|
|
84
84
|
|
|
85
85
|
const data = await load_all_requests();
|
|
86
86
|
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
if (data) {
|
|
88
|
+
if (data.session.id != global.session) {
|
|
89
|
+
clean();
|
|
90
|
+
global.session = data.session.id;
|
|
91
|
+
global.sessions[data.session.id] = data.session;
|
|
92
|
+
};
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
global.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Object.assign(global.groups, data.groups);
|
|
100
|
-
|
|
101
|
-
// for the requests, we may have to update them
|
|
102
|
-
for (const [request_id, request] of Object.entries(data.requests)) {
|
|
103
|
-
if (!(request_id in global.requests)) {
|
|
104
|
-
// this is a new request
|
|
105
|
-
save_request(request_id, request, data.session.id);
|
|
106
|
-
} else {
|
|
107
|
-
if (global.requests[request_id].last_update < request.last_update) {
|
|
108
|
-
// this request has been updated (probably a "big" file)
|
|
94
|
+
// for the initiators and the groups, we can just save them without any verification
|
|
95
|
+
Object.assign(global.initiators, data.initiators);
|
|
96
|
+
Object.assign(global.groups, data.groups);
|
|
97
|
+
|
|
98
|
+
// for the requests, we may have to update them
|
|
99
|
+
for (const [request_id, request] of Object.entries(data.requests)) {
|
|
100
|
+
if (!(request_id in global.requests)) {
|
|
101
|
+
// this is a new request
|
|
109
102
|
save_request(request_id, request, data.session.id);
|
|
110
|
-
}
|
|
103
|
+
} else {
|
|
104
|
+
if (global.requests[request_id].last_update < request.last_update) {
|
|
105
|
+
// this request has been updated (probably a "big" file)
|
|
106
|
+
save_request(request_id, request, data.session.id);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
111
109
|
};
|
|
112
|
-
}
|
|
110
|
+
}
|
|
113
111
|
}
|
|
114
112
|
|
|
115
113
|
async function load_request(request_id) {
|
|
116
114
|
if (typeof global.static_requests !== "undefined") {
|
|
117
|
-
global.connected = false;
|
|
115
|
+
global.connected = false;
|
|
118
116
|
return global.static_requests[request_id];
|
|
119
117
|
}
|
|
120
118
|
|
|
@@ -126,46 +124,43 @@ async function load_request(request_id) {
|
|
|
126
124
|
} catch (error) {
|
|
127
125
|
global.connected = false;
|
|
128
126
|
return null;
|
|
129
|
-
}
|
|
127
|
+
}
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
async function get_request(request_id) {
|
|
133
|
-
|
|
134
131
|
const data = await load_request(request_id);
|
|
135
132
|
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
) || data.request.body.text
|
|
149
|
-
);
|
|
150
|
-
}
|
|
133
|
+
if (data) {
|
|
134
|
+
global.requests[request_id].filter = prepare_for_filter(global.requests[request_id].url);
|
|
135
|
+
|
|
136
|
+
global.requests[request_id].request = data.request;
|
|
137
|
+
if (data.request.body && data.request.body.text) {
|
|
138
|
+
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
139
|
+
parse_raw_text(
|
|
140
|
+
data.request.body.text,
|
|
141
|
+
data.request.body.content_type
|
|
142
|
+
) || data.request.body.text
|
|
143
|
+
);
|
|
144
|
+
}
|
|
151
145
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
146
|
+
global.requests[request_id].response = data.response;
|
|
147
|
+
if (data.response.body && data.response.body.text) {
|
|
148
|
+
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
149
|
+
parse_raw_text(
|
|
150
|
+
data.response.body.text,
|
|
151
|
+
data.response.body.content_type
|
|
152
|
+
) || data.response.body.text
|
|
153
|
+
);
|
|
154
|
+
}
|
|
161
155
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
// the full stack is not present in request summary
|
|
157
|
+
global.requests[request_id].initiator_id = data.initiator_id;
|
|
158
|
+
global.requests[request_id].exception = data.exception;
|
|
165
159
|
|
|
166
|
-
|
|
160
|
+
global.requests[request_id].to_refresh = true;
|
|
167
161
|
|
|
168
|
-
|
|
162
|
+
global.requests[request_id].loaded = true;
|
|
163
|
+
}
|
|
169
164
|
}
|
|
170
165
|
|
|
171
166
|
async function pol_new_data() {
|
|
@@ -7,7 +7,7 @@ async function refresh_resquests() {
|
|
|
7
7
|
var template_request = document.getElementById("template_request").innerHTML;
|
|
8
8
|
var template_group = document.getElementById("template_group").innerHTML;
|
|
9
9
|
|
|
10
|
-
if (global.session
|
|
10
|
+
if (session_id != null && global.session !== session_id) {
|
|
11
11
|
clean();
|
|
12
12
|
};
|
|
13
13
|
session_id = global.session;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-2.1.2 → httpdbg-2.1.4}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|