thefalcon79
Member
- Joined
- Mar 27, 2010
- Messages
- 8
- Programming Experience
- Beginner
hi all
i found this code to merge two two files and i'm trying to do the reverse of it. kindly, any one can help me to do the reverse of this function:
what i'm trying to do is to hide the image file in exe file, and extract the image again. this function working 100% and do not damage the exe file after merge. but i'm confused in how to extract the image?!!!
hope i'll find some help here
thank you in forward
i found this code to merge two two files and i'm trying to do the reverse of it. kindly, any one can help me to do the reverse of this function:
VB.NET:
strDest("f1.exe")
strSource("f2.jpg")
Private Sub AppendFile(ByVal strSource As String, ByVal strDest As String)
Const intBUFFER_SIZE = 4096 '4KB buffer
Dim stmReader As System.IO.FileStream = System.IO.File.OpenRead(strSource)
Dim stmWriter As System.IO.FileStream = System.IO.File.OpenWrite(strDest)
Dim abytBuffer(0 To intBUFFER_SIZE - 1) As Byte
Dim intBufferSize As Integer
stmWriter.Seek(0, IO.SeekOrigin.End) 'Seek to end of file to append
Do
intBufferSize = stmReader.Read(abytBuffer, 0, intBUFFER_SIZE) 'Read
If intBufferSize = 0 Then Exit Do 'End of file
stmWriter.Write(abytBuffer, 0, intBufferSize) 'Write
Loop
stmReader.Close()
stmReader.Dispose()
stmWriter.Close()
stmWriter.Dispose()
what i'm trying to do is to hide the image file in exe file, and extract the image again. this function working 100% and do not damage the exe file after merge. but i'm confused in how to extract the image?!!!
hope i'll find some help here
thank you in forward
Last edited: