what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

HideMAC 1.2

HideMAC 1.2
Posted Dec 3, 2011
Authored by infodox | Site compsoc.nuigalway.ie

A MAC changing utility that uses both ifconfig and GNU-Macchanger (checks if mac changer exists, if not, uses ifconfig) to spoof ones MAC with a totally random value. Written in Python.

tags | tool, spoof, python
systems | unix
SHA-256 | be6130bf64c1b4bd8dff08738fd95e00e2600a3558797364ad485593266a1157

HideMAC 1.2

Change Mirror Download
#!/usr/bin/env python
# HideMAC - 0x4641494c - v1.2
# By infodox - credit to Trip from Hak5 for the getmac function, as mine did not work!
# Credits to Mario Scondo for randomMAC function!
import os
import commands
import sys
import random
# Function: amiroot()
def amiroot():
if os.geteuid() != 0:
print "[-] sorry, you need to run this as root"
sys.exit(1)
else:
pass

# Function: randommac()
def randomMAC():
mac = [ 0x00,
random.randint(0x00, 0xff),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
return ':'.join(map(lambda x: "%02x" % x, mac))
return newmac

# Function: getmac(iface)
def getmac(iface):
data = commands.getoutput("ifconfig " + iface)
words = data.split()
found = 0
for x in words:
#print x
if found != 0:
mac = x
break
if x == "HWaddr":
found = 1
if len(mac) == 0:
mac = 'Mac not found'
mac = mac[:17]
print mac

# Function: check()
def check():
if os.path.isfile("/usr/local/bin/macchanger") == True:
print("MAC Changer is installed, using it...")
macchanger_changemac(iface)
else:
print("MAC Changer is not installed, using ifconfig method!")
ifconfig_changemac(iface)

# Function: macchanger_changemac(iface)
def macchanger_changemac(iface):
print("[+] Changing your MAC address to something totally random...") # More statuses
os.popen("macchanger --random " + iface) # CHANGES MAC ADDRESS!!!!!!!

# Function: ifconfig_changemac(iface)
def ifconfig_changemac(iface):
print("[+] Changing your MAC address to something totally random...") # More statuses
os.popen("ifconfig " + iface + " hw ether " + randomMAC())

# Main part!!!
print("Welcome to HideMAC - 0x4641494c - v1.2 by infodox")
print("This code is still under development - I have a lot of work to do!")
print("Have fun...")
amiroot()
iface = raw_input("what interface are you changing: ") # Sets the interface to fuck with...
print("[*] Your Current MAC address is: ")
getmac(iface)
os.popen("ifconfig " + iface + " down") # Puts interface down :(
check()
os.popen("ifconfig " + iface + " up") # Puts interface back up :)
print("[*] Your New MAC address is: ")
getmac(iface)
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close