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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


  Mostrar Mensajes
Páginas: 1 ... 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 [46] 47 48 49 50
451  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 9 Octubre 2012, 00:45 am
Paste the ROTxEncrypt() function please.

Es esta:

Código
  1. Private Sub Form_Load()
  2. Dim str As String
  3. Dim str2 As String
  4.  
  5.  
  6. str = ROTXEncrypt("-978ç___#{~#{~#'é(-è", "pass")
  7. MsgBox (str)
  8. MsgBox (ROTXDecrypt(str, "pass"))
  9. End Sub
  10.  
  11. Public Function AltStrConv(Temp As Variant, Conversion As VbStrConv) As Variant
  12. Dim i As Long, lLen As Long, bvHack(0) As Byte, lHackDelta As Long
  13. Dim bArr() As Byte, sString As String
  14.  
  15. lHackDelta = VarPtr(bvHack(0))
  16.  
  17. If Conversion = vbFromUnicode Then
  18.    sString = Temp
  19.    lLen = Len(sString)
  20.    ReDim bArr(0 To lLen - 1)
  21.    For i = 0 To lLen - 1
  22.        bvHack(VarPtr(bArr(0)) - lHackDelta + i) = bvHack(StrPtr(sString) - lHackDelta + (i * 2))
  23.    Next i
  24.    AltStrConv = bArr
  25. ElseIf Conversion = vbUnicode Then
  26.    bArr = Temp
  27.    lLen = UBound(Temp) + 1
  28.    sString = Space$(lLen)
  29.    For i = 0 To lLen - 1
  30.        bvHack(StrPtr(sString) - lHackDelta + (i * 2)) = bvHack(VarPtr(bArr(0)) - lHackDelta + i)
  31.    Next i
  32.    AltStrConv = sString
  33. End If
  34.  
  35. End Function
  36.  
  37. Function ROTXDecrypt(ByVal strData As String, ByVal strKey As String)
  38.    On Error Resume Next
  39.    Dim bData() As Byte, bKey() As Byte
  40.    bData = AltStrConv(strData, vbFromUnicode)
  41.    bKey = AltStrConv(strKey, vbFromUnicode)
  42.    For i = 0 To UBound(bData)
  43.        If i <= UBound(bKey) Then
  44.            bData(i) = bData(i) - bKey(i)
  45.        Else
  46.            bData(i) = bData(i) - bKey(i Mod UBound(bKey))
  47.        End If
  48.    Next i
  49.    ROTXDecrypt = AltStrConv(bData, vbUnicode)
  50. End Function
  51.  
  52. Function ROTXEncrypt(ByVal strData As String, ByVal strKey As String)
  53.    On Error Resume Next
  54.    Dim bData() As Byte
  55.    Dim bKey() As Byte
  56.    bData = StrConv(strData, vbFromUnicode)
  57.    bKey = StrConv(strKey, vbFromUnicode)
  58.    For i = 0 To UBound(bData)
  59.        If i <= UBound(bKey) Then
  60.            bData(i) = bData(i) + bKey(i)
  61.        Else
  62.            bData(i) = bData(i) + bKey(i Mod UBound(bKey))
  63.        End If
  64.    Next i
  65.    ROTXEncrypt = StrConv(bData, vbUnicode)
  66. End Function
  67.  

452  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 21:47 pm
for me it doesn't work with alternative "AltStrConv" neither StrConv.

now I have to go out. I'll come back later.
453  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 19:50 pm
Put some example that doesn't work to you, I don't got  it :huh:

I'm trying this and work correctly

Código
  1. Dim str As String
  2. Dim str2 As String
  3. 'Dim str3() As Byte
  4.  
  5.  
  6. str = ROTXEncrypt("Work", "pass")
  7. MsgBox (str)
  8. MsgBox (ROTXDecrypt(str, "pass"))
  9.  
  10.  
454  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 18:07 pm
Maybe you're trying before compiling. because If you're running into vb IDE doesn't work. but if you compile work correctly. at least for me work correclty.
455  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 17:38 pm
well before reading about Karcrack says , I notice that is necesary to remove array bounds checks and try out of Visual Basic IDE, it means Compiled, And work Correctly.

try it.



456  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 16:42 pm
I made a post in HH time ago where I put all the different methods I found... Ofc HH is down so I can't paste them here... Anyway I throw some ideas: MultiByteToWideChar() and __vbaStrToUnicode()...



@Danyfirex: Working with memory is the same as using the "bvHack()" thingy.

si ya veo, es que no recordaba ese tema.

voy a mirar con bvHack().
457  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 8 Octubre 2012, 03:56 am
maybe using copymemory. Tomorrow I'll try to make something.  :)
458  Programación / Programación Visual Basic / Re: StrConv Alternative Function en: 7 Octubre 2012, 22:09 pm
aquí te la dejo como se me ocurrió.  ;D

Código
  1. Private Function AltStrConv(Temp As Variant, Conversion As VbStrConv) As Variant
  2. Dim i As Long, lLen As Long
  3. Dim bArr() As Byte, sString As String
  4.  
  5.  
  6.  
  7. If Conversion = vbFromUnicode Then
  8.    sString = Temp
  9.    lLen = Len(sString) - 1
  10.    ReDim bArr(lLen)
  11.    For i = 0 To lLen
  12.       bArr(i) = Asc(Mid(Temp, (i + 1), 1))
  13.       Next i
  14.    AltStrConv = bArr
  15.  
  16. ElseIf Conversion = vbUnicode Then
  17.    bArr = Temp
  18.    lLen = UBound(Temp)
  19.    sString = Space$(lLen + 1)
  20.    For i = 0 To lLen
  21.    sString = sString & Chr(bArr(i))
  22.    Next i
  23.    AltStrConv = sString
  24. End If
  25.  
  26. End Function
  27.  


saludos
459  Programación / Programación Visual Basic / Re: ¿Formulario que se adapte a la resolución de la computadora? en: 4 Septiembre 2012, 21:08 pm
lo que podrías hacer seria esto para poner tu formulario en toda la pantalla.


Código
  1. Private Sub Form_Load()
  2.  
  3.    Me.Height = Screen.Height
  4.    Me.Width = Screen.Width
  5.  
  6. End Sub
  7.  

y los demás componentes seria proporcionales.
460  Programación / Programación Visual Basic / Re: Obtener el AV / FW instalado en: 27 Agosto 2012, 22:00 pm
Te quedo super STARZ. hace tiempito lo hice en Autoit. es casi igual.


Karcrack buena MOD.
Páginas: 1 ... 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 [46] 47 48 49 50
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines