Portada

Este es el blog del buscador temático sobre el open source Via Alternativa, basado en la API de Google.

En este espacio encontrarás noticias de varias fuentes RSS relacionadas con el mundo del código abierto y comunidades gnu-linux.

Todo el contenido de las anotaciones es responsabilidad de aquellos que las escriben y sus respectivas webs. Si administras una web enlazada por RSS y no estás de acuerdo con la redistribución de tus contenidos contacta con nosotros.

¡A divertirse!

El arte en vez de declinar, debe conquistar la esfera de la tecnología

— Otto Wagner

Logo Via Alternativa

Entradas recientes

More L337 Translations

More L337 Translations
Image
bash
Dave Taylor Thu, 04/19/2018 - 09:20

Dave continues with his shell-script L33t translator.

In my last article, I talked about the inside jargon of hackers and computer geeks known as "Leet Speak" or just "Leet". Of course, that's a shortened version of the word Elite, and it's best written as L33T or perhaps L337 to be ultimately kewl. But hey, I don't judge.

Last time I looked at a series of simple letter substitutions that allow you to convert a sentence like "I am a master hacker with great skills" into something like this:


I AM A M@ST3R H@XR WITH GR3@T SKILLZ

It turns out that I missed some nuances of Leet and didn't realize that most often the letter "a" is actually turned into a "4", not an "@", although as with just about everything about the jargon, it's somewhat random.

In fact, every single letter of the alphabet can be randomly tweaked and changed, sometimes from a single letter to a sequence of two or three symbols. For example, another variation on "a" is "/-\" (for what are hopefully visually obvious reasons).

Continuing in that vein, "B" can become "|3", "C" can become "[", "I" can become "1", and one of my favorites, "M" can change into "[]V[]". That's a lot of work, but since one of the goals is to have a language no one else understands, I get it.

There are additional substitutions: a word can have its trailing "S" replaced by a "Z", a trailing "ED" can become "'D" or just "D", and another interesting one is that words containing "and", "anned" or "ant" can have that sequence replaced by an ampersand (&).

Let's add all these L337 filters and see how the script is shaping up.

But First, Some Randomness

Since many of these transformations are going to have a random element, let's go ahead and produce a random number between 1–10 to figure out whether to do one or another action. That's easily done with the $RANDOM variable:


doit=$(( $RANDOM % 10 ))       # random virtual coin flip

Now let's say that there's a 50% chance that a -ed suffix is going to change to "'D" and a 50% chance that it's just going to become "D", which is coded like this:


if [ $doit -ge 5 ] ;  then
  word="$(echo $word | sed "s/ed$/d/")"
else
  word="$(echo $word | sed "s/ed$/'d/")"
fi

Let's add the additional transformations, but not do them every time. Let's give them a 70–90% chance of occurring, based on the transform itself. Here are a few examples:


if [ $doit -ge 3 ] ;  then
  word="$(echo $word | sed "s/cks/x/g;s/cke/x/g")"
fi

if [ $doit -ge 4 ] ;  then
  word="$(echo $word | sed "s/and/\&/g;s/anned/\&/g;
     s/ant/\&/g")"
fi

And so, here's the second translation, a bit more sophisticated:


$ l33t.sh "banned? whatever. elite hacker, not scriptie."
B&? WH4T3V3R. 3LIT3 H4XR, N0T SCRIPTI3.

Note that it hasn't realized that "elite" should become L337 or L33T, but since it is supposed to be rather random, let's just leave this script as is. Kk? Kewl.

If you want to expand it, an interesting programming problem is to break each word down into individual letters, then randomly change lowercase to uppercase or vice versa, so you get those great ransom-note-style WeiRD LeTtEr pHrASes.

Next time, I plan to move on, however, and look at the great command-line tool youtube-dl, exploring how to use it to download videos and even just the audio tracks as MP3 files.

  1. Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More Deja un comentario
  2. An Update on Linux Journal Deja un comentario
  3. Rise of the Tomb Raider Comes to Linux Tomorrow, IoT Developers Survey, New Zulip Release and More Deja un comentario
  4. Create Dynamic Wallpaper with a Bash Script Deja un comentario
  5. Cooking With Linux (without a net): A CMS Smorgasbord Deja un comentario
  6. The Agony and the Ecstasy of Cloud Billing Deja un comentario
  7. Microsoft Announces First Custom Linux Kernel, German Government Chooses Open-Source Nextcloud and More Deja un comentario
  8. Bassel Khartabil Free Fellowship, GNOME 3.28.1 Release, New Version of Mixxx and More Deja un comentario
  9. Multiprocessing in Python Deja un comentario
  10. FOSS Project Spotlight: Ravada Deja un comentario
  11. Elisa Music Player Debuts, Zenroom Crypto-Language VM Reaches Version 0.5.0 and More Deja un comentario
  12. Facebook Compartmentalization Deja un comentario
  13. Mozilla’s Internet Health Report, Google’s Fuchsia, Purism Development Docs and More Deja un comentario
  14. Promote Drupal Initiative Announced at DrupalCon Deja un comentario
  15. OSI’s Simon Phipps on Open Source’s Past and Future Deja un comentario
  16. Red Hat Enterprise Linux 7.5 Released, Valve Improves Steam Privacy Settings, New Distribution Specification Project for Containers and More Deja un comentario
  17. Simple Cloud Hardening Deja un comentario
  18. Feral Interactive Releases GameMode, YouTube Music Videos Hacked, Oregon Passes Net Neutrality Law and More Deja un comentario
  19. Blockchain, Part I: Introduction and Cryptocurrency Deja un comentario