Repository navigation
fix: preserve protocol metadata in Burp XML imports - #6164
Closed
liangzaihuanyv wants to merge 1 commit into
Closed
liangzaihuanyv wants to merge 1 commit into
liangzaihuanyv wants to merge 1 commit into
Conversation
Member
|
thank you for the report. i needed to do some adjustments on our own |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve each Burp XML history item's explicit
http/httpsprotocol when deriving its target URL. This uses metadata already present in the existing XML match; it does not infer TLS from additional port numbers or change the supported XML matcher.Problem
The Burp XML import path currently extracts the port and base64 request but drops
<protocol>. An origin-form request withHost: example.testtherefore imports an HTTPS item on port 8443 ashttp://example.test:8443/.... An explicit HTTP item on port 443 is likewise inferred as HTTPS.A global
--force-sslworks for an HTTPS-only import, but cannot preserve a history containing both HTTP and HTTPS items. This is distinct from a plain raw request file that has no transport metadata.For example, the existing XML format can contain:
The decoded request is
GET /?id=1 HTTP/1.1withHost: example.test. Its imported target should behttps://example.test:8443/?id=1, not HTTP.Changes
--force-sslhandling.No change to plain Burp/WebScarab logs, the XML matcher, or other target sources is intended.
Validation
On Windows, CPython 3.12.10, using stdlib
unittestwith an external runner that denies socket/DNS calls:test_common,test_option,test_targeturl, andtest_target_parsing(the 16 new tests are included, not additional)._setMultipleTargets/_setRequestFromFile->parseTargetUrlwith mixed HTTP/HTTPS metadata and with/without--force-ssl; no target requests or core stubs were used.git diff --check, and static Python 3.8 / compatible-grammar parsing passed.This is focused local validation, not the full suite or the upstream OS/Python matrix. Python 2.7/PyPy, Python 3.8/3.14, live-target, DBMS, smoke, vulnerability and API tests were not run locally. No claim of a demonstrated injection finding or security vulnerability is made.
Contribution note
The implementation and tests were prepared with AI assistance, including a separate review of the scoped changes and test evidence.