Yet Another Bash Matrix Script :P

While I was checking various bash properties around and having fun, I created a matrix effect with bash, and wanted to share it :slight_smile: You need to ctrl+z to terminate it. And if it mess up with your console colors,

tput sgr0

will bring them to defaults. Here is the code:

#!/bin/bash
str=" 0        1        2   3        45           6 7      8      9   q       w      e       r       t   y  u  o   pa  sd   fgh  jk lizxcvbnmQ WER   TY  U    O       P       A        S D    FG HJ        KLZX CV       B       NM"
color[0]='\E[30;40m'
color[1]='\E[31;40m'
color[2]='\E[34;40m'
color[3]='\E[37;40m'
while true
do
number1=$RANDOM
let "number1 %= ${#str}"
number2=$RANDOM
let "number2 %=4"
echo -n -e "\033[1m${color[$number2]}${str:number1:1}\0330m"
done

Haha awesome matrix effect :slight_smile:

This is the hacker version of it, you need to give it a option . Let say you named it to “hack”. Type like this,

hack http://www.facebook.com

and then watch it to hack facebook for you :stuck_out_tongue:

here is the code:

#!/bin/bash
str=" 0        1        2   3        45           6 7      8      9   q       w      e       r       t   y  u  o   pa  sd   fgh  jk lizxcvbnmQ WER   TY  U    O       P       A        S D    FG HJ        KLZX CV       B       NM"
color[0]='\E[30;40m'
color[1]='\E[31;40m'
color[2]='\E[34;40m'
color[3]='\E[37;40m'
clear
echo "hacking $1"
sleep 2
echo "Initializing"
sleep 2
echo "Server hacking module is loading"
sleep 2
echo "Server hacking module is ready"
sleep 2
echo "Hack module is starting in 5 seconds"
sleep 1
echo "4 seconds"
sleep 1
echo "3 seconds"
sleep 1
echo "2 seconds"
sleep 1
echo "1 seconds"
sleep 1
for i in {1..10000}
do
number1=$RANDOM
let "number1 %= ${#str}"
number2=$RANDOM
let "number2 %=4"
echo -n -e "\033[1m${color[$number2]}${str:number1:1}\0330m"
done
sleep 3
echo "$1 succesfully hacked!"
sleep 1
echo "You are a terrific hacker dude!!"

Version 3, with more realistic hacking :smiley:

#!/bin/bash
str=" 0        1        2   3        45           6 7      8      9   q       w      e       r       t   y  u  o   pa  sd   fgh  jk lizxcvbnmQ WER   TY  U    O       P       A        S D    FG HJ        KLZX CV       B       NM"
color[0]='\E[30;40m'
color[1]='\E[31;40m'
color[2]='\E[34;40m'
color[3]='\E[37;40m'
clear
echo "hacking $1"
sleep 2
echo "Initializing"
sleep 2
echo "Server hacking module is loading"
sleep 2
echo "Server hacking module is ready"
sleep 2
echo "Hack module is starting in 5 seconds"
sleep 1
echo "4 seconds"
sleep 1
echo "3 seconds"
sleep 1
echo "2 seconds"
sleep 1
echo "1 seconds"
sleep 1
ping -c 3 $1
sleep 2
netstat
sleep 1
findsmb 
sleep 1
for i in {1..10000}
do
number1=$RANDOM
let "number1 %= ${#str}"
number2=$RANDOM
let "number2 %=4"
echo -n -e "\033[1m${color[$number2]}${str:number1:1}\0330m"
done
sleep 3
echo "$1 succesfully hacked!"
sleep 1
echo "You are a terrific hacker dude :O"

AFAICS, it’s just some innocent fun script to generate some screen effect in a terminal.

Hmm. Did someone reported this topic?

Knurpht wrote:
> AFAICS, it’s just some innocent fun script to generate some screen
> effect in a terminal.

happy to hear it is safe…and, wish i had the ability to say so…
thanks for looking at it for us non-coders!

–
DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

yasar11732 wrote:
> Hmm. Did someone reported this topic?

i’m not technically smart enough to pass judgment on the safety of
your script, so i asked someone who is to peek at it…

and, since i got the green light, i tried it…
kinda reminds me of the results of a .bat file i saw in the
80’s…thanks for sharing…

ok?

–
DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Hello all,

Nice scripts, but why would you like to hack if you could format your own disks!rotfl!
Here’s my version, it will format all your disks:

#!/bin/bash
color='\E30;40m'
clear
echo "Formating disk(s): " /dev/sd*
sleep 2
echo "Initializing..."
sleep 2
echo -ne "Are you sure you want to format these disks?(y/n): "
sleep 1
echo "Y"
sleep 1
echo "Ok, formating starts in 5 seconds"
sleep 1
echo "4 seconds"
sleep 1
echo "3 seconds"
sleep 1
echo "2 seconds"
sleep 1
echo "1 seconds"
sleep 1

for i in {1..50000}
do
echo -n -e "\0331m${color}0\0330m"
done
sleep 1
echo ""
echo /dev/sd* "are formatted."
sleep 1
echo "Have a nice day! :)"

Hope you like it!

Good luck!:wink:

Haha cool :slight_smile:

Hmm ok :slight_smile: