IMcPwn/browser-backdoor

View on GitHub

Showing 714 of 714 total issues

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

                log.info("Cat command called.")
Severity: Minor
Found in server/bbsconsole.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Use snake_case for method names.
Open

    def self.detectResult(msg, ws, log, response_limit, outLoc)
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use 2 (not 4) spaces for indentation.
Open

        return @@wsList
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Replace class var @@wsList with a class instance var.
Open

    @@wsList = Array.new
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Use 2 (not 4) spaces for indentation.
Open

                    open_message = "WebSocket connection open: #{ws} from " + Bbs::WebSocket.convertIP(ws)
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Replace class var @@selected with a class instance var.
Open

        @@selected = newSelected
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Use 2 (not 4) spaces for indentation.
Open

            return ws.get_peername[2,6].unpack('nC4')[1..4].join('.')
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 4) spaces for indentation.
Open

            Bbs::PrintColor.print_error("Session does not exist.")
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

            "ws.send(err.message);"\
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [86/80]
Open

    def startEM(log, host, port, secure, priv_key, cert_chain, response_limit, outLoc)
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

Extra empty line detected at module body beginning.
Open


module Config
Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

This cops checks if empty lines around the bodies of modules match the configuration.

Example: EnforcedStyle: empty_lines

# good

module Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

module Foo
  module Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
module Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

module Foo
  def bar
    # ...
  end
end

Use 2 (not 4) spaces for indentation.
Open

        if @@configfile == nil
Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

1 trailing blank lines detected.
Open

Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

                log.info("Exit command called.")
Severity: Minor
Found in server/bbsconsole.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Line is too long. [87/80]
Open

            log.error("Unable to convert #{ws} to IP address with error: #{e.message}")
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

Use snake_case for method names.
Open

    def Config.loadLog
Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use self.getConfig instead of Config.getConfig.
Open

    def Config.getConfig
Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

This cop checks for uses of the class/module name instead of self, when defining class/module methods.

Example:

# bad
class SomeClass
  def SomeClass.class_method
    # ...
  end
end

# good
class SomeClass
  def self.class_method
    # ...
  end
end

Use snake_case for variable names.
Open

    def self.detectResult(msg, ws, log, response_limit, outLoc)
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use self.getLog instead of Config.getLog.
Open

    def Config.getLog
Severity: Minor
Found in server/lib/bbs/config.rb by rubocop

This cop checks for uses of the class/module name instead of self, when defining class/module methods.

Example:

# bad
class SomeClass
  def SomeClass.class_method
    # ...
  end
end

# good
class SomeClass
  def self.class_method
    # ...
  end
end

Redundant begin block detected.
Open

        begin
Severity: Minor
Found in server/lib/bbs/websocket.rb by rubocop

This cop checks for redundant begin blocks.

Currently it checks for code like this:

Example:

def redundant
  begin
    ala
    bala
  rescue StandardError => e
    something
  end
end

def preferred
  ala
  bala
rescue StandardError => e
  something
end
Severity
Category
Status
Source
Language