msf_webacoo_module.rb
def rand_string(length=8)
		# Base64 valid characters
    		vchars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
    		# Base64 non-valid characters
    		nvchars = (['!','@','#','%','&','*','?','~']).to_a
  		str=''
  		(length-1).times{ str << vchars[rand(vchars.size)] }
  		return str = str + nvchars[rand(nvchars.size)]
	end
# Generate a random string with one base64 non-valid character

Generate a random string with one base64 non-valid character
Generate a random string with one base64 non - valid character
def rand_string(length=8)
    		vchars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
    		nvchars = (['!','@','#','%','&','*','?','~']).to_a
  		str=''
  		(length-1).times{ str << vchars[rand(vchars.size)] }
  		return str = str + nvchars[rand(nvchars.size)]
	end
def rand_string ( length = 8 ) vchars = ( 'a' .. 'z' ) . to_a + ( 'A' .. 'Z' ) . to_a + ( '0' .. '9' ) . to_a nvchars = ( [ '!' , '@' , '#' , '%' , '&' , '*' , '?' , '~' ] ) . to_a str = '' ( length - 1 ) . times { str << vchars [ rand ( vchars . size ) ] } return str = str + nvchars [ rand ( nvchars . size ) ] end
Generate a random string with one base64 non-valid character
Generate a random string with one base64 non - valid character
# Base64 valid characters
 # Base64 non-valid characters

length