Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
How to extract base64 code out of a file?
RGVhciBMdWlzLA0KICANCkdvb2QgbW9uaW5nIQ0KT3VyIEJhbm sgYWNjb3VudCBpcyB1bmRlcmdvaW5nIGF1ZGl0IGZvciB0aGUg ZmlzY2FsIHllYXIgYXMgcmVxdWlyZWQgYnkgdGhlIGNoaW5hIG ZvcmVpZ24gY3VycmVuY3kgY29udHJvbCBwb2xpY3kgYW5kIHRo ZSBhY2NvdW50IHdpbGwgbm90IGJlIGF2YWlsYWJsZSB1bnRpbC B0aGUgQ2hpbmVzZSB0YXggYnVyZWF1cyBhcmUgc
2F0aXNmaWVkIHRoYXQgYWxsIGFwcGxpY2FibGUgdGF4ZXMgaGF 2ZSBiZWVuIHBhaWQgdXAuIFBsZWFzZSBob2xkIHBheW1lbnQgc 28gaSBjYW4gZnVybmlzaCB5b3Ugd2l0aCBvdXIgcmV2aXNlZCB iYW5raW5nIGluZm9ybWF0aW9uLiAgDQoNCiAgDQpCZXN0IHJlZ 2FyZHMNCiANCkRhdmlk
Example file decode command: How can I extract an attachment from the email body (encoded as base64) - Super User
Example phrasse decode command: bash - How can I decode a base64 string from the command line? - Ask Ubuntu
but i do not know how to extract only the base64 phrasse out of file which also contains non base64 contents."Avoid the Gates of Hell. Use Linux affordable VPS."
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
Whether or not it is decode-able into ascii format depends. First, convert it to base8. You need to take each 64 bit chunk (8 8-bit digits - 1 8-bit digit is an ascii character in size). You also need to know if the encoding was in big, or little endian form. That may require some byte switching to get things correctly decoded. Readable? Good question. In any case, write some code to do the conversion and we can help from there. I don't like being asked to solve homework, or work-work problems for people - that is my business and I am good at it, as well as well-paid for my time to do it! If you make an effort, then I am happy to help you deal with issues you encounter, just as I would for any other engineer in my company.
Anyway, didn't either of your included links help? Read the manpage on Linux for the base64 command. It isn't hard to use, and will do the work for you - no kitchen time required!
I just ran it through base64 and got this output:
Our Banbase64: invalid inputSometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!