hackedteam/poc-x

View on GitHub

Showing 8 of 11 total issues

Method process_request has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def process_request(client)
  loop do
    begin
      req = client.gets  
      next unless req
Severity: Minor
Found in socks.rb - 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

Method initialize has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

  def initialize(filename, options = {}, &block)
    @filename = filename
    @block = block
    @path = File.join(self.class.base_path, filename)
    @unique = options[:unique]
Severity: Minor
Found in tailer.rb - 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

Method bootstrap_events has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def bootstrap_events(client)
  log "SENDING BOOTSTRAP EVENTS..."

  reply client, "650 NOTICE Bootstrapped 5%: Connecting to directory server.\r\n"
  sleep 0.1
Severity: Minor
Found in socks.rb - About 1 hr to fix

    Method process_request has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def process_request(client)
      loop do
        begin
          req = client.gets  
          next unless req
    Severity: Minor
    Found in socks.rb - About 1 hr to fix

      Function initTailWindows has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function initTailWindows(){
          $('.stream').each(function(){
            var container = $(this);
            var params = container.data();
      
      
      Severity: Minor
      Found in public/script.js - About 1 hr to fix

        Method process_getinfo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        def process_getinfo(client, req)
          if req['status/bootstrap-phase']
            reply client, @reply_bootstrap_phase
            reply client, @reply_250OK
            @vent.set
        Severity: Minor
        Found in socks.rb - 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 request has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        def request(ctx, flow):
            """
                Called when a client request has been received.
            """
            ctx.log("request")
        Severity: Minor
        Found in inject.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

        Method process_getconf has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        def process_getconf(client, req)
          if req['Socks4Proxy']
            reply client, @reply_Socks4Proxy
          elsif req['Socks5Proxy']
            reply client, @reply_Socks5Proxy
        Severity: Minor
        Found in socks.rb - About 35 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