Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- export PURPLE="\e[01;35m"
- export Z="\e[0m"
- export BLUE="\e[01;34m"
- echo -e $PURPLE "Genierere zufällige MAC-Adresse"
- a1=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- a2=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- a3=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- a4=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- a5=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- a6=`cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 2 | head -n 1`
- ifconfig eth0 down
- ifconfig eth0 hw ether $a1":"$a2":"$a3":"$a4":"$a5":"$a6
- ifconfig eth0 up
- echo -e $BLUE "neue MAC-Adresse lautet:" $a1":"$a2":"$a3":"$a4":"$a5":"$a6
- echo -e $Z
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement