Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing % signs after addresses when setting RHOSTS via service command #18410

Closed
rtpt-erikgeiser opened this issue Sep 29, 2023 · 0 comments · Fixed by #18411
Closed

Trailing % signs after addresses when setting RHOSTS via service command #18410

rtpt-erikgeiser opened this issue Sep 29, 2023 · 0 comments · Fixed by #18411
Labels

Comments

@rtpt-erikgeiser
Copy link
Contributor

rtpt-erikgeiser commented Sep 29, 2023

When the database contains hosts with empty scope columns (where scope is an empty string instead of nil), they are not correctly added to RHOSTS via services -R because the command adds a trailing % sign to each address. This can happen if the database is filled by an external program that sets scope to an empty string instead of NULL.

Steps to reproduce

Make sure you have less then 5 hosts in the database (or add a filter that reduces the number of hits to less than 5) and make sure that the hosts have empty strings in their scope column and not NULL.

  1. msfconsole
  2. services -R

Expected behavior

Unscoped addresses in RHOSTS should not have trailing % signs.

Current behavior

Now you see that the addresses in RHOSTS have trailing % signs. These are normally added to separate the address scope but in this case the scope is empty and they are added regardless.

Metasploit version

6.3.36

Additional Information

Fixed by #18411.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant