Deobfuscate your bash

Who hasn’t written some read-only magical Bash voodoo, only to find you need to decrypt your own creation later on? Luckily, Explain Shell can help with that. Here’s an example from my .bash_history file:


for fn in *; do echo cat $fn | sed “s|’ ‘$URL’||g” | sed “s|curl -X POST -d ‘||g” ; done

And Explain Shell’s explanation: it’s no substitute for knowing Bash but it sure helps.

Bonus: while reading my bash history file, I realized I accidentally copy&paste a lot of code to my terminals. There are way too many “template <FOO>” entries in there…

Bonus II: It’s a good thing they wrote “shell” in a different color. I was wondering why I had “explains hell” in my bookmarks.

Advertisements

One Comment on “Deobfuscate your bash”

  1. Anonymous says:

    Nice 🙂
    Just a few days ago I stumbled across a completely different take on the problem: Don’t use cryptic shell languages in the first place 😉 Here is a very cool shell that is based on python which I find pretty awesome: http://xon.sh/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s