Method: Rex::Text.rand_hostname
- Defined in:
- lib/rex/text.rb
.rand_hostname ⇒ String
Generate a random hostname
1783 1784 1785 1786 1787 1788 1789 1790 |
# File 'lib/rex/text.rb', line 1783 def self.rand_hostname host = [] (rand(5) + 1).times { host.push(Rex::Text.rand_text_alphanumeric(rand(10) + 1)) } host.push(TLDs.sample) host.join('.').downcase end |