Sign in to follow this  
Followers 0
Gut

Problem with Base64 Decode

2 posts in this topic

I am trying to extract an attachment from an eml file. I have got the attachment body from the txt file, but when I try to decode it with any of the Base64 decoders in the forums, it appears that only half of the file is there. I have tried pasting the input into a commercial converter and it decodes perfectly. What am I missing here? Here is what I have: for testing purposes I have created a file called attach.txt and copied the attachment coding into it.

$file = FileOpen("attach.txt", 0)

$line = BinaryToString(FileRead($file))

$line = Base64Decode($line)

filewrite("output.pdf",$line)

Share this post


Link to post
Share on other sites



seem you just read first line, not EOF


UnderWorldVN- Just play the way you like it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0