Results 1 to 3 of 3

Thread: How To Execute Macchanger On Startup?

  1. #1
    Just burned his ISO
    Join Date
    Aug 2008
    Posts
    3

    Default How To Execute Macchanger On Startup?

    I have BT3 Final installed on my hdd and would like macchanger to run automatcally. I think I need a script in /etc/rc.d/ but not sure if it would run before the wifi card is initialized. I suppose I'd have to have the following in the script.

    Code:
    airmon-ng stop ath0
    ifconfig wifi0 down
    macchanger --mac 00:11:22:33:44:55 wifi0
    airmon-ng start wifi0
    Can someone help?

    Thanks!

  2. #2
    Member
    Join Date
    Jun 2008
    Posts
    101

    Default

    There is no need for using airmon-ng unless you want monitor mode automatically at startup. I would add the script to /etc/rc.d/rc.inet1 which is loaded by rc.M at startup:

    Code:
    #! /bin/sh
    # /etc/rc.d/rc.inet1
    # This script is used to bring up the various network interfaces.
    #
    # Modified for SLAX by Tomas M. <http://slax.linux-live.org>
    #
    
    if [ "$1" = "start" -o "$1" = "" ]; then
    
       ifconfig lo down 2>/dev/null
       /sbin/ifconfig lo 127.0.0.1 2>/dev/null
       /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo 2>/dev/null
    
       ifconfig wifi0 down
       macchanger --mac=00:11:22:33:44:55 wifi0
    
       for eth in `ls /sys/class/net | grep -v sit`; do
          # check if dhcpcd is not already running for $eth interface,
          # in that case it was started by hotplug? so don't start it again
          if [ "$eth" != "lo" -a ! -e /etc/dhcpc/dhcpcd-$eth.pid ]; then
             echo "Auto Configure IP address for $eth: /sbin/dhcpcd -t 60 $eth &"
             /sbin/dhcpcd -t 60 $eth &
          fi
       done
    fi
    I guess that would do the trick. Let me know if it worked.

  3. #3
    Just burned his ISO
    Join Date
    Dec 2007
    Posts
    21

    Default

    That ast one is good. Remember to add in a section for other interfaces, such as rausb0 if you use the rt73 legacy driver.
    True security is based on open and rigorous probing of our strengths and weaknesses. Yeah, and life is too short for hyperbole, metaphor, and BS.

Posting Permissions

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