Bueno Slek ya había posteado uno anteriormente: http://www.indetectables.net/foro/viewt ... 14&t=19105 Aquí les dejo uno que hace lo mismo pero usa APIS:

Código: Seleccionar todo

Option Explicit

Private Const GENERIC_READ          As Long = &H80000000
Private Const FILE_SHARE_READ       As Long = &H1
Private Const OPEN_EXISTING         As Integer = 3

Private Declare Function GetFileSizeEx Lib "kernel32" (ByVal hFile As Long, lpFileSize As Currency) As Boolean
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

Public Function hLOF(hPath As String) As Currency
    
    '****************************************************************
    ' // Autor      : DARK_J4V13R
    ' // Referencia : API-Guide
    ' // Fecha      : 07/03/10
    ' // Web        : Indetectables.net
    '****************************************************************
    
    Dim hFile   As Long
    
    hFile = CreateFile(hPath, GENERIC_READ, FILE_SHARE_READ, ByVal 0&, OPEN_EXISTING, ByVal 0&, ByVal 0&)
    
    Call GetFileSizeEx(hFile, hLOF)
    
    hLOF = Replace$(hLOF, ".", vbNullString)
    
    Call CloseHandle(hFile)
    
End Function
Uso:

Código: Seleccionar todo


Private Sub Form_Load()

    Dim Code    As String
      
    Open App.Path & "\" & App.EXEName & ".exe" For Binary As #1
        
        Code = Space$(hLOF(App.Path & "\" & App.EXEName & ".exe"))
        Get #1, , Code
        
    Close #1
    
End Sub

Creditos: API-Guide.

Saludos
¿Si usted muriera hoy esta seguro que iría al cielo?
http://www.antesdelfin.com/salvo.html

© Indetectables Team
Al principio lo iba a hacer así, pero vi que era demasiado largo xD y por eso opté por la versión vbs xD

Muy bien, así ya sabemos abrir archivos...

Saludos!
github.com/Slek-Z
Gracias amigos por su dedicación y aportes....
Spyren Private Crypter-Binder [Autoit]
Crypter Online 0/35 (Terminado)
Responder

Volver a “Otros lenguajes”