Showing 102 of 102 total issues

Method parse_event has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def parse_event e
      row = Array.new
      row <<   Qt::StandardItem.new(e.value["id"].value.to_s)

      row <<   Qt::StandardItem.new(Time.at(e.value["timestamp"].value).to_s)
Severity: Minor
Found in lib/gui/snoop_it_keychain_widget.rb - About 2 hrs to fix

    Method initialize has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def initialize *args
          @layout = Qt::GridLayout.new
          super *args
          setLayout @layout
    
    
    Severity: Minor
    Found in lib/gui/fs_viewer_tab_widget.rb - About 1 hr to fix

      Method initialize has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def initialize *args
            super *args
      
            # details on selected app
            @layout = Qt::GridLayout.new
      Severity: Minor
      Found in lib/gui/global_app_details_group_box.rb - About 1 hr to fix

        Method populate_files has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            def populate_files path
              @model.clear
              @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
              @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
              @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
        Severity: Minor
        Found in lib/gui/fs_viewer_tab_widget.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 setup_device_config has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def setup_device_config
              @device_config_tab = Qt::Widget.new self
              device_config_layout = Qt::GridLayout.new
              @device_config_tab.setLayout device_config_layout
        
        
        Severity: Minor
        Found in lib/gui/settings_tab_widget.rb - About 1 hr to fix

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

              def initialize *args
                super *args
          
                @fuzz_config_layout = Qt::GridLayout.new
                setLayout @fuzz_config_layout
          Severity: Minor
          Found in lib/gui/url_scheme_fuzz_widget.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 initialize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def initialize *args
                super *args
                @tabs = Hash.new
          
          
          
          Severity: Minor
          Found in lib/gui/main_tab_widget.rb - About 1 hr to fix

            Method initialize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def initialize *args
                  super  *args
            
            
            
            
            Severity: Minor
            Found in lib/gui/weak_class_dump_widget.rb - About 1 hr to fix

              Method initialize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def initialize(args)
                    super(*args)
              
                    # details on selected app
                    @layout = Qt::GridLayout.new
              Severity: Minor
              Found in lib/gui/app_details_group_box.rb - About 1 hr to fix

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

                    def initialize *args
                      super *args
                
                      @layout = Qt::GridLayout.new
                      setLayout(@layout)
                Severity: Minor
                Found in lib/gui/settings_dialog.rb - About 1 hr to fix

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

                        def init_ui
                          # setup central widget and grid layout
                          @central_widget = Qt::Widget.new self
                          self.setCentralWidget @central_widget
                          @grid = Qt::GridLayout.new @central_widget
                  Severity: Minor
                  Found in lib/idb.rb - About 1 hr to fix

                    Method parse_event has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def parse_event e
                          row = Array.new
                          row <<   Qt::StandardItem.new(e.value["id"].value.to_s)
                    
                          row <<   Qt::StandardItem.new(Time.at(e.value["timestamp"].value).to_s)
                    Severity: Minor
                    Found in lib/gui/snoop_it_sensitive_api_widget.rb - About 1 hr to fix

                      Method refresh_app_list has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def refresh_app_list
                            if $device.ios_version >= 8 && $device.ios_version != 10
                              refresh_msg = "Refreshing uicache to ensure app information is" \
                                            "up-to-date. This may take a few seconds."
                              box = Qt::MessageBox.new 1, "Refreshing...", refresh_msg
                      Severity: Minor
                      Found in lib/gui/app_list_dialog.rb - About 1 hr to fix

                        Method update_device has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def update_device
                              if $device.device?
                                @connect.hide
                                if $device.mode == "usb"
                                  usb_mode_text = "<b>USB device:</b> Manually connect via SSH as " \
                        Severity: Minor
                        Found in lib/gui/device_info_group_box.rb - About 1 hr to fix

                          Method sync_dir has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def sync_dir(remote, local_relative)
                                local = @local_path + "/" + local_relative
                                if $settings['device_connection_mode'] == "ssh"
                                  cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no  -p #{$settings.ssh_port}'" \
                                        "  #{$settings.ssh_username}@#{$settings.ssh_host}:#{Shellwords.escape(remote)}/" \
                          Severity: Minor
                          Found in lib/lib/rsync_git_manager.rb - About 1 hr to fix

                            Method initialize has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def initialize *args
                                  super *args
                            
                                  @refresh = Qt::PushButton.new "Refresh"
                                  @refresh.connect(SIGNAL :released) {
                            Severity: Minor
                            Found in lib/gui/sqlite_widget.rb - About 1 hr to fix

                              Method populate_files has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def populate_files path
                                    @model.clear
                                    @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
                                    @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
                                    @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
                              Severity: Minor
                              Found in lib/gui/fs_viewer_tab_widget.rb - About 1 hr to fix

                                Similar blocks of code found in 4 locations. Consider refactoring.
                                Open

                                    def open_section
                                      @open_label = Qt::Label.new "<b>open</b><br>(Open apps on the device)"
                                      @layout.addWidget @open_label, 1, 0
                                
                                      if $device.open_installed?
                                Severity: Major
                                Found in lib/gui/device_status_dialog.rb and 3 other locations - About 1 hr to fix
                                lib/gui/device_status_dialog.rb on lines 129..150
                                lib/gui/device_status_dialog.rb on lines 221..243
                                lib/gui/device_status_dialog.rb on lines 248..268

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 57.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 4 locations. Consider refactoring.
                                Open

                                    def dumpdecrypted_section
                                      @dumpdecrypted_label = Qt::Label.new "<b>dumpdecrypted</b><br>(Decrypt app binaries on the device).<br>Developed and maintained by Stefan Esser https://github.com/stefanesser/dumpdecrypted"
                                      @layout.addWidget @dumpdecrypted_label, 3, 0
                                
                                      if $device.dumpdecrypted_installed?
                                Severity: Major
                                Found in lib/gui/device_status_dialog.rb and 3 other locations - About 1 hr to fix
                                lib/gui/device_status_dialog.rb on lines 92..112
                                lib/gui/device_status_dialog.rb on lines 221..243
                                lib/gui/device_status_dialog.rb on lines 248..268

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 57.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 4 locations. Consider refactoring.
                                Open

                                    def cycript_section
                                      @cycript_label = Qt::Label.new "<b>cycript</b><br>(explore and modify running applications using a hybrid of Objective-C++ and JavaScript. http://www.cycript.org/ )"
                                      @layout.addWidget @cycript_label, 8, 0
                                
                                      if $device.cycript_installed?
                                Severity: Major
                                Found in lib/gui/device_status_dialog.rb and 3 other locations - About 1 hr to fix
                                lib/gui/device_status_dialog.rb on lines 92..112
                                lib/gui/device_status_dialog.rb on lines 129..150
                                lib/gui/device_status_dialog.rb on lines 221..243

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 57.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Severity
                                Category
                                Status
                                Source
                                Language