Wednesday 12 December 2018

Cool Stuff To Try Out in Linux

You know one of those instances where you need to stroll about to clear your head or get some fresh air. Well, let's make things interesting in a Linux system to avoid the physical strolling and get on the digital strolling. 

Here are some cool stuff to do in pretty much any Linux distro. They'll come in handy to buzz of arrogant guys, baffle some dudes, earn for yourself some bragging rights. Sometimes just for show off, and also as a great epic riposte to some noobies (mostly windows dudes), or a comeback to some challenge.

Much of what is done here is bash scripting, one of the major reasons why the terminal is so powerful. We can also have perl and python scripting, two of the most common and popular hacker's programming languages.


You can copy and paste some of the code or enjoy the thrill of writing down the lines of code, which i recommend.

Save the lines of code in a file, e.g. matrix.sh. Ensure they have a ".sh" extension i.e. run the command such as: touch matrix.sh
 

Finally ensure the file has executable permission, or give them executable permission with the command:
        chmod +x matrix.sh

Then run the file in either of this two ways:
  1.  Type: ./matrix.sh 
  2.  Type: bash matrix.sh

Here are the cool stuff:

1. Creating A Binary Numbers Matrix Effect on the Terminal Workspace
    Code:
 
        perl -e '$|++;    while (1) {print "" x (rand(35) +1),int(rand(2))}'
        echo "Done"


2. Generating Alphanumeric Passwords
    Code:
 
        #!/bin/sh
        echo "Password Generator"
        echo "generating passwords for you since The Big Bang..."
        echo "Enter Length of Password: " && read len
        strings /dev/urandom | grep -o '[[:alnum:]]' | head -n $len |tr -d '\n';
        echo

3. Generate Strings of Colored stuff on Terminal.
    Code:
 
        while true;
        do printf "\e[38;5;$(($(od -d -N 2 -A n /dev/urandom)%$(tput colors)))m.*\e[0m";
        done


4. Pretend Your Computer is Busy Doing Some Cracking Task
    Code:
 
        while [ true ];
        do
            head -n 100 /dev/urandom;
            sleep .01;
            done | hexdump -C | grep "cafe"


5. Making A Number Pyramid/Slope
    Code:
 
        echo "See the following"
        for((i=1; i<=50; i++))
        do
            for((j=1; j<=i; j++))
            do
                echo -n "$j"
            done
            echo ""
        done

    Note: Play about with length of slope by changing the 50 to any other number you wish. It's all about concatenation.

6. Ruby Code to Display a Sine Wave on Terminal
    Code:
 
        ruby -e "i=0;    loop{puts''*(29*(Math.sin(i)/2+1))+'|'*(29*(Math.cos(i)/2+1));    i+=0.1}"


Well, do enjoy the Linux digital stroll.

No comments:

Post a Comment

Let's Talk Anonymity: A Short Treatise On Anonymity

The internet takes a very serious position in our everyday lives. We do a lot of activities over the web, some of which we would like our ...