| skipped 653 lines |
654 | 654 | | ) |
655 | 655 | | conf._bool_ctt = ctt |
656 | 656 | | conf._bool_ctf = ctf |
| 657 | + | if case == "Page Content" and conf._match_ratio_check: |
| 658 | + | is_vulner = False |
| 659 | + | if ratio_true != ratio_false and conf.match_ratio == ratio_true: |
| 660 | + | is_vulner = True |
| 661 | + | case = "Page Content" |
| 662 | + | difference = match_string if match_string else not_match_string |
| 663 | + | elif ratio_true != ratio_false and conf.match_ratio == ratio_false: |
| 664 | + | is_vulner = True |
| 665 | + | case = "Page Content" |
| 666 | + | difference = match_string if match_string else not_match_string |
| 667 | + | else: |
| 668 | + | difference = "" |
657 | 669 | | if case == "Page Ratio": |
658 | 670 | | w0set = set(get_filtered_page_content(base.text, True, "\n").split("\n")) |
659 | 671 | | w1set = set(get_filtered_page_content(attack_true.text, True, "\n").split("\n")) |
| skipped 61 lines |
721 | 733 | | ): |
722 | 734 | | is_vulner = True |
723 | 735 | | case = "Match Ratio" |
| 736 | + | elif ( |
| 737 | + | difference |
| 738 | + | and conf.match_ratio |
| 739 | + | and conf.match_ratio in [ratio_true, ratio_false] |
| 740 | + | ): |
| 741 | + | if not conf._match_ratio_check: |
| 742 | + | is_vulner = True |
| 743 | + | case = "Page Ratio, Match Ratio" |
| 744 | + | conf._match_ratio_check = True |
724 | 745 | | if difference and is_vulner: |
725 | 746 | | string = difference |
726 | 747 | | not_string = "" |
| skipped 1351 lines |