• Log in or sign up for an account here: https://www.sythe.org/login

[help]open file/exe as binary data send through winsock and write back to file

halojunkie

Active Member
Joined
Dec 17, 2005
Sythe Gold
0
Messages
232
Location
Look Above You!
I need the code to open a file as binary data. Such as an exe or jpg.
The send through winsock i pretty much got

and the receive...but how would i recompile into original format?
 
assuming you have the recive data correctly coded:

Code:
WriteInfo App.Path & "\lol.exe", ENTIREDATAHERE
Code:
Public Sub WriteInfo(ByVal EXEPath As String, ByVal WriteData As Variant)
    Dim lonFF As Long, lonLen As Long
   
    'Get an available file handle.
    lonFF = FreeFile
    'Start the file length at 0
    lonLen = 0
   
    'Open the EXE file in binary write mode because it is a binary file.
    Open EXEPath For Binary Access Write As #lonFF
        'Write the data to the end of the file.
        Put #lonFF, (lonLen + 1), WriteData
    Close #lonFF 'Close the file.
   
End Sub
 
Runescape Gamblingrunescape gambling
Back
Top