Results 1 to 3 of 3

Thread: TMAC for Linux

  1. #1
    Moderator firebits's Avatar
    Join Date
    Mar 2010
    Location
    Brazil
    Posts
    353

    Lightbulb TMAC for Linux

    TMAC, a simple bash program, written for the purpose of changing the MAC address of Network Interface Card (NIC) in Linux based system, provided it has Bash environment.

    This tool attempts to change the MAC address of Network Inteface Cards (NIC) in Linux systems by choosing a randomly-generated MAC address. The chosen MAC address is randomised in following way:
    -It chooses it's first 3 octets needed for MAC address from a list of MAC vendors list provided from IEEE, which can be found here.
    -The rest 3 octets are a set of complete randomly-generated hexadecimal numbers obtained with help of Psuedo-random-generator system variable.

    All it needs is a Linux machine with BASH shell environment.

    Looking at the title, many people would have already been saying that "What the heck? Why do I need a MAC-address-changer for my linux? When I already have 'one-command-solution' for that. Its so simple... user@localhost:~$ sudo ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx

    Sagar Belure

    Download
    https://sourceforge.net/projects/tma...ar.gz/download

  2. #2
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default Re: TMAC for Linux

    gitsnik@bt-vm:~$ sudo macchanger -A wlan0

    I vote that this is one-more-way to do the same thing and should not be included (or maybe tacked into the repositories if you really want to, but I don't think it's necessary).
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  3. #3
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: TMAC for Linux

    I know this is also being courted in the security-basics lists, and to quote from a response there;
    For one, I fail to see why anyone in his right mind would want to change
    the MAC address on every login, StreetView or not. I certainly do hope
    nobody is foolish enough to base their security on the secrecy of MAC
    addresses.
    Second, how does your script account for address collisions?
    Not to mention that your code is way too complex and also assumes that
    the number of OUIs in oui.txt will never change. The whole random
    address generation can easily be reduced to this (and I suppose an awk
    guru will be able to reduce it even more):
    Code:
    ----8<----
    function octet() {
     printf "%02X" $(($RANDOM % 256))
    }
    
    cnt=$(grep "(hex)" oui.txt | wc -l)
    oui=$(grep "(hex)" oui.txt | awk -v n=$(($RANDOM % $cnt + 1)) 'NR==n {print $1}')
    mac="${oui}-$(octet)-$(octet)-$(octet)"
    ---->8----
    
    Also, instead of checking $param1 in multiple elif clauses I'd suggest
    to use a case statement:
    
    case "$param1" in
     -a)
       # do some
       ;;
     -l)
       # do other
       ;;
     *)
       # print usage information (which I'd probably do with a here
       # document rather than multiple "echo -e" commands)
       ;;
    esac
    If you require bash anyway, at least make good use of its features.
    My 0.02 $CURRENCY.
    Regards
    Ansgar Wiechers
    Not to mention as Gitsnik stated above and what I started to post when seeing this first appear. What is special with this tool that GNUMACchanger can't already do?
    Further this has been tested( according to the author) on ubuntu and likely one version that we know nothing about.

Similar Threads

  1. Linux on the go!
    By Virchanza in forum OLD BackTrack 4 Howto
    Replies: 4
    Last Post: 01-26-2010, 05:55 PM
  2. All Linux users contribute to make Linux better
    By Virchanza in forum OLD General IT Discussion
    Replies: 0
    Last Post: 07-13-2009, 12:54 PM
  3. Linux....
    By Ghost40 in forum OLD General IT Discussion
    Replies: 1
    Last Post: 10-03-2008, 05:40 AM
  4. linux/bt2 help
    By Roker in forum OLD Newbie Area
    Replies: 13
    Last Post: 07-16-2008, 08:44 AM
  5. First linux?
    By imported____________ in forum OLD Newbie Area
    Replies: 11
    Last Post: 01-21-2008, 01:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •