Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Cybersecurity: Brute Force Attacks & Defenses

Cybersecurity: Brute Force Attacks & Defenses

Try This: Generate a Random Cryptabet

It takes a while to well and truly shuffle the characters in an alphabet by hand, so why not use a project? 

  • Enter and flash cryptabet_autogenerate
  • Open a terminal and connect it to the micro:bit.
  • Wait while it builds the cryptabet with an approach that kind of resembles a brute force attack!

Example project: cryptabet_autogenerate

How It Works

The cryptabet_auto_generator project starts with alpha, which is set to the upper-case alphabet for the sake of example. It repeatedly generates random numbers in the 0…25 range, and then grabs the character at that index from alpha. Then, it checks if that character is already in crypta. If yes, then it discards the character and tries again. If no, then it appends the character to crypta and starts adding the next character.

Pause blocks were added at various points to give the online editor’s terminal enough time to keep up with the stream of text data.

The project uses the length of the alpha string to build the crypta string. So there would be no problem using a custom alphabet, like set alpha to (“vLR{}:,’01234 56789”), for example. That particular alphabet would support dictionaries from the Terminal Control – Go Wireless activity.


Printer-friendly version
How the Scrambled Alphabet Cipher Works
Prev
Your Turn: Strengthen Previous Apps
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress