Base64 decode to file

The internet sometimes sucks. I spent about 20 minutes searching the internet for an easy way to decode a base64 file in linux. Shouldn't be that hard. In fact, there is a base64 command. But fuck me, I sure couldn't get it to work with the file I had (which was supposed to decode into a .jpg). There is tons of nonsense about the theory and some stupid unhelpful web applications, but no practical examples. That is, until I stumbled upon this little gem - which gave me exactly what I wanted.

perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.txt > out

A one-liner in Perl (of course). The fact that this info was so easy, yet it was so hard to find pisses me off. I'm sure there are other ways to do this. In fact, if you know of other ways to do this, then please leave me a comment telling me how. I hate when good info gets buried under the load of crap clogging the internet tubes.

Technorati Tags: , ,

Comments

Anonymous said…
That rocks. It REALLY does. I too was pissed about the Linux base64 encode/decode situation, and then this falls in my lap. Way cool. It works for encoding too, with the obvious substitution.
Anonymous said…
Encoding data:

# echo "{SASL}joe_montana@EXAMPLE.COM" | openssl base64 -e
e1NBU0x9am9lX21vbnRhbmFARVhBTVBMRS5DT00K

Decoding data:

echo "e1NBU0x9am9lX21vbnRhbmFARVhBTVBMRS5DT00K" | openssl base64 -d
{SASL}joe_montana@EXAMPLE.COM

Note: Using the same openssl base64 command, input can be taken from a file (using -in argument) and output can be written to a file (using -out argument) as well.
Dotan Cohen said…
$ base64 -d < in.jpg > out.jpg
Anonymous said…
decode:
$ openssl enc -base64 -in in_file -d

encode:
$ openssl enc -base64 -in in_file -e
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
You can use linux pipe command '|' from standard in,

echo stringtoencode | base64 -

or

echo stringtodecode | base64 -d -

Technically you do not need the last hyphen because base64 defaults to look at standard in, but that is to show you how | can be used with other programs as well.
Anonymous said…
Thanks for posting this. It was the perfect answer. I too was getting a bit irritated looking for how to do this.

Eric
Anonymous said…
Hi, now is 2012 and many peoples still confusing how base64 encoding/decoding work.....

I read this line from openssl home page;

echo -n password | openssl dgst -md5 -binary | openssl base64
// result :
X03MO1qnZdYdgyfeuILPmQ==

what I want to know is, how to get back original "password" string from "X03MO1qnZdYdgyfeuILPmQ=="????
Anonymous said…
To the above anon, regarding undoing this command:

echo -n password | openssl dgst -md5 -binary | openssl base64

You can undo the "openssl base64" part using any of the methods indicated here ("base64 -d" or "openssl enc -base64 -d"). However, the "openssl dgst -md5" is finding the MD5 hash of "password". Computing the MD5 is a one-way lossy operation, and cannot be reversed except by brute-force.
Anonymous said…
To the above anon, regarding undoing this command:

echo -n password | openssl dgst -md5 -binary | openssl base64

You can undo the "openssl base64" part using any of the methods indicated here ("base64 -d" or "openssl enc -base64 -d"). However, the "openssl dgst -md5" is finding the MD5 hash of "password". Computing the MD5 is a one-way lossy operation, and cannot be reversed except by brute-force.
Kooiker said…
$ base64 -d < in.jpg > out.jpg
Anonymous said…
Dadurch kann die Masse nicht aufgenommen werden, während sie die Verdauung passiert, wodurch eine Gewichtsreduktion erreicht wird.
Der primäre Punkt, halten den Sport übertragen in einem langsameren Tempo
kann die Art der Wette zu platzieren erwerben.
Many Thai sellers sell it on e - Bay and ecrater though, so if you're interested in trying some it shouldn't
be too difficult to get.

Here is my weblog: 5 Kilo Abnehmen
Anonymous said…
Tennis balls, wiffle balls, ping pong balls, and golf balls can
also be used. One way to test yourself is to deal yourself hand after hand
in front of a mirror and watch yourself as you
react to the cards. Each child is given 30 seconds to race to the pile and make as many matches as possible before time runs out.


Take a look at my blog post ... internet radio
Anonymous said…
Thе fact thаt Tοyota сhose to upgrade the exterioг styling, intеrior quality and interior roomіness of the redesigned 2012 Үaris hatchback rather
thаn uρgrading the powertrain says a lot about
how Tоyota views the needs of small
caг buyers. Many peoρle wіll be haρpy with replaceable batterieѕ fοr home use and
occaѕіοnal outingѕ. A MОВILΕ APΡ GIVΕS THΕ
STATION A DIRECТ MARKEΤING CHΑNNEL TO COMMUNICATE WITH THEIR LISTENERS.


my webpage - spiele spielen kostenlos
Anonymous said…
7 WϹLΗ ( Format: Ϲollеge Radio
Wilκes University's radio station plays mostly alternative rock, but Mondays have seemingly always been "Metal Mondays. The line comes off the boat automatically once it hits a fish, which means that the user can catch a fish of virtually any size. Even if you have a good two way radio, it isn't
bаd tο hаνe some kinԁ of rеceive only radio tο get
information on.

Mу sіte youtube videos downloaden
my site - click the following page
Anonymous said…
Hellο, aftеr гeаdіng this remaгkable paragraрh
i am alѕο glаd to shaгe mу experіence
hеге ωith fгіеndѕ.


Feеl fгee tο visit my homepage :: Continued
Also see my page - article source
Anonymous said…
Hi, I do bеlіeve this іs an excеllent blog.
ӏ stumblеduροn it ;) I'm going to come back once again since i have saved as a favorite it. Money and freedom is the best way to change, may you be rich and continue to help other people.

my blog: youtube downloader online
My website - youtube downloader online
Anonymous said…
Have you ever thought about writing an ebook or guest authoring on other sites?

I have a blog based upon on the same subjects
you discuss and would love to have you share some stories/information.
I know my audience would appreciate your work. If you're even remotely interested, feel free to send me an email.

My page ... kostenlos spielen ohne anmeldung
Also see my webpage > internet radio
Anonymous said…
The most important thing to know when you are selling
an account is where you are going to sell.
Resident Evil 2 is the undisputed king daddy in the world of early
survival horror. You'll have to keep the phone close (on the bed or in an armband) for the app to work.

my blog; youtube converter
Anonymous said…
I loved аs much as you will rеceіvе
carried out right here. The sketch is аttraсtiνe, your аuthored materіal
ѕtylish. nonethelеss, you command get got an shakineѕs oνer that you wish
be delіvering the following. unwеll unquestionably come fuгther fоrmегly again аs еxaсtly the same nearlу a lоt oftеn inside сase yοu shiеld this іncгeasе.


my blog :: visit the next web site
Anonymous said…
Few travellers on a Mashobra tour can resist the temptation of seeking
blessings at the Mahasu Devta Temple. Stored energy
printers. ' The Rooneys are a great family who turned a football franchise into a traveling nation full of fans across the United States. 99 Mac Mini only ships with 1GB of RAM. I'm hoping that all of you smarter ' more learned authors out there have a way to describe the intensity of this desire that you must have to journey in your own recovery. With the information provided by the GIS (Geographic Information System) for NDGPS use, drivers can be alerted to road congestion, road accidents and other possible hot spots. This was the time when broadband internet was still in its infancy and uploading the revised pages could be nothing short of tedious with a slow phone line connectivity. That assures a steady supply since it's easily
replaceable. Dependency enslaves you, giving others the ultimate power over how you perceive and feel
about yourself. Why the lack of soul-wrenching anxiety.

Also visit my page - HilarioSc: play store downloaden
Anonymous said…
However, the number of apps is steadily rising, and if Nokia continues to put out quality phones like the Lumia
900, we may see developers take more notice and the number of apps will
rise accordingly. 'The tears of mankind have not washed away man's desire
to kill. One situation had me pose as bait to draw the enemies out so my ally
could dispatch them. When it comes to bridging your skills gap in gaming
world then you can do anything to prove yourself.
Cons. IMPORTANT NOTE: When shopping for a sound card, make
sure you do not accidentally purcahse one that is "Low Profile. We relate to it like it's the truth. It works across Windows XP, Windows Vista, and Windows 7, and Maxi - Vista surprised me by how well it worked with it. Today, the company has over 1. There is a rarely discussed addiction that can be as enslaving as drugs and as devastating to self-respect, self-confidence and healthy functioning as alcoholism.

Here is my homepage ... Highly recommended Webpage
My site > dawfa.com
Anonymous said…
Very quickly this site will be famous among all blogging and site-building
users, due to it's good posts

Check out my site: internet radio
Anonymous said…
This is a common misconception which will be resolved only with firsthand experience.

com’s report. It would be optimum thought to select the local SEO service
after checking the rank of their website. The main aim of SEO is to get search engines positioning
a certain website well in results for specific keywords.
Thus, in minimum cost, you get an opportunity to increase your site
ranking on Search Engine Result Page (SERP). This is the best part to ensure complete uniqueness to
each of the websites. They make their strategy according to
the audience their client is targeting.
There are many tools online to help you research relevant keywords,
such as the Google Adwords Keyword Tool. Its professionals would do hard work to achieve the high traffic objective and they might taste success in their attempt but they would desist from boasting anything about
their success. People these days use the Internet for a varied purpose.

Use SEM experts to recognize duplicate content as part of
your website, and act immediately to have it settled.
If your website deals with certain products or services, then conduct a proper research on these
and then form your SEO content. Now, if it takes you three years to referrer 3000 members which means that you receive US$3000 per month.
No - you name some of your images "breast. For this reason, having mentions from these sites have increasingly become a more valuable asset for your internet marketing. A well-formed internal linking structure and good sitemap can ensure all pages of a website being indexed by a search engine. You need to try to find reputed SEO consultants. Keep in mind that Google doesn’t really like page rank manipulation, even if it’s internally on your site or externally by backlink spamming. What is the magic formula. com is one of the premier portals on the World Wide Web which has been formulated with the intention of providing SEO Hosting options for webmasters around the world who seek a way to ensure that their websites reach the top ranks of all major search engines.

Also visit my homepage - Learn Additional
Anonymous said…
First of all I want to say great blog! I had a quick
question that I'd like to ask if you don't mind. I was interested to know
how you center yourself and clear your mind prior to writing.
I have had a difficult time clearing my mind in getting my thoughts out there.
I do enjoy writing but it just seems like the first 10 to 15 minutes are generally lost simply just trying to figure out how to
begin. Any ideas or hints? Cheers!

my webpage internet radio
Anonymous said…
I'd like to find out more? I'd ωant to fіnԁ out somе
additional infοгmаtіοn.


Loοk іnto my web-site; click through the following website page
Anonymous said…
And then, you'll probably see that the battery's charge won't be as durable as before. Remove other nearby wireless devices, such as a cordless or cellular telephone and make sure the mouse is at least eight inches away from a wireless keyboard. For the first generation, you'll need to release the back cover
from the unit by running a shim along the edge of the unit
to release all of the clips holding the backing on.


Here is my weblog: simply click the following page
Anonymous said…
5. SEO consulting takes the burden off your shoulders and lets you relax and do the work you want to do while allowing the expertise of the SEO consultant to work for you, and we all
know the best way to run a business is with maximum results for minimum stress.
Content, keywords and link building are some of the factors using which
Search Engine Optimization services are taken care of.
This will not only help you find the best service provider but will help you build an
idea about the recent SEO market. NOW, I don't mean you should just put keyword spam in your footer. The major preference is for offshore SEO companies as they offer SEO at the most competitive prices. Identify your niche audience and be an active member on the forums and blogs. When SEO services are working for you, you should always be ready to capitalise on innovations and fresh marketing opportunities. It focuses on networking and impeccable website maintenance. For those of us who are using the internet to make money, we all know that it is absolutely essential to get visitors out to our websites. Those who work on introduced SEO power suite, they choose best SEO tools among various tools available in the market. Don't Forget
to Replace the Default Favicon with Your Logo. Let us assume that at this point you
have 6 keywords. Think wine, and keep the URL intact. Create a general, high-level category in which
you want to manage all phrases'for example 'global,' 'online,
' 'channel,' and so on. The sooner a site is presented in the search result, or the higher it “ranks”, the more searchers will visit the site. With most visitors noting the first 3-5 web links of the first page, further sustained SEO efforts bring the company web link to that web positioning high up as much as possible. Here are tips on how to identify the right keywords for your business website. And make the work flow smoothly, using good grammar at all times. Image Optimization is also a part of SEO services in Pune.

Feel free to surf to my web-site http://reptile.ee/reptiwiki/index.php?title=Kasutaja:LorenzoTO
Anonymous said…
When you quit, you can immediately feel its decision within 24 hours,
health benefits, which can cause you to not smoke forever.
So, follow the battery power saving tips above to get the most bang
for your buck. Aside from these types of power
packs, you can even choose the 8-cell and also 12-cell electric battery.



Look at my web blog - internetradio
Anonymous said…
Tag Cloud. This means you tend to be copying it through file
sharing websites like rapidshare, megaupload, hotfile, etcetera.
Content, keywords and link building are some
of the factors using which Search Engine Optimization services are taken care of.
Out of those 6 keywords, further reduce the number of keywords.

It's so important because once customers begin seeking your product or service you will want to have favorable words making your search results optimized. There are so many good blogs out there, and if you're one of those writers,
you definitely know how important it is that your site gets heard through all of the
noise. Identify your niche audience and be an active member on
the forums and blogs. The thing that needs to be emphasized
is to create text of your website in such a way that the algorithms
find them easily. It focuses on networking and impeccable website maintenance.
Also make sure that the articles are of high quality as it is the key to get
better rankings on search engines and more profits. organic
search, frequency of blog posts, frequency of on-page optimization, the relative importance of links, the use of social media, the best way to measure
results, etc. For instance, how many TV viewers then came to your car
lot and purchased a vehicle. ' Every page should be optimized with additional keywords. Such services also include some research that will need to be done so they can apply this research on major keyword. And, as more and more companies move larger portions of their advertising budgets to internet marketing, there is an even greater demand for their skills. As of now, Thomas Lenarz has helped many people get the information on reputed SEO companies. The World Wide Web is an incredible source of customers and potential revenue for all types of businesses and companies in all niches. However with passing time the complexity in this field has increased and performing an SEO task is not a simple thing to do. The website serves as a way for customers to find the business and be able to see what services are offered. Yahoo style guide.

Here is my homepage :: Sienna
Anonymous said…
I realize that there is not a ton of variety in this
list, since Rogue and i - Net - Hack are essentially the
same and Sorcerer #1 and #2 are more overtly the same.

Resident Evil 2 is the undisputed king daddy in the
world of early survival horror. The full version has no ads and offers goal alerts for
the leagues and teams of your choice.

My website :: spiele spielen
Anonymous said…
The particular electronic cigarette ego basic starter kit is fantastic for new users.
So, follow the battery power saving tips above to get the most bang for your buck.
Although, sound card is integrated device, it functions similar to brightness of the screen when talking about power consumption.


My webpage - just click the following web page - eyeuser.com
Anonymous said…
When you quit, you can immediately feel its decision within 24 hours, health benefits, which can
cause you to not smoke forever. The Lenmar 1530 m - Ah for
the Amazon Kindle 1 e-reader is the first
choice for consumers. Rechargeable batteries last longer than
single use batteries before disposal and reduce the number
of batteries you buy.

Check out my blog - spiele spielen kostenlos
Anonymous said…
I realize that there is not a ton of variety in this list, since Rogue
and i - Net - Hack are essentially the same and Sorcerer #1 and #2 are more
overtly the same. One way to test yourself is to deal yourself hand after hand in front of a mirror and watch
yourself as you react to the cards. However, make sure that your phone is equipped with a powerful processor to enable deeper searches and devise a strategy to give a challenging game of chess.


my weblog - youtube downloader online
Anonymous said…
Please supplement charge before use when the battery has been kept for a long time.
However, it is still possible to insect the terminals and
make sure there is no corrosion. Pingbatterys battery administration program (BMS) might
have the line of Light emitting diodes visible.

Look into my homepage - click the following post
Also see my page - videos von youtube downloaden
Anonymous said…
Before you hit 'share', consider whether you are telling people something really pertinent about your kid ('Dylan walked for the first time today') or something funny ('Dylan wet himself on Santa's lap today'). You can find qualified companies from where may invest in Facebook Likes. You might think that giving people the option of one or tweet or as would result in the presence of social media.

My web site - platinumlimousine.org
Anonymous said…
If possible, go through the reviews and testimonials
of the clients. Such a restriction places this benefit out
of reach for many owners. We sell by mail, online and
from our India Country stores.

Also visit my web site; en.netlog.com
Anonymous said…
With the You - Tube Mobile Application you can
also find videos with the easy to use search tool and record and play DVD
quality videos direct on your phone. These types can be taken with you on a road trip or
in your RV, or they can just be easily moved around the house.
Not only for the business users but this dedicated seedbox
is very useful for even personal users.

Here is my blog post: internet radiosender
Anonymous said…
This will also help if you are looking at streaming video or listening
to streaming audio. Chicago entertainment
has also been providing some of the best blues and jazz acts since its early years.
The cost incurred for hosting internet radio is affordable.


My web page ... Biblia.Wordpress.com
Anonymous said…
In additional to typical ad metrics like impressions and clicks, a video ad can track progress and interaction events.
Here are some tips on how to make this folder smaller, as well as how to deal with export and compression in a
way to lower the overall drive space taken up. Unfortunately, I have too many
colleagues out there that are just too intimidated by new forms of technology, especially when their students are going to
be more informed and skilled with it than they are.


Here is my page ... http://moodle.ufpr.br/user/view.php?id=50932&course=1
Anonymous said…
Think twice before you yell over a spilled glass of juice or a stain on the carpeting-will this really matter to you
when your children are grown and gone. This feature, called Home Sharing is easy to set up and
the reason that you will like it so much is that it is extremely easy
to implement like all things Apple. We were tempted to jump into
the Career or Financial Category, but we want to cover Family first because when
you begin to shape your career brand, you will want to first be clear on all the
other priorities that matter to you.

Feel free to surf to my blog :: fha home loan
Anonymous said…
Very good site you have here but I was wanting to know if you knew of any forums that cover the same topics discussed
here? I'd really love to be a part of group where I can get suggestions from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Many thanks!

Feel free to surf to my site ... raspberry ketone diet reviews
Anonymous said…
The articlе offers verified helpful to us.

It’s vегy infoгmаtivе and
you агe clеarly quite ωell-informeԁ of thіs tуpe.
You havе ορeneԁ our face for уou to differеnt thoughts about thіs particular subjеct mattеr using intгіguing, notablе and ѕound cοntent.



Feеl frеe to ѵіѕit my ωeb blog ::
Buy Viagra
Anonymous said…
Good day! I know this is kinda off topic however , I'd figured I'd ask.

Would you be interested in trading links or maybe guest
writing a blog article or vice-versa? My blog
discusses a lot of the same topics as yours and I feel we could greatly benefit from each other.
If you happen to be interested feel free to shoot me
an e-mail. I look forward to hearing from you! Fantastic blog by the way!



Look into my website url shortener
Anonymous said…
Hi to every body, it's my first pay a quick visit of this web site; this website carries awesome and actually excellent stuff for visitors.
search engine optimization
Anonymous said…
Asking questions are really good thing if you are not understanding anything totally, except
this article presents nice understanding yet.

Check out my web page ... pc sex games
Anonymous said…
Hi to all, how is all, I think every one is getting more from this web site, and your views are fastidious in favor of
new people.

My web blog book ra testen
Anonymous said…
I was suggested this website by my cousin. I'm not sure whether this post is written by him as no one else know such detailed about my difficulty. You're incredible!
Thanks!

My page ... Earn Free VirtaPay
Anonymous said…
Hi there! I simply want to give a huge thumbs up for the great
data you could have here on this post. I
will probably be coming again to your weblog for extra soon.



Feel free to visit my web-site: whirlpool semi integrated dishwashers uk
Anonymous said…
Howdy! I simply wish to give a huge thumbs up for the nice
data you may have right here on this post.
I will likely be coming again to your blog for more soon.



Here is my weblog ... seoul garden new york restaurant
Anonymous said…
Hey! I simply want to give an enormous thumbs up for the great data you might have right
here on this post. I will probably be coming back to your blog for more soon.



my webpage seminole county jail mugshots
Anonymous said…
Good day! I just would like to give an enormous
thumbs up for the great data you may have right here on this
post. I shall be coming again to your weblog for more soon.


my website - seo in guk eunji all for you lyrics
Anonymous said…
Whats up! I just would like to give a huge thumbs up for
the nice information you will have here on this post.

I will likely be coming back to your blog for extra soon.


my website ... brother 7020 laser printer troubleshooting
Anonymous said…
Hey! I simply would like to give an enormous thumbs up for the good info you may have here
on this post. I will probably be coming again to your weblog for extra soon.


My weblog: cherry tree inn traverse city
Anonymous said…
Hiya! I simply wish to give a huge thumbs up for the great data you may have here on this post.

I might be coming again to your weblog for extra soon.


Feel free to visit my web page :: mini SAS
Anonymous said…
Hello! I just wish to give a huge thumbs up for the great information
you’ve here on this post. I will likely be coming again
to your weblog for more soon.

Feel free to surf to my web-site: gas fire pit kits diy
Anonymous said…
Hi there! I just wish to give an enormous thumbs up for
the nice info you have got here on this post. I can be coming
back to your blog for more soon.

Also visit my weblog ... seoul airport limousine bus coupon
Anonymous said…
Howdy! I simply wish to give a huge thumbs up for the great
information you have got right here on this post. I will be coming again
to your blog for extra soon.

Also visit my webpage - seoul garden fort wayne indiana
Anonymous said…
Hiya! I simply wish to give an enormous thumbs up for the nice data you
might have right here on this post. I might be coming back to your weblog for extra
soon.

Also visit my web page - published articles registered authors in our article directory business idea list
Anonymous said…
Hiya! I simply want to give a huge thumbs up for the good data you could
have right here on this post. I will likely be coming
back to your blog for extra soon.

Review my web blog :: skillpath seminars
Anonymous said…
Howdy! I just would like to give a huge thumbs
up for the nice information you have right here on
this post. I might be coming again to your blog for extra soon.


Visit my page - will semi permanent hair color cover grey hair
Anonymous said…
Hi there to every one, the contents present at this site are
really remarkable for people experience, well, keep up the
good work fellows.

My site - book of rah kostenlos spielen
Anonymous said…
Whats up! I just would like to give an enormous thumbs
up for the nice information you have right here on this post.
I will likely be coming again to your weblog for more soon.


Here is my web page: semi permanent hair color light ash brown
Anonymous said…
Howdy! I just would like to give a huge thumbs up for the good information you will have here on this post.
I will be coming back to your blog for more soon.

Review my web blog :: seminole state college nursing assistant
Anonymous said…
Hi there! I just would like to give an enormous thumbs up for the great info you
will have here on this post. I might be coming again to
your weblog for more soon.

my website: seo ranking factors 2010 seomoz
Anonymous said…
Hiya! I simply want to give an enormous thumbs up for the nice info you could have here on this
post. I might be coming back to your blog for extra soon.


Also visit my webpage :: semana santa 2010 fechas
Anonymous said…
you can use the base64 command under linux: base64 -d file

http://base64decode.net/linux-base64-decode
Anonymous said…
The negative attitude to help you tattoos do not extend for you
to ones that might be easily concealed by clothing.
About three of the managers their selves had concealed tattoos

Also visit my web site: scratch remover []
DomFilk said…
you can try this free online service to decode base64 online.
A one-liner in Perl (of course). The fact that this info was so easy, yet it was so hard to find pisses me off. I'm sure there are other ways to do this. In fact, if you know of other ways to do this, then please leave me a comment telling me how. I hate when good info gets buried under the load of crap clogging the internet tubes.
red and black suit salwar ,
red kameez black salwar ,

Popular posts from this blog

Swiftboating from the Left - Paul Harris's "The Real McCain"