shmilylty/OneForAll

View on GitHub

Showing 114 of 114 total issues

Avoid too many return statements within this function.
Open

        return True
Severity: Major
Found in modules/finder.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return 'None'
    Severity: Major
    Found in common/request.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return True
      Severity: Major
      Found in modules/finder.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return desc['content']
        Severity: Major
        Found in common/request.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return
          Severity: Major
          Found in modules/datasets/cloudflare_api.py - About 30 mins to fix

            Function filter_subdomain has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            def filter_subdomain(data):
                """
                过滤出无解析内容的子域到新的子域列表
            
                :param list data: 待过滤的数据列表
            Severity: Minor
            Found in common/resolve.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function recursive_subdomain has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def recursive_subdomain(self):
                    # 递归搜索下一层的子域
                    # 从1开始是之前已经做过1层子域搜索了,当前实际递归层数是layer+1
                    subdomains = self.subdomains.copy()
                    for layer_num in range(1, self.recursive_times):
            Severity: Minor
            Found in common/search.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function first has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def first(self, default=None, as_dict=False, as_ordereddict=False):
                    """Returns a single record for the RecordCollection, or `default`. If
                    `default` is an instance or subclass of Exception, then raise it
                    instead of returning it."""
            
            
            Severity: Minor
            Found in common/records.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function decrease_num has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def decrease_num(self, subname):
                    """
                    If number is found in existing subdomain,
                    decrease this number without any other alteration.
                    """
            Severity: Minor
            Found in modules/altdns.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function compare has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def compare(self, subdomain, cname, responses):
                    domain_resp = self.get('http://' + subdomain, check=False, ignore=True)
                    cname_resp = self.get('http://' + cname, check=False, ignore=True)
                    if domain_resp is None or cname_resp is None:
                        return
            Severity: Minor
            Found in takeover.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function extract_words has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def extract_words(self):
                    """
                    Extend the dictionary based on target's domain naming conventions
                    """
            
            
            Severity: Minor
            Found in modules/altdns.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self):
                    """
                    Class entrance
                    """
                    logger.log('INFOR', f'Start collecting subdomains of {self.domain}')
            Severity: Minor
            Found in modules/collect.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function find_subdomains has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            def find_subdomains(domain, data):
                subdomains = set()
                js_urls = set()
                db = Database()
                for infos in data:
            Severity: Minor
            Found in modules/finder.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function get_port_seq has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            def get_port_seq(port):
                logger.log('DEBUG', 'Getting port range')
                ports = set()
                if isinstance(port, (set, list, tuple)):
                    ports = port
            Severity: Minor
            Found in common/request.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Severity
            Category
            Status
            Source
            Language