pwn 0.4.448 → 0.4.451
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_nessus_cloud_create_scan +7 -3
- data/lib/pwn/plugins/nessus_cloud.rb +11 -11
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 02f8e66dcae91cac37030a71ca31451c0f7c95b54f80fbdac9ed00e61fd459eb
         | 
| 4 | 
            +
              data.tar.gz: bcea061287c2abaf5a9703a8d6c66daad7cd96e01333e1e54e4cf3425e5918c5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4b6c769c439cd1f89a7311759c54fa663ec47e6e67b578c5a376e6ec89c09f723fd5b655596da4bb2ff78dc7af965ff07b874cd2c269a5a312568a938b557e4e
         | 
| 7 | 
            +
              data.tar.gz: f7d916073ff34c9fe2ef2f25a326aa386ea84735dea35cf2682a97e68cd9375766508fa6f0f967b3968f2655f51106b82fd9a16c48a7e095dfe50abe4d962256
         | 
    
        data/README.md
    CHANGED
    
    | @@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn | |
| 37 37 | 
             
            $ rvm list gemsets
         | 
| 38 38 | 
             
            $ gem install --verbose pwn
         | 
| 39 39 | 
             
            $ pwn
         | 
| 40 | 
            -
            pwn[v0.4. | 
| 40 | 
            +
            pwn[v0.4.451]:001 >>> PWN.help
         | 
| 41 41 | 
             
            ```
         | 
| 42 42 |  | 
| 43 43 | 
             
            [](https://youtu.be/G7iLUY4FzsI)
         | 
| @@ -52,7 +52,7 @@ $ rvm use ruby-3.1.2@pwn | |
| 52 52 | 
             
            $ gem uninstall --all --executables pwn
         | 
| 53 53 | 
             
            $ gem install --verbose pwn
         | 
| 54 54 | 
             
            $ pwn
         | 
| 55 | 
            -
            pwn[v0.4. | 
| 55 | 
            +
            pwn[v0.4.451]:001 >>> PWN.help
         | 
| 56 56 | 
             
            ```
         | 
| 57 57 |  | 
| 58 58 |  | 
| @@ -268,23 +268,27 @@ begin | |
| 268 268 | 
             
              settings[:file_targets] = file_targets if file_targets
         | 
| 269 269 |  | 
| 270 270 | 
             
              if tag_targets_arr.any?
         | 
| 271 | 
            +
                tag_uuids_arr = []
         | 
| 271 272 | 
             
                tag_targets_arr.each do |tag_name|
         | 
| 272 273 | 
             
                  # Lookup tag and create if does not exist
         | 
| 273 274 | 
             
                  tag = PWN::Plugins::NessusCloud.get_tag_values(
         | 
| 274 275 | 
             
                    nessus_obj: nessus_obj,
         | 
| 275 276 | 
             
                    name: tag_name
         | 
| 276 277 | 
             
                  )
         | 
| 277 | 
            -
                   | 
| 278 | 
            +
                  tag_uuid = tag[:uuid] if tag.any?
         | 
| 279 | 
            +
                  tag_uuids_arr.push(tag_uuid) if tag.any?
         | 
| 278 280 | 
             
                  next if tag.any?
         | 
| 279 281 |  | 
| 280 | 
            -
                  PWN::Plugins::NessusCloud.create_tag(
         | 
| 282 | 
            +
                  new_tag = PWN::Plugins::NessusCloud.create_tag(
         | 
| 281 283 | 
             
                    nessus_obj: nessus_obj,
         | 
| 282 284 | 
             
                    category: tag_category_name,
         | 
| 283 285 | 
             
                    value: tag_name
         | 
| 284 286 | 
             
                  )
         | 
| 287 | 
            +
                  tag_uuid = new_tag[:uuid]
         | 
| 288 | 
            +
                  tag_uuids_arr.push(tag_uuid)
         | 
| 285 289 | 
             
                end
         | 
| 286 290 |  | 
| 287 | 
            -
                settings[:tag_targets] =  | 
| 291 | 
            +
                settings[:tag_targets] = tag_uuids_arr
         | 
| 288 292 | 
             
              end
         | 
| 289 293 |  | 
| 290 294 | 
             
              settings[:agent_group_id] = agent_group_id_arr if agent_group_id_arr.any?
         | 
| @@ -113,7 +113,7 @@ module PWN | |
| 113 113 | 
             
                      selected_scan_template = scan_templates[:templates].select do |sc|
         | 
| 114 114 | 
             
                        sc[:title] == name
         | 
| 115 115 | 
             
                      end
         | 
| 116 | 
            -
                      scan_templates = selected_scan_template.first | 
| 116 | 
            +
                      scan_templates = selected_scan_template.first
         | 
| 117 117 | 
             
                      scan_templates ||= {}
         | 
| 118 118 | 
             
                    end
         | 
| 119 119 |  | 
| @@ -143,7 +143,7 @@ module PWN | |
| 143 143 | 
             
                      selected_policy = policies[:policies].select do |p|
         | 
| 144 144 | 
             
                        p[:name] == name
         | 
| 145 145 | 
             
                      end
         | 
| 146 | 
            -
                      policies = selected_policy.first | 
| 146 | 
            +
                      policies = selected_policy.first
         | 
| 147 147 | 
             
                      policies ||= {}
         | 
| 148 148 | 
             
                    end
         | 
| 149 149 |  | 
| @@ -173,7 +173,7 @@ module PWN | |
| 173 173 | 
             
                      selected_folder = folders[:folders].select do |f|
         | 
| 174 174 | 
             
                        f[:name] == name
         | 
| 175 175 | 
             
                      end
         | 
| 176 | 
            -
                      folders = selected_folder.first | 
| 176 | 
            +
                      folders = selected_folder.first
         | 
| 177 177 | 
             
                      folders ||= {}
         | 
| 178 178 | 
             
                    end
         | 
| 179 179 |  | 
| @@ -203,7 +203,7 @@ module PWN | |
| 203 203 | 
             
                      selected_scanner = scanners[:scanners].select do |s|
         | 
| 204 204 | 
             
                        s[:name] == name
         | 
| 205 205 | 
             
                      end
         | 
| 206 | 
            -
                      scanners = selected_scanner.first | 
| 206 | 
            +
                      scanners = selected_scanner.first
         | 
| 207 207 | 
             
                      scanners ||= {}
         | 
| 208 208 | 
             
                    end
         | 
| 209 209 |  | 
| @@ -233,7 +233,7 @@ module PWN | |
| 233 233 | 
             
                      selected_network = target_networks[:networks].select do |tn|
         | 
| 234 234 | 
             
                        tn[:name] == name
         | 
| 235 235 | 
             
                      end
         | 
| 236 | 
            -
                      target_networks = selected_network.first | 
| 236 | 
            +
                      target_networks = selected_network.first
         | 
| 237 237 | 
             
                      target_networks ||= {}
         | 
| 238 238 | 
             
                    end
         | 
| 239 239 |  | 
| @@ -263,7 +263,7 @@ module PWN | |
| 263 263 | 
             
                      selected_timezone = timezones[:networks].select do |tz|
         | 
| 264 264 | 
             
                        tz[:name] == name
         | 
| 265 265 | 
             
                      end
         | 
| 266 | 
            -
                      timezones = selected_timezone.first | 
| 266 | 
            +
                      timezones = selected_timezone.first
         | 
| 267 267 | 
             
                      timezones ||= {}
         | 
| 268 268 | 
             
                    end
         | 
| 269 269 |  | 
| @@ -294,7 +294,7 @@ module PWN | |
| 294 294 | 
             
                      selected_target_group = target_groups[:target_groups].select do |tg|
         | 
| 295 295 | 
             
                        tg[:name] == name
         | 
| 296 296 | 
             
                      end
         | 
| 297 | 
            -
                      target_groups = selected_target_group.first | 
| 297 | 
            +
                      target_groups = selected_target_group.first
         | 
| 298 298 | 
             
                      target_groups ||= {}
         | 
| 299 299 | 
             
                    end
         | 
| 300 300 |  | 
| @@ -325,7 +325,7 @@ module PWN | |
| 325 325 | 
             
                      selected_tag = tag_values[:values].select do |tag|
         | 
| 326 326 | 
             
                        tag[:value] == name
         | 
| 327 327 | 
             
                      end
         | 
| 328 | 
            -
                      tag_values = selected_tag.first | 
| 328 | 
            +
                      tag_values = selected_tag.first
         | 
| 329 329 | 
             
                      tag_values ||= {}
         | 
| 330 330 | 
             
                    end
         | 
| 331 331 |  | 
| @@ -360,14 +360,14 @@ module PWN | |
| 360 360 | 
             
                      selected_credential_category = credential_types[:credentials].select do |cc|
         | 
| 361 361 | 
             
                        cc[:category].downcase == category
         | 
| 362 362 | 
             
                      end
         | 
| 363 | 
            -
                      credential_types = selected_credential_category.first | 
| 363 | 
            +
                      credential_types = selected_credential_category.first
         | 
| 364 364 | 
             
                      credential_types ||= {}
         | 
| 365 365 |  | 
| 366 366 | 
             
                      if name
         | 
| 367 367 | 
             
                        selected_credential_type = credential_types[:types].select do |ct|
         | 
| 368 368 | 
             
                          ct[:name].downcase == name
         | 
| 369 369 | 
             
                        end
         | 
| 370 | 
            -
                        credential_types = selected_credential_type.first | 
| 370 | 
            +
                        credential_types = selected_credential_type.first
         | 
| 371 371 | 
             
                        credential_types ||= {}
         | 
| 372 372 | 
             
                      end
         | 
| 373 373 |  | 
| @@ -398,7 +398,7 @@ module PWN | |
| 398 398 | 
             
                      selected_scan = scans[:scans].select do |s|
         | 
| 399 399 | 
             
                        s[:name] == name
         | 
| 400 400 | 
             
                      end
         | 
| 401 | 
            -
                      scans = selected_scan.first | 
| 401 | 
            +
                      scans = selected_scan.first
         | 
| 402 402 | 
             
                      scans ||= {}
         | 
| 403 403 | 
             
                    end
         | 
| 404 404 |  | 
    
        data/lib/pwn/version.rb
    CHANGED