Hola amigos de Indetectables lo que pasa es lo siguiente, ando creando un crypter con encryptacion blowfish pero al poner el cls en el boton de encryptar, me sale esto : UnsignedAdd Procedimiento Sub o function no definido.. miren el codigo...


Código: Seleccionar todo

Dim STUB As String
Open App.Path & "\STUB.exe" For Binary As #1
STUB = Space(LOF(1))
Get #1, , STUB
Close #1
With CommonDialog1

   .DialogTitle = "Seleccione donde guardar"
   .Filter = "EXE Files |*.exe"
   .ShowSave

End With
Dim File As String
Open Text1.Text For Binary As #1
File = Space(LOF(1))
Get #1, , File
Close #1
File = BloW.EncryptString(File, "Antopixel")
Open CommonDialog1.FileName For Binary As #1
Put #1, , STUB & "[Pixel]" & File
Close #1
MsgBox "Protegido...", vbInformation
Ese es el codigo del boton proteger , encryptar etc

Código: Seleccionar todo

Private Static Function F(ByVal x As Long) As Long

  Dim xb(0 To 3) As Byte
  
  Call CopyMem(xb(0), x, 4)
  If (m_RunningCompiled) Then
    F = (((m_sBox(0, xb(3)) + m_sBox(1, xb(2))) Xor m_sBox(2, xb(1))) + m_sBox(3, xb(0)))
  Else
    F = UnsignedAdd((UnsignedAdd(m_sBox(0, xb(3)), m_sBox(1, xb(2))) Xor m_sBox(2, xb(1))), m_sBox(3, xb(0)))
  End If
Y la parte que me pone problema en el bowfish..

cuando inicio el proyecto me sale esto :

Imagen


Que puedo poner para arreglar y poder poner el Bowfish correctamente ?
Skype: Pixel.M-H
Agrega eso a un modulo
Option Explicit

Public Type ENCRYPTCLASS
  Name As String
  Object As Object
  Homepage As String
End Type
Public EncryptObjects() As ENCRYPTCLASS
Public EncryptObjectsCount As Long

Public Const BENCHMARKSIZE = 1000000

Private Declare Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Public Function FileExist(Filename As String) As Boolean

  On Error GoTo NotExist
  
  Call FileLen(Filename)
  FileExist = True
  Exit Function
NotExist:
End Function
Public Static Sub GetWord(LongValue As Long, CryptBuffer() As Byte, Offset As Long)

'  Call CopyMem(LongValue, CryptBuffer(Offset), 4)
  
  Dim bb(0 To 3) As Byte
  
  bb(3) = CryptBuffer(Offset)
  bb(2) = CryptBuffer(Offset + 1)
  bb(1) = CryptBuffer(Offset + 2)
  bb(0) = CryptBuffer(Offset + 3)
  Call CopyMem(LongValue, bb(0), 4)
  
End Sub

Public Static Sub PutWord(LongValue As Long, CryptBuffer() As Byte, Offset As Long)

'  Call CopyMem(CryptBuffer(Offset), LongValue, 4)

  Dim bb(0 To 3) As Byte

  Call CopyMem(bb(0), LongValue, 4)
  CryptBuffer(Offset) = bb(3)
  CryptBuffer(Offset + 1) = bb(2)
  CryptBuffer(Offset + 2) = bb(1)
  CryptBuffer(Offset + 3) = bb(0)

End Sub
Public Static Function UnsignedAdd(ByVal Data1 As Long, Data2 As Long) As Long
  
  Dim x1(0 To 3) As Byte
  Dim x2(0 To 3) As Byte
  Dim xx(0 To 3) As Byte
  Dim Rest As Long
  Dim Value As Long
  Dim a As Long
  
  Call CopyMem(x1(0), Data1, 4)
  Call CopyMem(x2(0), Data2, 4)
  
  Rest = 0
  For a = 0 To 3
    Value = CLng(x1(a)) + CLng(x2(a)) + Rest
    xx(a) = Value And 255
    Rest = Value \ 256
  Next
  
  Call CopyMem(UnsignedAdd, xx(0), 4)

End Function
Public Function UnsignedDel(Data1 As Long, Data2 As Long) As Long
  Dim x1(0 To 3) As Byte
  Dim x2(0 To 3) As Byte
  Dim xx(0 To 3) As Byte
  Dim Rest As Long
  Dim Value As Long
  Dim a As Long
  
  Call CopyMem(x1(0), Data1, 4)
  Call CopyMem(x2(0), Data2, 4)
  Call CopyMem(xx(0), UnsignedDel, 4)
  
  For a = 0 To 3
    Value = CLng(x1(a)) - CLng(x2(a)) - Rest
    If (Value < 0) Then
      Value = Value + 256
      Rest = 1
    Else
      Rest = 0
    End If
    xx(a) = Value
  Next
  
  Call CopyMem(UnsignedDel, xx(0), 4)
End Function
Responder

Volver a “VB/.NET”