how to define a formatted string with requests ? #1970
Unanswered
commandline-be
asked this question in
Questions
Replies: 1 comment
-
@commandline-be how about a regex? 😩 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear
Having to work with CPE 2.3 and CPE 2.2 strings i find myself wanting for a way to define a formatted string. I'd like to submit this as https://url/cpe/
CPE look like as defined here https://nvd.nist.gov/products/cpe (XML spec)
Now i don't expect people to do the work for me but i do think it is important to share some detail here to understand what i'm trying to achieve. I hope to be able to validate the and send it in the correct format to a backend which then returns json.
So essentially i'm looking how to parse a in the format show below and check if it contains either a value or a
:*
With the well formed name (WFN) looking like
cpe:<version>:<part>:<vendor>:<product>:<version>:<update>:<edition>:<language>:<sw_edition>:<target_sw>:<target_hw>:<other>
the formatted cpestring looks like for examplecpe:2.3:a:microsoft:internet_explorer:8.0.6001:beta:*:*:*:*:*:*
the WFN is strict in the sense that (for completeness i add all) descriptions (spec is WFN 5.3.2 in nistir7695.pdf)
in conclusion an otherview of the and their scope
<version>
: is either "2.2" or "2.3" (without the quotes)<part>
: The part attribute SHALL have one of these three string values: The value “a”, when the WFN is for a class of applications.
The value “o”, when the WFN is for a class of operating systems.
The value “h”, when the WFN is for a class of hardware devices.
<vendor>
is a string of characters<product>
is a string of characters<version>
is a string of characters<update>
is a string of characters<edition>
is a string of characters<language>
region code as for RFC5646<sw_edition>
is a string of characters to characterize how the product is tailored<target_sw>
is a string of characters to characterize the computing environment<target_hw>
is a string of characters to characterize the instruction set<other>
is a string of characters but not URL, UUID etc.Beta Was this translation helpful? Give feedback.
All reactions