Whether the Numberth occurrence of the first string in the second string is inside a script tag
(text, index, body)
| 342 | """Return a XSSDict if there is a XSS otherwise return None""" |
| 343 | |
| 344 | def in_script(text, index, body) -> bool: |
| 345 | """Whether the Numberth occurrence of the first string in the second |
| 346 | string is inside a script tag""" |
| 347 | paths = paths_to_text(body.decode("utf-8"), text.decode("utf-8")) |
| 348 | try: |
| 349 | path = paths[index] |
| 350 | return "script" in path |
| 351 | except IndexError: |
| 352 | return False |
| 353 | |
| 354 | def in_HTML(text: bytes, index: int, body: bytes) -> bool: |
| 355 | """Whether the Numberth occurrence of the first string in the second |
no test coverage detected
searching dependent graphs…