August 17, 2017, 04:45:45 AM
Welcome, Guest. Please login or register.

THS Promising Student Scholarship has been introduced! Full and partial scholarships available. See http://www.top-hat-sec.com/scholarships.html for more details

Author Topic: Auto Macchanger after reboot  (Read 1273 times)

Offline darkc0d3

  • YOU CANNOT KILL AN IDEA
  • Top Hat Member
  • Elite
  • ********
  • Posts: 660
  • Internets: +35/-0
Auto Macchanger after reboot
« on: January 01, 2016, 10:44:23 PM »
Greetings
This is a small tip to change mac address automatically after reboot, it's very useful especially to connect often in hotspots or public networks. i tested in kalilinux 2.0 and ubuntu and works fine.

Open and terminal and type:
Code: [Select]
nano /etc/network/if-pre-up.d/changemac
put your interface inside like that:

#! /bin/sh
macchanger -r eth0
macchanger -r wlan0
macchanger -r wlan1
macchanger -r wlan2

save the script and make it executeble.
Code: [Select]
chmod +x /etc/network/if-pre-up.d/changemac
reboot and your interface change the mac address
this is me


now


after reboot
''When you have the knowledge you are a king, share the knowledge and you are God''
darkc0d3

Offline D4rk-50ld13r

  • Top Hat Member
  • Elite
  • ********
  • Posts: 877
  • Internets: +189/-0
  • I will hack for beer.
    • http://www.ghostsec.org/
Re: Auto Macchanger after reboot
« Reply #1 on: January 02, 2016, 02:31:25 AM »
Thanks for the tip buddy , i thought i did implement the mac changing option when i built my OS !! but  actually i didnt ! i was convinced that it did ! :) :)
Now i will have to double check all the time :)
Thanks again.
+1
If you sat a monkey down in front of a keyboard, the first thing typed would be
a unix command.

Offline GalaxyNinja

  • Global Moderator
  • Elite
  • *****
  • Posts: 1716
  • Internets: +96/-0
  • My password is **********
Re: Auto Macchanger after reboot
« Reply #2 on: January 02, 2016, 07:36:01 AM »
darkc0d3, thank you for the tutorial! +1
I see you are using bash  :)

Offline doctane

  • Top Hat Member
  • Experienced
  • ********
  • Posts: 154
  • Internets: +14/-0
  • Never should of trusted hollywood!
    • Public key
Re: Auto Macchanger after reboot
« Reply #3 on: January 18, 2016, 05:47:34 AM »
Nice!  I noticed in

PRETTY_NAME="Kali GNU/Linux 2.0 (sana)"
VERSION="2.0 (sana)"
VERSION_ID="2.0"
#
They are doing this now via the ifup scripts.  Course I haven't tested it yet.  I have copied the locations below.

----
/etc/network/if-post-down.d/macchanger
/etc/network/if-pre-up.d/macchanger
---
Don't blink, don't move. You feel that, as your worries fade away? You hear that? That's the Sound of Madness, calling for you!

Offline RedCor

  • Top Hat Member
  • Prospect
  • ********
  • Posts: 31
  • Internets: +5/-0
Re: Auto Macchanger after reboot
« Reply #4 on: March 24, 2016, 11:09:34 AM »
Thank for the command, this is very cool for my laptop

Offline Malachai

  • Top Hat Member
  • Super Elite
  • ********
  • Posts: 2803
  • Internets: +18/-7
  • #!/bin/sh Day/Night (Grey Hat)
Re: Auto Macchanger after reboot
« Reply #5 on: March 28, 2016, 12:19:46 AM »
I still use one of my old scrips I did when I first started with wifi stuff. I ran the scrip and it's changed the power on the card and the mac address plus started the scan on it's own.

Looks good... keep it up.
** Dont' judge me! **

*//
  Hope that Firewall works because your SCREWED  
  //*

Offline drksde

  • Top Hat Member
  • Prospect
  • ********
  • Posts: 4
  • Internets: +0/-0
Re: Auto Macchanger after reboot
« Reply #6 on: September 01, 2016, 10:17:03 AM »
awesome !  :o