elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  ayuda con modificacion simple de este code
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] 2 Ir Abajo Respuesta Imprimir
Autor Tema: ayuda con modificacion simple de este code  (Leído 4,541 veces)
Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
ayuda con modificacion simple de este code
« en: 17 Enero 2008, 00:06 am »

hola a todos, mi consulta es la siguiente .., espero sepan responderla xk yo ya estoy mareado jajaj.

Sucede k descarge un code para generar claves no aleatorias a partir de un listado de caracteres.

Cuyo code en un form es el siguiente:

Código:
Dim Counter, Cnt As Integer

Private Sub cmdCreate_Click()
On Error GoTo ErrorHandler

Screen.MousePointer = 11

Dim C(100) As String

For i = 0 To 100
    C(i) = ""
Next i

If chkSL.Value = 1 Then
    Cnt = 1
    For i = 1 To 26
        C(i) = SL(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkCL.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
   
    For i = Counter To Counter + 26 - 1
        C(i) = CL(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkNum.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
    For i = Counter To Counter + 10 - 1
        C(i) = Num(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkChar.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
    For i = Counter To Counter + 28 - 1
        C(i) = Char(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkSpce.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    C(Counter) = " "
End If

cmbCharList.Clear
For i = 1 To 100
    If C(i) = "" Then
        Exit For
    End If
   
    cmbCharList.AddItem C(i)

Next i

Dim Cr, StrOutput As String

For j = 1 To 100
    If C(j) = "" Then
        Counter = j
        Exit For
    End If
Next j

Counter = Counter - 1

StrOutput = ""
Length = txtLength.Text
For i = 1 To txtLength1.Text - txtLength.Text

    For k = 1 To Counter * Length
        Cr = ""
        For j = 1 To Length
            Call Randomize
            t = Int((Counter * Rnd) + 1)
           
            Cr = Cr & C(t)
        Next j
       
        If StrOutput = "" Then
            StrOutput = Cr
        Else
            StrOutput = StrOutput & vbCrLf & Cr
        End If
    Next k
   
    Length = Length + 1
   
Next i

If StrOutput = "" Then
    GoTo ErrorHandler
End If

On Error GoTo ErrorHandler
Open "C:\PasswordList.txt" For Output As #2
    Print #2, StrOutput
Close #2

Label3.Visible = True
MsgBox "Password List Created successfully!", vbInformation + vbOKOnly, "Password Generator"
Screen.MousePointer = 0
Exit Sub

ErrorHandler:
    Screen.MousePointer = 0
    MsgBox "Failed to create file, try again.", vbCritical + vbOKOnly, "Password Generator"
End Sub

Private Sub cmdGenerate_Click()
Screen.MousePointer = 11
Dim C(100) As String

For i = 0 To 100
    C(i) = ""
Next i

If chkSL.Value = 1 Then
    Cnt = 1
    For i = 1 To 26
        C(i) = SL(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkCL.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
    For i = Counter To Counter + 26 - 1
        C(i) = CL(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkNum.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
    For i = Counter To Counter + 10 - 1
        C(i) = Num(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkChar.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    Cnt = 1
    For i = Counter To Counter + 28 - 1
        C(i) = Char(Cnt)
        Cnt = Cnt + 1
    Next i
End If

If chkSpce.Value = 1 Then
    For j = 1 To 100
        If C(j) = "" Then
            Counter = j
            Exit For
        End If
    Next j
   
    C(Counter) = " "

End If

cmbCharList.Clear
For i = 1 To 100
    If C(i) = "" Then
        Exit For
    End If
   
    cmbCharList.AddItem C(i)

Next i


For j = 1 To 100
    If C(j) = "" Then
        Counter = j
        Exit For
    End If
Next j

Counter = Counter - 1

AddDirSep StorePath

PB.Max = 100
PB.Min = 0
PB.Value = 0
picPB.Visible = True

lblPassed.Tag = ""
lblTotal.Tag = ""

Timer2.Enabled = True

Dim N, O, CN, S, nN, strProgressed, oLen

N = 0
nN = 0
O = ""
CN = 0

LPF = txtLPF.Text

DoEvents

If opt4.Value = True Then
    oLen = 4
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    DoEvents
                    nN = nN + 1
                 


« Última modificación: 17 Enero 2008, 00:08 am por Tengu » En línea


Encuentros por Video y Chat !!
Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #1 en: 17 Enero 2008, 00:10 am »

Código:
                            S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6)
                           
                            strProgressed = (nN * 100) / (Counter ^ oLen)
                            PB.Value = strProgressed
                            lblPB.Caption = Int(strProgressed) & "%"
                           
                            If PB.Value = PB.Max Then
                                MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                picPB.Visible = False
                            End If
                           
                            N = N + 1
                           
                            If O = "" Then
                                O = S
                            Else
                                O = O & vbCrLf & S
                            End If
                           
                            If LPF = 0 Then GoTo lblExSave2File6
                           
                            If N = LPF Then
                                CN = CN + 1
                                Save2File O, CN
                                O = ""
                                N = 0
                            End If
lblExSave2File6:
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt7.Value = True Then
    oLen = 7
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                           
                                DoEvents
                                nN = nN + 1
                                S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7)
                               
                                strProgressed = (nN * 100) / (Counter ^ oLen)
                                PB.Value = strProgressed
                                lblPB.Caption = Int(strProgressed) & "%"
                               
                                If PB.Value = PB.Max Then
                                    MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                    picPB.Visible = False
                                End If
                               
                                N = N + 1
                               
                                If O = "" Then
                                    O = S
                                Else
                                    O = O & vbCrLf & S
                                End If
                               
                                If LPF = 0 Then GoTo lblExSave2File7
                               
                                If N = LPF Then
                                    CN = CN + 1
                                    Save2File O, CN
                                    O = ""
                                    N = 0
                                End If
lblExSave2File7:
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt8.Value = True Then
    oLen = 8
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                           
                                    DoEvents
                                    nN = nN + 1
                                    S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8)
                                   
                                    strProgressed = (nN * 100) / (Counter ^ oLen)
                                    PB.Value = strProgressed
                                    lblPB.Caption = Int(strProgressed) & "%"
                                   
                                    If PB.Value = PB.Max Then
                                        MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                        picPB.Visible = False
                                    End If
                                   
                                    N = N + 1
                                   
                                    If O = "" Then
                                        O = S
                                    Else
                                        O = O & vbCrLf & S
                                    End If
                                   
                                    If LPF = 0 Then GoTo lblExSave2File8
                                   
                                    If N = LPF Then
                                        CN = CN + 1
                                        Save2File O, CN
                                        O = ""
                                        N = 0
                                    End If
lblExSave2File8:
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt9.Value = True Then
    oLen = 9
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                           
                                        DoEvents
                                        nN = nN + 1
                                        S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9)
                                       
                                        strProgressed = (nN * 100) / (Counter ^ oLen)
                                        PB.Value = strProgressed
                                        lblPB.Caption = Int(strProgressed) & "%"
                                       
                                        If PB.Value = PB.Max Then
                                            MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                            picPB.Visible = False
                                        End If
                                       
                                        N = N + 1
                                       
                                        If O = "" Then
                                            O = S
                                        Else
                                            O = O & vbCrLf & S
                                        End If
                                       
                                        If LPF = 0 Then GoTo lblExSave2File9
                                       
                                        If N = LPF Then
                                            CN = CN + 1
                                            Save2File O, CN
                                            O = ""
                                            N = 0
                                        End If
lblExSave2File9:
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt10.Value = True Then
    oLen = 10
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                           
                                            DoEvents
                                            nN = nN + 1
                                            S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10)
                                           
                                            strProgressed = (nN * 100) / (Counter ^ oLen)
                                            PB.Value = strProgressed
                                            lblPB.Caption = Int(strProgressed) & "%"
                                           
                                            If PB.Value = PB.Max Then
                                                MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                picPB.Visible = False
                                            End If


En línea


Encuentros por Video y Chat !!
Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #2 en: 17 Enero 2008, 00:12 am »

Código:
  N = N + 1
                                           
                                            If O = "" Then
                                                O = S
                                            Else
                                                O = O & vbCrLf & S
                                            End If
                                           
                                            If LPF = 0 Then GoTo lblExSave2File10
                                           
                                            If N = LPF Then
                                                CN = CN + 1
                                                Save2File O, CN
                                                O = ""
                                                N = 0
                                            End If
lblExSave2File10:
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt11.Value = True Then
    oLen = 11
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                                            For a11 = 1 To Counter
                           
                                                DoEvents
                                                nN = nN + 1
                                                S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10) & C(a11)
                                               
                                                strProgressed = (nN * 100) / (Counter ^ oLen)
                                                PB.Value = strProgressed
                                                lblPB.Caption = Int(strProgressed) & "%"
                                               
                                                If PB.Value = PB.Max Then
                                                    MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                    picPB.Visible = False
                                                End If
                                               
                                                N = N + 1
                                               
                                                If O = "" Then
                                                    O = S
                                                Else
                                                    O = O & vbCrLf & S
                                                End If
                                               
                                                If LPF = 0 Then GoTo lblExSave2File11
                                               
                                                If N = LPF Then
                                                    CN = CN + 1
                                                    Save2File O, CN
                                                    O = ""
                                                    N = 0
                                                End If
lblExSave2File11:
                                            Next a11
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt12.Value = True Then
    oLen = 12
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                                            For a11 = 1 To Counter
                                                For a12 = 1 To Counter
                           
                                                    DoEvents
                                                    nN = nN + 1
                                                    S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10) & C(a11) & C(a12)
                                                   
                                                    strProgressed = (nN * 100) / (Counter ^ oLen)
                                                    PB.Value = strProgressed
                                                    lblPB.Caption = Int(strProgressed) & "%"
                                                   
                                                    If PB.Value = PB.Max Then
                                                        MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                        picPB.Visible = False
                                                    End If
                                                   
                                                    N = N + 1
                                                   
                                                    If O = "" Then
                                                        O = S
                                                    Else
                                                        O = O & vbCrLf & S
                                                    End If
                                                   
                                                    If LPF = 0 Then GoTo lblExSave2File12
                                                   
                                                    If N = LPF Then
                                                        CN = CN + 1
                                                        Save2File O, CN
                                                        O = ""
                                                        N = 0
                                                    End If
lblExSave2File12:
                                                Next a12
                                            Next a11
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt13.Value = True Then
    oLen = 13
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                                            For a11 = 1 To Counter
                                                For a12 = 1 To Counter
                                                    For a13 = 1 To Counter
                           
                                                        DoEvents
                                                        nN = nN + 1
                                                        S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10) & C(a11) & C(a12) & C(a13)
                                                       
                                                        strProgressed = (nN * 100) / (Counter ^ oLen)
                                                        PB.Value = strProgressed
                                                        lblPB.Caption = Int(strProgressed) & "%"
                                                       
                                                        If PB.Value = PB.Max Then
                                                            MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                            picPB.Visible = False
                                                        End If
                                                       
                                                        N = N + 1
                                                       
                                                        If O = "" Then
                                                            O = S
                                                        Else
                                                            O = O & vbCrLf & S
                                                        End If
                                                       
                                                        If LPF = 0 Then GoTo lblExSave2File13
                                                       
                                                        If N = LPF Then
                                                            CN = CN + 1
                                                            Save2File O, CN
                                                            O = ""
                                                            N = 0
                                                        End If
lblExSave2File13:
                                                    Next a13
                                                Next a12
                                            Next a11
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt14.Value = True Then
    oLen = 14
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                                            For a11 = 1 To Counter
                                                For a12 = 1 To Counter
                                                    For a13 = 1 To Counter
                                                        For a14 = 1 To Counter
                           
                                                            DoEvents
                                                            nN = nN + 1
                                                            S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10) & C(a11) & C(a12) & C(a13) & C(a14)
                                                           
                                                            strProgressed = (nN * 100) / (Counter ^ oLen)
                                                            PB.Value = strProgressed
                                                            lblPB.Caption = Int(strProgressed) & "%"
                                                           
                                                            If PB.Value = PB.Max Then
                                                                MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                                picPB.Visible = False
                                                            End If
                                                           
                                                            N = N + 1
                                                           
                                                            If O = "" Then
                                                                O = S
                                                            Else
                                                                O = O & vbCrLf & S
                                                            End If
                                                           
                                                            If LPF = 0 Then GoTo lblExSave2File14
                                                           
                                                            If N = LPF Then
                                                                CN = CN + 1
                                                                Save2File O, CN
                                                                O = ""
                                                                N = 0
                                                            End If
lblExSave2File14:
                                                        Next a14
                                                    Next a13
                                                Next a12
                                            Next a11
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If opt15.Value = True Then
    oLen = 15
    For a1 = 1 To Counter
        For a2 = 1 To Counter
            For a3 = 1 To Counter
                For a4 = 1 To Counter
                    For a5 = 1 To Counter
                        For a6 = 1 To Counter
                            For a7 = 1 To Counter
                                For a8 = 1 To Counter
                                    For a9 = 1 To Counter
                                        For a10 = 1 To Counter
                                            For a11 = 1 To Counter
                                                For a12 = 1 To Counter
                                                    For a13 = 1 To Counter
                                                        For a14 = 1 To Counter
                                                            For a15 = 1 To Counter
                           
                                                                DoEvents
                                                                nN = nN + 1
                                                                S = C(a1) & C(a2) & C(a3) & C(a4) & C(a5) & C(a6) & C(a7) & C(a8) & C(a9) & C(a10) & C(a11) & C(a12) & C(a13) & C(a14) & C(a15)
                                                               
                                                                strProgressed = (nN * 100) / (Counter ^ oLen)
                                                                PB.Value = strProgressed
                                                                lblPB.Caption = Int(strProgressed) & "%"
                                                                If PB.Value = PB.Max Then
                                                                    MsgBox "Finished!!!", vbOKOnly + vbInformation, "Password Generator"
                                                                    picPB.Visible = False
En línea


Encuentros por Video y Chat !!
Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #3 en: 17 Enero 2008, 00:13 am »

Código:
End If
                                                               
                                                                N = N + 1
                                                               
                                                                If O = "" Then
                                                                    O = S
                                                                Else
                                                                    O = O & vbCrLf & S
                                                                End If
                                                               
                                                                If LPF = 0 Then GoTo lblExSave2File15
                                                               
                                                                If N = LPF Then
                                                                    CN = CN + 1
                                                                    Save2File O, CN
                                                                    O = ""
                                                                    N = 0
                                                                End If
lblExSave2File15:
                                                            Next a15
                                                        Next a14
                                                    Next a13
                                                Next a12
                                            Next a11
                                        Next a10
                                    Next a9
                                Next a8
                            Next a7
                        Next a6
                    Next a5
                Next a4
            Next a3
        Next a2
    Next a1
End If

If LPF = 0 Then
    Save2File O, 0
    GoTo lblEx
End If
   
If (N < LPF) And (N <> 0) Then
    Save2File O, CN + 1
End If

lblEx:
Screen.MousePointer = 0
End Sub

Private Sub cmdSetPath_Click()
    Form2.Show 1, Me
End Sub

Private Sub Form_Load()
On Error Resume Next
SetChars

StorePath = GetSetting("Password Generator", "Options", "Path", StorePath)
If StorePath = "" Then
    StorePath = "C:\"
End If

lblPath.Caption = "The output file(s) will be stored in: " & StorePath

picPB.Visible = False

End Sub




Private Sub Timer2_Timer()
    Static i
    i = i + 1
    If i = 100 Then
        lblPassed.Tag = Val(lblPassed.Tag) + 1
        i = 0
    End If

    If Test = False Then
        X = PB.Value
    End If
    Test = True
    P = P + 1
    If PB.Value - X >= 1 Then
            Test = False
            lblTotal.Tag = (P * 100) / 100
            P = 0
            X = PB.Value
    End If
   
    Dim TMP
    TMP = Val(lblTotal.Tag) - Val(lblPassed.Tag)
    If TMP < 0 Then
        lblRemained.Tag = 0
        lblRemained.Caption = "--------"
    Else
        lblRemained.Tag = Val(lblTotal.Tag) - Val(lblPassed.Tag)
    End If
   
    Dim oH, oM, oS
    oH = Val(lblPassed.Tag) \ 3600
    oM = Val(lblPassed.Tag) \ 60
    oS = Val(lblPassed.Tag) Mod 60
    lblPassed.Caption = oH & ":" & oM & ":" & oS

    oH = Val(lblTotal.Tag) \ 3600
    oM = Val(lblTotal.Tag) \ 60
    oS = Val(lblTotal.Tag) Mod 60
    lblTotal.Caption = oH & ":" & oM & ":" & oS
   
    oH = Val(lblRemained.Tag) \ 3600
    oM = Val(lblRemained.Tag) \ 60
    oS = Val(lblRemained.Tag) Mod 60
    lblRemained.Caption = oH & ":" & oM & ":" & oS

End Sub

Private Sub txtLPF_KeyPress(KeyAscii As Integer)
    Select Case KeyAscii
        Case 48 To 57
        Case 8
        Case Else: KeyAscii = 0
    End Select
End Sub

y en un modulo el siguiente:

Código:
Public CL(26) As String
Public SL(26) As String
Public Num(10) As String
Public Char(30) As String
Public Spce As String
Public LPF As Long
Public StorePath As String

Public Test As Boolean
Public P As Long
Public X As Double

Global Const gstrSEP_URLDIR$ = "/"
Global Const gstrSEP_DIR$ = "\"


Sub SetChars()
On Error Resume Next

Char(1) = "~"
Char(2) = "!"
Char(3) = "@"
Char(4) = "#"
Char(5) = "$"

Char(6) = "%"
Char(7) = "^"
Char(8) = "&"
Char(9) = "*"
Char(10) = "("

Char(11) = ")"
Char(12) = "_"
Char(13) = "-"
Char(14) = "="
Char(15) = "+"

Char(16) = "'"
Char(17) = """"
Char(18) = ";"
Char(19) = ":"
Char(20) = "\"

Char(21) = "|"
Char(22) = "/"
Char(23) = "?"
Char(24) = "."
Char(25) = ">"

Char(26) = ","
Char(27) = "<"
Char(28) = "`"
Char(29) = ""
Char(30) = ""

Cnt = 65
For i = 1 To 26
    CL(i) = Chr(Cnt)
    Cnt = Cnt + 1
Next i

Cnt = 97
For i = 1 To 26
    SL(i) = Chr(Cnt)
    Cnt = Cnt + 1
Next i

Cnt = 0
For i = 1 To 10
    Num(i) = CStr(Cnt)
    Cnt = Cnt + 1
Next i

Spce = " "
   

End Sub

Public Sub Save2File(ByVal Content As String, ByVal Index As Long)

AddDirSep StorePath

Open StorePath & "Output[" & Index & "].txt" For Output As #2

    Print #2, Content

Close #2

End Sub

Sub AddDirSep(strPathName As String)
    If Right(Trim(strPathName), Len(gstrSEP_URLDIR)) <> gstrSEP_URLDIR And _
       Right(Trim(strPathName), Len(gstrSEP_DIR)) <> gstrSEP_DIR Then
        strPathName = RTrim$(strPathName) & gstrSEP_DIR
    End If
End Sub




este code lo k hace es kada x cntidad de  password generadas las guarda en un archivo Output[xxx].txt

con el siguiente formato:

Código:
aaaa
aaab
aaac
aaad
aaae
aaaf
aaag
aaah
aaai
aaaj


lo k yo necesito es k las guarde y a cada password le sume el texto "GENERATED"

es decir k el archivo aparezca con las claves asi:

Código:
aaaa GENERATED
aaab GENERATED
aaac GENERATED
aaad GENERATED
aaae GENERATED
aaaf GENERATED
aaag GENERATED
aaah GENERATED
aaai GENERATED
aaaj GENERATED


Alguien sabria orientarme sobre donde deberia hacer la modificacion para lograr esta generacion de datos a la manera que la necesito????



Desde ya muchas gracias y saludos a todos
En línea


Encuentros por Video y Chat !!
Ferсhu


Desconectado Desconectado

Mensajes: 1.215

Menos palabras y Mas codigos.


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #4 en: 17 Enero 2008, 00:25 am »

Citar
este code lo k hace es kada x cntidad de  password generadas las guarda en un archivo Output[xxx].txt

con el siguiente formato:

Código:

aaaa
aaab
aaac
aaad
aaae
aaaf
aaag
aaah
aaai
aaaj



lo k yo necesito es k las guarde y a cada password le sume el texto "GENERATED"

es decir k el archivo aparezca con las claves asi:

Código:

aaaa GENERATED
aaab GENERATED
aaac GENERATED
aaad GENERATED
aaae GENERATED
aaaf GENERATED
aaag GENERATED
aaah GENERATED
aaai GENERATED
aaaj GENERATED



Alguien sabria orientarme sobre donde deberia hacer la modificacion para lograr esta generacion de datos a la manera que la necesito????




Aver sin leer el codigo te lo resumo.


busca la cadena q genera las letras y antes de escribr en el archivo haces:

Código:
Cadena=Cadena + "GENERATED"


tan dificil es?? jaja
En línea

Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #5 en: 17 Enero 2008, 00:30 am »

disculpa man es k ya estoy mareado y no puedo retener dos palabras juntas jajaja e intente seguir el rastro de la generacion de las claves y la cadena de texto como dices pero komo t digo a estas horas ya no logro retener jajaj  por eso preguntaba si alguien lograba ver la famoza "cadena="
« Última modificación: 17 Enero 2008, 00:32 am por Tengu » En línea


Encuentros por Video y Chat !!
Ferсhu


Desconectado Desconectado

Mensajes: 1.215

Menos palabras y Mas codigos.


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #6 en: 17 Enero 2008, 00:44 am »

jajaj dejate de joder jaj enserio q no la vez?  :xD

aver com ose llama el archivo jaja vos mismo lo dijiste  :xD

y a simple vista se ve:

Citar
Open StorePath & "Output[" & Index & "].txt" For Output As #2

    Print #2, Content

Close #2

q pasa si pones

Citar
Open StorePath & "Output[" & Index & "].txt" For Output As #2

    Print #2, Content+ " GENERATED"

Close #2

eso se llama vaganciaaaaaaaaaaaaaaaaaaa.
En línea

Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #7 en: 17 Enero 2008, 00:50 am »

eso ya lo probe y no funciona jaj, lo k pasa es k hay k mirar bien el code antes..
« Última modificación: 18 Enero 2008, 12:14 pm por Tengu » En línea


Encuentros por Video y Chat !!
Ferсhu


Desconectado Desconectado

Mensajes: 1.215

Menos palabras y Mas codigos.


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #8 en: 17 Enero 2008, 00:53 am »

Es la unica parte q aparece un archivo y q se mete algo en el. proba guardandolo en la variable y dsp meter la variable

Código:
    Content= Content + " GENERATED"
    Print #2, Content
En línea

Tengu


Desconectado Desconectado

Mensajes: 330


2+1 = 1 , despues de todo , tdo es relativo


Ver Perfil WWW
Re: ayuda con modificacion simple de este code
« Respuesta #9 en: 17 Enero 2008, 00:55 am »

sisi te entiendo yo tambien habia pensado eso eh intente toda la tarde pero no logro entender pork no funciona. si kerres te paso el proyecto para k veas k de verdad no funciona asi. ya no se como seguirlo xk es hay donde aparece solamente el content y despues pierdo el rastro

y si lo ingreso en la variable como decis ,e genera todas las claves y solo lo agrtega en la ultima

Código:
ABMI
ABMJ
ABMK
ABMLgenerated
« Última modificación: 17 Enero 2008, 00:58 am por Tengu » En línea


Encuentros por Video y Chat !!
Páginas: [1] 2 Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines