tomato42/tlsfuzzer

View on GitHub

Showing 302 of 302 total issues

File analysis.py has 2474 lines of code (exceeds 500 allowed). Consider refactoring.
Open

#!/usr/bin/python
# -*- coding: utf-8 -*-
 
# Author: Jan Koscielniak, (c) 2020
# Author: Hubert Kario, (c) 2020
Severity: Major
Found in tlsfuzzer/analysis.py - About 6 days to fix

    File messages.py has 1855 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    # Author: Hubert Kario, (c) 2015
    # Released under Gnu GPL v2.0, see LICENSE file for details
     
    """Objects for generating TLS messages to send."""
     
     
    Severity: Major
    Found in tlsfuzzer/messages.py - About 4 days to fix

      File expect.py has 1729 lines of code (exceeds 500 allowed). Consider refactoring.
      Open

      # Author: Hubert Kario, (c) 2015
      # Released under Gnu GPL v2.0, see LICENSE file for details
       
      """Parsing and processing of received TLS messages"""
      from __future__ import print_function
      Severity: Major
      Found in tlsfuzzer/expect.py - About 3 days to fix

        File extract.py has 1508 lines of code (exceeds 500 allowed). Consider refactoring.
        Open

        # Author: Jan Koscielniak, (c) 2020
        # Released under Gnu GPL v2.0, see LICENSE file for details
         
        """Extraction and analysis of timing information from a packet capture."""
         
         
        Severity: Major
        Found in tlsfuzzer/extract.py - About 3 days to fix

          Function analyze_bit_sizes has a Cognitive Complexity of 70 (exceeds 10 allowed). Consider refactoring.
          Open

          def analyze_bit_sizes(self):
          """
          Analyses K bit-sizes and creates the plots and the test result files
          which are placed in an analysis_results directory in the output folder.
           
           
          Severity: Minor
          Found in tlsfuzzer/analysis.py - About 1 day to fix

          Cyclomatic complexity is too high in function main. (59)
          Open

          def main():
          """Process arguments and start extraction."""
          logfile = None
          capture = None
          output = None
          Severity: Minor
          Found in tlsfuzzer/extract.py by radon

          Function _write_individual_results has a Cognitive Complexity of 66 (exceeds 10 allowed). Consider refactoring.
          Open

          def _write_individual_results(self):
          """Write results to report.csv"""
          if self.verbose:
          start_time = time.time()
          print("[i] Starting calculation of individual results")
          Severity: Minor
          Found in tlsfuzzer/analysis.py - About 1 day to fix

          Function main has a Cognitive Complexity of 63 (exceeds 10 allowed). Consider refactoring.
          Open

          def main():
          """Process arguments and start extraction."""
          logfile = None
          capture = None
          output = None
          Severity: Minor
          Found in tlsfuzzer/extract.py - About 1 day to fix

          Analysis has 62 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Analysis(object):
          """Analyse extracted timing information from csv file."""
           
          def __init__(self, output, draw_ecdf_plot=True, draw_scatter_plot=True,
          draw_conf_interval_plot=True, multithreaded_graph=False,
          Severity: Major
          Found in tlsfuzzer/analysis.py - About 1 day to fix

            Function run has a Cognitive Complexity of 57 (exceeds 10 allowed). Consider refactoring.
            Open

            def run(self):
            """Execute conversation"""
            node = self.conversation
            try:
            while node is not None:
            Severity: Minor
            Found in tlsfuzzer/runner.py - About 1 day to fix

            Function _parse_pcap has a Cognitive Complexity of 51 (exceeds 10 allowed). Consider refactoring.
            Open

            def _parse_pcap(self):
            """Process capture file."""
            with open(self.capture, 'rb') as pcap:
            progress = None
            try:
            Severity: Minor
            Found in tlsfuzzer/extract.py - About 7 hrs to fix

            Cyclomatic complexity is too high in method _parse_pcap. (42)
            Open

            def _parse_pcap(self):
            """Process capture file."""
            with open(self.capture, 'rb') as pcap:
            progress = None
            try:
            Severity: Minor
            Found in tlsfuzzer/extract.py by radon

            Cyclomatic complexity is too high in method _write_individual_results. (40)
            Open

            def _write_individual_results(self):
            """Write results to report.csv"""
            if self.verbose:
            start_time = time.time()
            print("[i] Starting calculation of individual results")
            Severity: Minor
            Found in tlsfuzzer/analysis.py by radon

            Function generate has a Cognitive Complexity of 48 (exceeds 10 allowed). Consider refactoring.
            Open

            def generate(self):
            """Create a dict() with test cases, where keys are descriptions and
            values are the ciphertexts."""
            ret = {}
             
             
            Severity: Minor
            Found in tlsfuzzer/utils/rsa.py - About 6 hrs to fix

            Consider simplifying this complex logical expression.
            Open

            if (tcp_pkt.flags & dpkt.tcp.TH_SYN and
            tcp_pkt.dport == self.port and
            ip_pkt.dst == self.ip_address):
            # a SYN packet was found - new connection
            # (if a retransmission it won't be counted as at least
            Severity: Critical
            Found in tlsfuzzer/extract.py - About 6 hrs to fix

              Cyclomatic complexity is too high in method generate. (36)
              Open

              def generate(self):
              """Create a dict() with test cases, where keys are descriptions and
              values are the ciphertexts."""
              ret = {}
               
               
              Severity: Minor
              Found in tlsfuzzer/utils/rsa.py by radon

              Function _analyse_weight_pairs has a Cognitive Complexity of 44 (exceeds 10 allowed). Consider refactoring.
              Open

              def _analyse_weight_pairs(self, pairs):
              out_dir = self.output
              output_files = dict()
              if self.run_sign_test:
              output_files['sign_test'] = open(
              Severity: Minor
              Found in tlsfuzzer/analysis.py - About 5 hrs to fix

              Cyclomatic complexity is too high in method analyze_bit_sizes. (35)
              Open

              def analyze_bit_sizes(self):
              """
              Analyses K bit-sizes and creates the plots and the test result files
              which are placed in an analysis_results directory in the output folder.
               
               
              Severity: Minor
              Found in tlsfuzzer/analysis.py by radon

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

              if self.verbose and self._total_measurements:
              status = [0, self._total_measurements, Event()]
              kwargs = {}
              kwargs['unit'] = ' signatures'
              kwargs['prefix'] = 'decimal'
              Severity: Major
              Found in tlsfuzzer/extract.py and 2 other locations - About 5 hrs to fix
              tlsfuzzer/extract.py on lines 1127..1136
              tlsfuzzer/extract.py on lines 1407..1416

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

              if self.verbose and self._total_measurements:
              status = [0, self._total_measurements, Event()]
              kwargs = {}
              kwargs['unit'] = ' signatures'
              kwargs['prefix'] = 'decimal'
              Severity: Major
              Found in tlsfuzzer/extract.py and 2 other locations - About 5 hrs to fix
              tlsfuzzer/extract.py on lines 1407..1416
              tlsfuzzer/extract.py on lines 1547..1556
              Severity
              Category
              Status
              Source
              Language