eso ya lo probe y no funciona jaj, lo k pasa es k hay k mirar bien el code antes..
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú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
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
aaaa
aaab
aaac
aaad
aaae
aaaf
aaag
aaah
aaai
aaaj
aaaa GENERATED
aaab GENERATED
aaac GENERATED
aaad GENERATED
aaae GENERATED
aaaf GENERATED
aaag GENERATED
aaah GENERATED
aaai GENERATED
aaaj GENERATED
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
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
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