**** This post links to Windows-Based malware executables!!! DO NOT EXECUTE DECODED SAMPLE ****
I hope I can post this here without having it pulled down.
I have 2 seemingly identical base64 encoded files. The first I copied down manually. The second was pulled down via a script. I used cmp to try to find any differences. I do not see any differences in the file... EXCEPT....
The file that I copied manually adds the base64 encoded text on over 1200 lines. The file that was pulled down via the script adds the base64 text on only 1 line.
When I run the base64 -d command against the file I created manually, I get the decoded text into an archive file
When I run the base64 -d command against the file created by the script, I get this error:
base64: invalid input
Here is the base64 encoded text on 1 line (saved as: Note_3316_copy): http://pastebin.com/Qs35MkS1
Here is the base64 encoded text on 1200 lines (saved as: order_id): http://pastebin.com/H3BNcQdf
This code works on the 1200 lines of code:
base64 -d order_id > order_id3.zip
This code DOES NOT work on the 1 line of code
base64 -d Note_3316_copy > note.zip
Can anyone see why this is not working?
The 1-liner is not an actual one-liner, but contains escaped characters (a representative sample):
The
\
are escaped, as is the newline (\n
). That's what's causing the error, I'd guess. Fix your script.