Metasploit set rhosts file

Just a quick tip I don’t see documented a bunch of places, when you want to feed metasploit a list of targets in a file you need to use the following syntax.

set rhosts file:/path/to/file

Below is a screenshot for context.

metasploit set rhosts file

4 Responses to “Metasploit set rhosts file”

  1. oprime Says:

    Do you know how the file should be formatted?

  2. anon Says:

    Thanks! 🙂

  3. starnight_cyber Says:

    Thanks, it helpd a lot!

  4. Anonymous Says:

    The file should be formatted as newline separated values

Leave a Reply