shmilylty/OneForAll

View on GitHub

Showing 114 of 114 total issues

Function search has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def search(self):
        """
        向接口查询子域并做子域匹配
        """
        self.header = self.get_header()
Severity: Minor
Found in modules/search/github_api.py - About 2 hrs 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 search has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def search(self):
        """
        向接口查询子域并做子域匹配
        """
        page_num = 1
Severity: Minor
Found in modules/search/gitee.py - About 1 hr 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 query has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def query(self):
        """
        向接口查询子域并做子域匹配
        """
        page = 0
Severity: Minor
Found in modules/datasets/ipv4info_api.py - About 1 hr 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 _validate has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    def _validate(self, row=None, col=None, safety=False):
        """Assures size of every row in dataset is of proper proportions."""
        if row:
            is_valid = (len(row) == self.width) if self.width else True
        elif col:
Severity: Minor
Found in common/tablib/tablib.py - About 1 hr 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 walk has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def walk(self):
        domain = self.domain
        while True:
            answer = utils.dns_query(domain, 'NSEC')
            if answer is None:
Severity: Minor
Found in modules/check/nsec.py - About 1 hr 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 search has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def search(self, domain, filtered_subdomain=''):
        """
        发送搜索请求并做子域匹配

        :param str domain: 域名
Severity: Minor
Found in modules/search/baidu.py - About 1 hr 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 gen_subdomains has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def gen_subdomains(expression, path):
    """
    Generate subdomains

    :param  str  expression: generate subdomains expression
Severity: Minor
Found in brute.py - About 1 hr 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 search has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def search(self):
        """
        发送搜索请求并做子域匹配
        """
        self.per_page_num = 30
Severity: Minor
Found in modules/search/zoomeye_api.py - About 1 hr 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 gen_new_subdomains has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def gen_new_subdomains(self):
        for subdomain in self.now_subdomains:
            subname, parts = split_domain(subdomain)
            subnames = subname.split('.')
            if settings.altdns_increase_num:
Severity: Minor
Found in modules/altdns.py - About 1 hr 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 __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, target=None, targets=None, brute=None, dns=None, req=None,
Severity: Major
Found in oneforall.py - About 1 hr to fix

    Function call_massdns has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def call_massdns(massdns_path, dict_path, ns_path, output_path, log_path,
    Severity: Major
    Found in common/utils.py - About 1 hr to fix

      Function search has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def search(self, domain, filtered_subdomain=''):
              """
              发送搜索请求并做子域匹配
      
              :param str domain: 域名
      Severity: Minor
      Found in modules/search/yahoo.py - About 1 hr 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 main has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def main(self):
              """
              OneForAll main process
      
              :return: subdomain results
      Severity: Minor
      Found in oneforall.py - About 1 hr 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 check_cdn_cidr has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      def check_cdn_cidr(ips):
          if isinstance(ips, str):
              ips = set(ips.split(','))
          else:
              return False
      Severity: Minor
      Found in modules/iscdn.py - About 1 hr 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 do_check has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def do_check(data):
          logger.log('DEBUG', f'Checking cdn')
          for index, item in enumerate(data):
              cname = item.get('cname')
              if check_cname_keyword(cname):
      Severity: Minor
      Found in modules/iscdn.py - About 55 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 has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def get(self, url, params=None, check=True, ignore=False, raise_error=False, **kwargs):
      Severity: Major
      Found in common/module.py - About 50 mins to fix

        Function is_valid_subdomain has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def is_valid_subdomain(ip=None, ip_num=None, cname=None, cname_num=None,
        Severity: Major
        Found in modules/wildcard.py - About 50 mins to fix

          Function export_data has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def export_data(target, db=None, alive=False, limit=None, path=None, fmt='csv', show=False):
          Severity: Major
          Found in export.py - About 50 mins to fix

            Function search has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                def search(self, domain, filtered_subdomain=''):
                    """
                    发送搜索请求并做子域匹配
            
                    :param str domain: 域名
            Severity: Minor
            Found in modules/search/bing.py - About 45 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 8 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self):
                    start = time.time()
                    logger.log('INFOR', f'Start running {self.source} module')
                    if isinstance(self.targets, set):
                        self.subdomains = self.targets
            Severity: Minor
            Found in takeover.py - About 45 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