This allows us to actually test the validations, since the code calls out to Rex::Socket::RangeWalker. MS-902
MSP-13484 Disabled expose_dsl_globally in spec_helper, so need to qualify top-level describe.
Metasploit::Framework::Credential and Metasploit::Credential::Core need to be consumable by the login scanners. the easiest way to do this was to create a shared to_credential method on both that return Metasploit::Framework::Credential MSP-9912