Ir para conteúdo
Fórum CódigoFonte.net
Entre para seguir isso  
Ted k'

Senhas Aleatórias

Recommended Posts

Script que gera senhas aleatórias

<%@ Language="VBScript" %>
<%
Dim Consoantes, Numeral, Vogal
Dim rConsoantes, rNumeral, rVogal

        Consoantes = "bcdfghjklmnpqrstvyxzw"
        Numeral = "1234567890"
        Vogal = "aeiou"

                lConsoantes = Len(Consoantes)
                lNumeral = Len(Numeral)
                lVogal = Len(Vogal)

        Randomize
                rConsoantes = (Rnd * lConsoantes + 1)
                rNumeral = (Rnd * lNumeral + 1)
                rVogal = (Rnd * lVogal + 1)
        Randomize

                rConsoantes = CInt(rConsoantes)
                rNumeral = CInt(rNumeral)
                rVogal = CInt(rVogal)

        Randomize
                PassWord = PassWord & Mid(Consoantes, rConsoantes, 1) & Mid(Numeral, rNumeral, 1) & Mid(Vogal, rVogal, 1) & Mid(Numeral, (Rnd * rNumeral + 1), 1) & Mid(Vogal, (Rnd * rVogal + 1), 1) & Mid(cConsoantes, (Rnd * rConsoantes + 1), 1)
        Randomize

        Response.Write PassWord
%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Visitante
Responder

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
Entre para seguir isso  

×
×
  • Criar Novo...