From the HTTP packet string, populate the scapy object
(self, s)
| 533 | ) |
| 534 | |
| 535 | def do_dissect(self, s): |
| 536 | """From the HTTP packet string, populate the scapy object""" |
| 537 | first_line, body = _dissect_headers(self, s) |
| 538 | try: |
| 539 | Method, Path, HTTPVersion = re.split(rb"\s+", first_line, maxsplit=2) |
| 540 | self.setfieldval("Method", Method) |
| 541 | self.setfieldval("Path", Path) |
| 542 | self.setfieldval("Http_Version", HTTPVersion) |
| 543 | except ValueError: |
| 544 | pass |
| 545 | if body: |
| 546 | self.raw_packet_cache = s[: -len(body)] |
| 547 | else: |
| 548 | self.raw_packet_cache = s |
| 549 | return body |
| 550 | |
| 551 | def mysummary(self): |
| 552 | return self.sprintf("%HTTPRequest.Method% '%HTTPRequest.Path%' ") |
nothing calls this directly
no test coverage detected