Skip to content

Update for compatibility with the new Layered Services data model#196

Merged
cgranleese-r7 merged 1 commit intorapid7:masterfrom
cdelafuente-r7:fix_create_credential_service
Feb 9, 2026
Merged

Update for compatibility with the new Layered Services data model#196
cgranleese-r7 merged 1 commit intorapid7:masterfrom
cdelafuente-r7:fix_create_credential_service

Conversation

@cdelafuente-r7
Copy link
Copy Markdown
Contributor

This PR updates the service lookup in #create_credential_service to also include the service name. This change is needed since now the service name defines a unique service. Services with the same host, port and proto but with different names a now considered separate services. Note that this also applies to the new resource field. I haven't added the resource in the lookup since it doesn't seem to be necessary for now. Please, let me know if you think otherwise.

Some considerations:

  • a service without name is still possible (the name field is nil) and the same rule applies. Two services with the same host, port and proto, but one with a name and the other without, will be considered as two separate services.
  • a service without resource defaults to an empty JSON {} and the same rule applies. Two services with the same host, port, proto and name, but one with a specific resource and the other without (empty JSON), will be considered as two separate services.

This PR also update the pwdump file to import in specs. The format was not parsed correctly by the pwdump parser and caused unexpected service creations. I tried to keep it consistent with the original regex:

# <IP address>:<port>/<proto> (<service name>)

@github-project-automation github-project-automation Bot moved this from Ready to In Progress in Metasploit Kanban Feb 9, 2026
@cgranleese-r7 cgranleese-r7 merged commit 21e6076 into rapid7:master Feb 9, 2026
20 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Metasploit Kanban Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants