| 553 | |
| 554 | |
| 555 | def format_httpx_result(text): |
| 556 | texts, results = text.split('\n'), [] |
| 557 | |
| 558 | for text in texts: |
| 559 | try: |
| 560 | assert (text.startswith('http://') or text.startswith('https://')) |
| 561 | url, code, end = text.split(' ', 2) |
| 562 | except: |
| 563 | continue |
| 564 | |
| 565 | results.append('{code} {url} {end}'.format(code=code, url=url, end=end)) |
| 566 | |
| 567 | if results == []: |
| 568 | sublime.message_dialog('[waring-httpx] The result format is not supported! Please read the docs') |
| 569 | return '' |
| 570 | |
| 571 | return '\n'.join(sorted(results)) |
| 572 | |
| 573 | |
| 574 | def format_nuclei_result(text): |