├── requirements.txt ├── .github └── FUNDING.yml ├── LICENSE ├── tools ├── 04_auto_ip_changer.py ├── 01_mac_changer.py ├── 03_ip_changer.py ├── 02_auto_mac_changer.py ├── 06_auto_macip_changer.py └── 05_macip_changer.py ├── README.md └── macip.sh /requirements.txt: -------------------------------------------------------------------------------- 1 | argparse 2 | subprocess 3 | os 4 | sys 5 | re 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [anishalx] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: anishalx 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 MACIP 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/04_auto_ip_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import random 6 | import re 7 | import time 8 | 9 | def get_arguments(): 10 | parser = argparse.ArgumentParser(description="IP address changer tool") 11 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Interface to change its IP address") 12 | return parser.parse_args() 13 | 14 | def check_interface_exists(interface): 15 | try: 16 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 17 | return True 18 | except subprocess.CalledProcessError: 19 | return False 20 | 21 | def generate_random_ip(): 22 | 23 | return f"192.168.{random.randint(0, 255)}.{random.randint(1, 254)}" 24 | 25 | def change_ip(interface, new_ip): 26 | try: 27 | subprocess.call(["ifconfig", interface, new_ip, "netmask", "255.255.255.0"]) 28 | except Exception as e: 29 | print(f"[-] Failed to change IP address: {e}") 30 | 31 | def get_current_ip(interface): 32 | try: 33 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 34 | ip_address_search_result = re.search(r"inet\s(\d+\.\d+\.\d+\.\d+)", ifconfig_result) 35 | if ip_address_search_result: 36 | return ip_address_search_result.group(1) 37 | else: 38 | return None 39 | except subprocess.CalledProcessError: 40 | return None 41 | 42 | 43 | options = get_arguments() 44 | 45 | 46 | if not check_interface_exists(options.interface): 47 | print(f"[-] Interface '{options.interface}' does not exist. Exiting.") 48 | else: 49 | 50 | current_ip = get_current_ip(options.interface) 51 | if current_ip: 52 | print(f"[*] Current IP address: {current_ip}") 53 | else: 54 | print(f"[-] Could not retrieve the current IP address.") 55 | 56 | 57 | for layer in range(1, 6): 58 | new_ip = generate_random_ip() 59 | print(f"\n[+] Changing IP address to: {new_ip}") 60 | 61 | 62 | change_ip(options.interface, new_ip) 63 | 64 | 65 | current_ip = get_current_ip(options.interface) 66 | if current_ip == new_ip: 67 | print(f"[+] Successfully changed to IP: {current_ip}") 68 | else: 69 | print(f"[-] Failed to change the IP address.") 70 | 71 | 72 | time.sleep(1) 73 | -------------------------------------------------------------------------------- /tools/01_mac_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import re 6 | 7 | def get_arguments(): 8 | parser = argparse.ArgumentParser(description="MAC address changer tool") 9 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Interface to change its MAC address") 10 | parser.add_argument("-m", "--mac", dest="new_mac", required=True, help="New MAC address") 11 | return parser.parse_args() 12 | 13 | def check_interface_exists(interface): 14 | try: 15 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 16 | return True 17 | except subprocess.CalledProcessError: 18 | return False 19 | 20 | def validate_mac_address(mac): 21 | mac_regex = r"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" 22 | if re.match(mac_regex, mac): 23 | return True 24 | else: 25 | print("[-] Invalid MAC address format. A valid MAC address is in the format XX:XX:XX:XX:XX:XX") 26 | return False 27 | 28 | def change_mac(interface, new_mac): 29 | print(f"[+] Changing MAC address of interface {interface} to {new_mac}") 30 | subprocess.call(["ifconfig", interface, "down"]) 31 | subprocess.call(["ifconfig", interface, "hw", "ether", new_mac]) 32 | subprocess.call(["ifconfig", interface, "up"]) 33 | 34 | def get_current_mac(interface): 35 | try: 36 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 37 | mac_address_search_result = re.search(r"\w\w:\w\w:\w\w:\w\w:\w\w:\w\w", ifconfig_result) 38 | if mac_address_search_result: 39 | return mac_address_search_result.group(0) 40 | else: 41 | print("[-] Could not read MAC address.") 42 | return None 43 | except subprocess.CalledProcessError: 44 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 45 | return None 46 | 47 | 48 | options = get_arguments() 49 | 50 | 51 | if not check_interface_exists(options.interface): 52 | print(f"[-] Interface '{options.interface}' does not exist. Please check the available interfaces.") 53 | elif not validate_mac_address(options.new_mac): 54 | print("[-] Provided MAC address is invalid.") 55 | else: 56 | current_mac = get_current_mac(options.interface) 57 | print(f"[*] Your current MAC address is: {str(current_mac)}") 58 | 59 | 60 | change_mac(options.interface, options.new_mac) 61 | 62 | 63 | current_mac = get_current_mac(options.interface) 64 | if current_mac and current_mac.lower() == options.new_mac.lower(): 65 | print(f"[+] MAC address was successfully changed to {current_mac}") 66 | else: 67 | print("[-] Failed to change the MAC address.") 68 | -------------------------------------------------------------------------------- /tools/03_ip_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import re 6 | 7 | def get_arguments(): 8 | parser = argparse.ArgumentParser(description="IP address changer tool") 9 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Interface to change its IP address") 10 | parser.add_argument("-ip", "--ipaddress", dest="new_ip", required=True, help="New IP address to assign") 11 | return parser.parse_args() 12 | 13 | def check_interface_exists(interface): 14 | try: 15 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 16 | return True 17 | except subprocess.CalledProcessError: 18 | return False 19 | 20 | def validate_ip_address(ip): 21 | 22 | ip_regex = r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$" 23 | if re.match(ip_regex, ip): 24 | 25 | segments = ip.split('.') 26 | for segment in segments: 27 | if int(segment) > 255: 28 | return False 29 | return True 30 | else: 31 | return False 32 | 33 | def change_ip(interface, new_ip): 34 | print(f"[+] Changing IP address of interface {interface} to {new_ip}") 35 | subprocess.call(["ifconfig", interface, new_ip, "netmask", "255.255.255.0"]) 36 | 37 | def get_current_ip(interface): 38 | try: 39 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 40 | ip_address_search_result = re.search(r"inet\s(\d+\.\d+\.\d+\.\d+)", ifconfig_result) 41 | if ip_address_search_result: 42 | return ip_address_search_result.group(1) 43 | else: 44 | print("[-] Could not read IP address.") 45 | return None 46 | except subprocess.CalledProcessError: 47 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 48 | return None 49 | 50 | 51 | options = get_arguments() 52 | 53 | 54 | if not check_interface_exists(options.interface): 55 | print(f"[-] Interface '{options.interface}' does not exist. Exiting.") 56 | else: 57 | 58 | if not validate_ip_address(options.new_ip): 59 | print("[-] Invalid IP address format. Please provide a valid IP address (e.g., 192.168.1.1).") 60 | else: 61 | 62 | current_ip = get_current_ip(options.interface) 63 | if current_ip: 64 | print(f"[*] Current IP address of {options.interface}: {current_ip}") 65 | 66 | 67 | change_ip(options.interface, options.new_ip) 68 | 69 | 70 | updated_ip = get_current_ip(options.interface) 71 | if updated_ip == options.new_ip: 72 | print(f"[+] Successfully changed IP address to: {updated_ip}") 73 | else: 74 | print("[-] Failed to change the IP address.") 75 | -------------------------------------------------------------------------------- /tools/02_auto_mac_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import re 6 | import random 7 | 8 | 9 | def generate_random_mac(): 10 | mac = [0x02, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), 11 | random.randint(0x00, 0xff), random.randint(0x00, 0xff), random.randint(0x00, 0xff)] 12 | return ':'.join(map(lambda x: f"{x:02x}", mac)) 13 | 14 | 15 | def get_arguments(): 16 | parser = argparse.ArgumentParser(description="MAC address changer tool for multiple layers") 17 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Network interface to change its MAC address multiple times with random MACs") 18 | return parser.parse_args() 19 | 20 | 21 | def check_interface_exists(interface): 22 | try: 23 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 24 | return True 25 | except subprocess.CalledProcessError: 26 | return False 27 | 28 | 29 | def change_mac(interface, new_mac): 30 | subprocess.call(["ifconfig", interface, "down"]) 31 | subprocess.call(["ifconfig", interface, "hw", "ether", new_mac]) 32 | subprocess.call(["ifconfig", interface, "up"]) 33 | 34 | 35 | def get_current_mac(interface): 36 | try: 37 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 38 | mac_address_search_result = re.search(r"\w\w:\w\w:\w\w:\w\w:\w\w:\w\w", ifconfig_result) 39 | if mac_address_search_result: 40 | return mac_address_search_result.group(0) 41 | else: 42 | print(f"[-] Could not read MAC address for {interface}.") 43 | return None 44 | except subprocess.CalledProcessError: 45 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 46 | return None 47 | 48 | 49 | def change_mac_multiple_times(interface, times=5): 50 | 51 | if not check_interface_exists(interface): 52 | print(f"[-] Interface '{interface}' does not exist. Exiting.") 53 | return 54 | 55 | print(f"[*] Starting MAC address change process for interface '{interface}'") 56 | 57 | 58 | for layer in range(times): 59 | random_mac = generate_random_mac() 60 | 61 | current_mac = get_current_mac(interface) 62 | print(f"\n[*] Current MAC: {current_mac} -> Changing to new random MAC: {random_mac}") 63 | 64 | change_mac(interface, random_mac) 65 | 66 | 67 | new_mac = get_current_mac(interface) 68 | if new_mac and new_mac.lower() == random_mac.lower(): 69 | print(f"[+] MAC successfully changed to: {new_mac}") 70 | else: 71 | print(f"[-] Failed to change the MAC address for layer {layer + 1}.") 72 | 73 | print(f"\n[*] MAC address change process completed for '{interface}'.") 74 | 75 | 76 | options = get_arguments() 77 | 78 | 79 | change_mac_multiple_times(options.interface) 80 | -------------------------------------------------------------------------------- /tools/06_auto_macip_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import re 6 | import random 7 | import time 8 | 9 | def get_arguments(): 10 | parser = argparse.ArgumentParser(description="IP and MAC address changer tool") 11 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Network interface to change IP and MAC address") 12 | return parser.parse_args() 13 | 14 | def check_interface_exists(interface): 15 | try: 16 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 17 | return True 18 | except subprocess.CalledProcessError: 19 | return False 20 | 21 | def generate_random_ip(): 22 | 23 | return f"192.168.{random.randint(0, 255)}.{random.randint(1, 254)}" 24 | 25 | def generate_random_mac(): 26 | 27 | mac = [0x00, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), 28 | random.randint(0x00, 0xff), random.randint(0x00, 0xff), random.randint(0x00, 0xff)] 29 | return ':'.join(map(lambda x: f"{x:02x}", mac)) 30 | 31 | def change_ip(interface, new_ip): 32 | print(f"[+] Changing IP address of interface {interface} to {new_ip}") 33 | subprocess.call(["ifconfig", interface, new_ip, "netmask", "255.255.255.0"]) 34 | 35 | def change_mac(interface, new_mac): 36 | print(f"[+] Changing MAC address of interface {interface} to {new_mac}") 37 | subprocess.call(["ifconfig", interface, "down"]) 38 | subprocess.call(["ifconfig", interface, "hw", "ether", new_mac]) 39 | subprocess.call(["ifconfig", interface, "up"]) 40 | 41 | def get_current_ip(interface): 42 | try: 43 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 44 | ip_address_search_result = re.search(r"inet\s(\d+\.\d+\.\d+\.\d+)", ifconfig_result) 45 | if ip_address_search_result: 46 | return ip_address_search_result.group(1) 47 | else: 48 | print("[-] Could not read IP address.") 49 | return None 50 | except subprocess.CalledProcessError: 51 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 52 | return None 53 | 54 | def get_current_mac(interface): 55 | try: 56 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 57 | mac_address_search_result = re.search(r"\w\w:\w\w:\w\w:\w\w:\w\w:\w\w", ifconfig_result) 58 | if mac_address_search_result: 59 | return mac_address_search_result.group(0) 60 | else: 61 | print("[-] Could not read MAC address.") 62 | return None 63 | except subprocess.CalledProcessError: 64 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 65 | return None 66 | 67 | def change_ip_mac_multiple_times(interface, times=5): 68 | for i in range(1, times + 1): 69 | print(f"\n=== Changing IP and MAC address for {interface} - Attempt {i}/{times} ===") 70 | 71 | 72 | new_ip = generate_random_ip() 73 | new_mac = generate_random_mac() 74 | 75 | 76 | current_ip = get_current_ip(interface) 77 | current_mac = get_current_mac(interface) 78 | 79 | if current_ip: 80 | print(f"[*] Current IP address: {current_ip}") 81 | if current_mac: 82 | print(f"[*] Current MAC address: {current_mac}") 83 | 84 | 85 | change_ip(interface, new_ip) 86 | change_mac(interface, new_mac) 87 | 88 | 89 | updated_ip = get_current_ip(interface) 90 | updated_mac = get_current_mac(interface) 91 | 92 | if updated_ip == new_ip: 93 | print(f"[+] Successfully changed IP address to: {updated_ip}") 94 | else: 95 | print("[-] Failed to change the IP address.") 96 | 97 | if updated_mac and updated_mac.lower() == new_mac.lower(): 98 | print(f"[+] Successfully changed MAC address to: {updated_mac}") 99 | else: 100 | print("[-] Failed to change the MAC address.") 101 | 102 | 103 | time.sleep(1) 104 | 105 | 106 | options = get_arguments() 107 | 108 | 109 | if not check_interface_exists(options.interface): 110 | print(f"[-] Interface '{options.interface}' does not exist. Exiting.") 111 | else: 112 | 113 | change_ip_mac_multiple_times(options.interface, times=5) 114 | -------------------------------------------------------------------------------- /tools/05_macip_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import argparse 5 | import re 6 | 7 | def get_arguments(): 8 | parser = argparse.ArgumentParser(description="IP and MAC address changer tool") 9 | parser.add_argument("-i", "--interface", dest="interface", required=True, help="Interface to change its IP and MAC address") 10 | parser.add_argument("-ip", "--ipaddress", dest="new_ip", required=True, help="New IP address to assign") 11 | parser.add_argument("-m", "--mac", dest="new_mac", required=True, help="New MAC address to assign") 12 | return parser.parse_args() 13 | 14 | def check_interface_exists(interface): 15 | try: 16 | subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL) 17 | return True 18 | except subprocess.CalledProcessError: 19 | return False 20 | 21 | def validate_ip_address(ip): 22 | ip_regex = r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$" 23 | if re.match(ip_regex, ip): 24 | segments = ip.split('.') 25 | for segment in segments: 26 | if int(segment) > 255: 27 | return False 28 | return True 29 | else: 30 | return False 31 | 32 | def validate_mac_address(mac): 33 | mac_regex = r"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" 34 | if re.match(mac_regex, mac): 35 | return True 36 | else: 37 | print("[-] Invalid MAC address format. A valid MAC address is in the format XX:XX:XX:XX:XX:XX") 38 | return False 39 | 40 | def change_ip(interface, new_ip): 41 | print(f"[+] Changing IP address of interface {interface} to {new_ip}") 42 | subprocess.call(["ifconfig", interface, new_ip, "netmask", "255.255.255.0"]) 43 | 44 | def change_mac(interface, new_mac): 45 | print(f"[+] Changing MAC address of interface {interface} to {new_mac}") 46 | subprocess.call(["ifconfig", interface, "down"]) 47 | subprocess.call(["ifconfig", interface, "hw", "ether", new_mac]) 48 | subprocess.call(["ifconfig", interface, "up"]) 49 | 50 | def get_current_ip(interface): 51 | try: 52 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 53 | ip_address_search_result = re.search(r"inet\s(\d+\.\d+\.\d+\.\d+)", ifconfig_result) 54 | if ip_address_search_result: 55 | return ip_address_search_result.group(1) 56 | else: 57 | print("[-] Could not read IP address.") 58 | return None 59 | except subprocess.CalledProcessError: 60 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 61 | return None 62 | 63 | def get_current_mac(interface): 64 | try: 65 | ifconfig_result = subprocess.check_output(["ifconfig", interface], stderr=subprocess.DEVNULL).decode("utf-8") 66 | mac_address_search_result = re.search(r"\w\w:\w\w:\w\w:\w\w:\w\w:\w\w", ifconfig_result) 67 | if mac_address_search_result: 68 | return mac_address_search_result.group(0) 69 | else: 70 | print("[-] Could not read MAC address.") 71 | return None 72 | except subprocess.CalledProcessError: 73 | print(f"[-] Could not execute 'ifconfig' for interface {interface}. Please check if the interface exists.") 74 | return None 75 | 76 | 77 | options = get_arguments() 78 | 79 | 80 | if not check_interface_exists(options.interface): 81 | print(f"[-] Interface '{options.interface}' does not exist. Exiting.") 82 | else: 83 | 84 | if not validate_ip_address(options.new_ip): 85 | print("[-] Invalid IP address format. Please provide a valid IP address (e.g., 192.168.1.1).") 86 | 87 | elif not validate_mac_address(options.new_mac): 88 | print("[-] Invalid MAC address format. Please provide a valid MAC address (e.g., 00:1A:2B:3C:4D:5E).") 89 | else: 90 | 91 | current_ip = get_current_ip(options.interface) 92 | current_mac = get_current_mac(options.interface) 93 | 94 | if current_ip: 95 | print(f"[*] Current IP address of {options.interface}: {current_ip}") 96 | if current_mac: 97 | print(f"[*] Current MAC address of {options.interface}: {current_mac}") 98 | 99 | 100 | change_ip(options.interface, options.new_ip) 101 | change_mac(options.interface, options.new_mac) 102 | 103 | 104 | updated_ip = get_current_ip(options.interface) 105 | updated_mac = get_current_mac(options.interface) 106 | 107 | if updated_ip == options.new_ip: 108 | print(f"[+] Successfully changed IP address to: {updated_ip}") 109 | else: 110 | print("[-] Failed to change the IP address.") 111 | 112 | if updated_mac and updated_mac.lower() == options.new_mac.lower(): 113 | print(f"[+] Successfully changed MAC address to: {updated_mac}") 114 | else: 115 | print("[-] Failed to change the MAC address.") 116 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **MacIP: MAC and IP Address Management Tool** 2 | 3 | ## **Overview** 4 | 5 | MacIP is a powerful command-line tool designed to manage and automate MAC and IP address changes on Linux-based systems. This tool is useful for network administrators, penetration testers, and cybersecurity professionals who require dynamic control over network interfaces for privacy, testing, and network management purposes. 6 | 7 | MacIP offers six essential tools to manage your network interface, allowing you to change MAC and IP addresses manually or automatically. The tool is built with ease of use in mind and is compatible with most Linux distributions. 8 | 9 | --- 10 | 11 | ## **Features** 12 | 13 | - **MAC Address Management**: Change or automate MAC address assignments on your network interfaces. 14 | - **IP Address Management**: Modify or automate IP address assignments for greater control and privacy. 15 | - **Combined MAC and IP Management**: Use a combination of MAC and IP address management for more complex use cases. 16 | - **Automation**: Automate the process of changing MAC and IP addresses for network testing or enhanced privacy. 17 | - **Simple Command Interface**: Easy-to-use command-line interface with clear options and commands. 18 | 19 | --- 20 | 21 | ## **Tools Available** 22 | 23 | 1. **MAC Address Change**: Manually change the MAC address on a specified network interface. 24 | 2. **Auto MAC Address Change**: Automatically change the MAC address without user input. 25 | 3. **IP Address Change**: Manually change the IP address of a specified network interface. 26 | 4. **Auto IP Address Change**: Automatically change the IP address without user input. 27 | 5. **MAC and IP Address Change**: Change both MAC and IP addresses simultaneously. 28 | 6. **Auto MAC and IP Address Change**: Automate the process of changing both MAC and IP addresses. 29 | 30 | --- 31 | ## Software Requirements: 32 | The following OSs are officially supported: 33 | 34 | - Debian 8+ 35 | - Kali Linux Rolling 2018.1+ 36 | 37 | The following OSs are likely able to run macip: 38 | 39 | - Deepin 15+ 40 | - Fedora 22+ 41 | - Linux Mint 42 | - Parrot Security 43 | - Ubuntu 15.10+ 44 | - Void Linux 45 | 46 | ## Setup 47 | 48 | ### update and upgrade your system 49 | 50 | ```bash 51 | apt update && apt upgrade -y 52 | ``` 53 | --- 54 | 55 | ## **Installation** 56 | 57 | ### **Prerequisites** 58 | - **Python 3.x** installed on your system. 59 | - Required packages specified in the `requirements.txt` file. 60 | 61 | ### **Clone the Repository** 62 | ```bash 63 | git clone https://github.com/anishalx/macip.git 64 | cd macip 65 | ``` 66 | ### **Install Dependencies** 67 | ```bash 68 | pip install -r requirements.txt 69 | ``` 70 | ### **Make the Script Executable** 71 | ```bash 72 | chmod +x macip.sh 73 | ``` 74 | 75 | ### **Run MacIP** 76 | ```bash 77 | ./macip.sh 78 | ``` 79 | ### **Usage** 80 | After running the tool, you will see a simple menu listing the available tools and commands. You can interact with the tool using the following commands: 81 | 82 | ### **Commands** 83 | 84 | - `exit`: Exit MacIP completely. 85 | - `info`: Display information about a specific tool. 86 | - `list`: List all available tools. 87 | - `options`: Show the current MacIP configuration. 88 | - `update`: Update MacIP to the latest version. 89 | - `use #`: Use a specific tool by its number (e.g., `use 1` to manually change the MAC address). 90 | 91 | ### **Example Usage** 92 | 93 | **Manually Change MAC Address:** 94 | 95 | ```bash 96 | use 1 97 | ``` 98 | - Enter the network interface (e.g., wlan0, eth0). 99 | - Enter the new MAC address. 100 | 101 | 102 | use 1 103 |

104 | 105 | Result 106 |

107 | 108 | **Automatically Change IP Address:** 109 | ```bash 110 | use 4 111 | ``` 112 | - Enter the network interface. 113 | 114 | use 4 115 |

116 | 117 | ## Demo 118 |

119 | 120 | Watch the video 121 | 122 |

123 | 124 | ### **Updating MacIP** 125 | You can update MacIP directly from the command-line using the `update` command: 126 | ```bash 127 | update 128 | ``` 129 | This command will pull the latest version of MacIP from the GitHub repository and update the local files. 130 | 131 | 132 | ### **Contribution Guidelines** 133 | We welcome contributions from the community! If you would like to contribute, follow these steps: 134 | 1. **Fork the repository.** 135 | 2. **Create a new branch for your feature or bug fix.** 136 | 3. **Commit your changes and push them to your fork.** 137 | 4. **Create a pull request, and we will review your submission.** 138 | 139 | 140 | ### **License** 141 | 142 | ## License 143 | 144 | This project is licensed under the [MIT License](./LICENSE). See the LICENSE file for more details. 145 | 146 | 147 | 148 | ### **Acknowledgments** 149 | - Special thanks to all the contributors who helped build and improve this tool. 150 | - The project is designed to support ethical usage in cybersecurity and networking tasks. 151 | 152 | ### **Contact** 153 | For any questions, issues, or feature requests, feel free to open an issue on GitHub or contact me at - **Email Me** 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /macip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define a banner function 4 | display_banner() { 5 | clear 6 | # Define color codes 7 | ORANGE='\033[38;5;208m' # Orange color in 256-color mode 8 | RESET='\033[0m' # Reset to default color 9 | 10 | # Function to print the banner with shadow effect 11 | print_banner() { 12 | echo -e "${ORANGE} ${RESET}" 13 | echo -e "${ORANGE} ███╗ ███╗ █████╗ ██████╗██╗██████╗ ${RESET}" 14 | echo -e "${ORANGE} ████╗ ████║██╔══██╗██╔════╝██║██╔══██╗${RESET}" 15 | echo -e "${ORANGE} ██╔████╔██║███████║██║ ██║██████╔╝${RESET}" 16 | echo -e "${ORANGE} ██║╚██╔╝██║██╔══██║██║ ██║██╔═══╝ ${RESET}" 17 | echo -e "${ORANGE} ██║ ╚═╝ ██║██║ ██║╚██████╗██║██║ ${RESET}" 18 | echo -e "${ORANGE} ${RESET}" 19 | echo -e "${ORANGE} =============================================================${RESET}" 20 | echo -e " 𝕍𝕖𝕣𝕤𝕚𝕠𝕟 : 2.0 𝕋𝕨𝕚𝕥𝕥𝕖𝕣 : anishalx7 " 21 | echo -e "${ORANGE} =============================================================${RESET}" 22 | } 23 | 24 | # Print the banner 25 | print_banner 26 | 27 | # Add a line of text below the banner 28 | echo -e "${ORANGE} START YOUR ANONYMOUS LIFE ...${RESET}" 29 | echo -e "${ORANGE} [+] NOTE: Auto IP address change in every 5 minutes will be coming soon [+] 30 | ${RESET}" 31 | } 32 | 33 | # Call the banner function 34 | display_banner 35 | 36 | # Define the names of the Python tools 37 | TOOLS=( 38 | "[+] MAC address change [+]" # 01_mac_changer.py 39 | "[+] auto MAC address change [+]" # 02_auto_mac_changer.py 40 | "[+] IP address change [+]" # 03_ip_changer.py 41 | "[+] auto IP address change [+]" # 04_auto_ip_changer.py 42 | "[+] MAC address and IP address change [+]" # 05_macip_changer.py 43 | "[+] auto MAC address and IP address change [+]" # 06_auto_macip_changer.py 44 | ) 45 | 46 | # Define the Python files corresponding to the tool names 47 | FILES=( 48 | "tools/01_mac_changer.py" 49 | "tools/02_auto_mac_changer.py" 50 | "tools/03_ip_changer.py" 51 | "tools/04_auto_ip_changer.py" 52 | "tools/05_macip_changer.py" 53 | "tools/06_auto_macip_changer.py" 54 | ) 55 | 56 | # Function to show the main menu 57 | main_menu() { 58 | # Move cursor to row 12 (or adjust as needed) to ensure it starts below the banner 59 | tput cup 12 0 60 | echo "Main Menu" 61 | echo "" 62 | echo " ${#TOOLS[@]} tools loaded" 63 | echo "" 64 | echo "Available Tools:" 65 | for i in "${!TOOLS[@]}"; do 66 | printf " %d) %s\n" $((i+1)) "${TOOLS[$i]}" 67 | done 68 | echo "" 69 | echo "Available Commands:" 70 | echo " exit Completely exit MacIP" 71 | echo " info # Information on a specific tool" 72 | echo " list List available tools" 73 | echo " options Show MacIP configuration" 74 | echo " update Update MacIP" 75 | echo " use # Use a specific tool by its number" 76 | echo "" 77 | read -p "Enter command: " command args 78 | } 79 | 80 | # Function to display information about a specific tool 81 | tool_info() { 82 | if [[ -z "$args" ]]; then 83 | echo "Usage: info " 84 | echo "Example: info 1" 85 | echo "This command provides information on a specific tool." 86 | return 87 | fi 88 | 89 | case $args in 90 | 1) 91 | echo "[+] MAC address change [+]:" 92 | echo "This tool allows you to manually change the MAC address of your network interface." 93 | echo "Usage: Enter your network interface and new MAC address to spoof a new MAC." 94 | ;; 95 | 2) 96 | echo "[+] auto MAC address change [+]:" 97 | echo "Automatically changes your MAC address to a random one at intervals." 98 | echo "Usage: Enter your network interface, and the tool will randomly select a new MAC address." 99 | ;; 100 | 3) 101 | echo "[+] IP address change [+]:" 102 | echo "Manually change the IP address of your network interface." 103 | echo "Usage: Enter your network interface and new IP address to set." 104 | ;; 105 | 4) 106 | echo "[+] auto IP address change [+]:" 107 | echo "Automatically changes your IP address to a random one at intervals." 108 | echo "Usage: Enter your network interface, and the tool will randomly assign a new IP address." 109 | ;; 110 | 5) 111 | echo "[+] MAC address and IP address change [+]:" 112 | echo "Manually change both MAC and IP address of your network interface." 113 | echo "Usage: Enter your network interface, MAC address, and IP address." 114 | ;; 115 | 6) 116 | echo "[+] auto MAC address and IP address change [+]:" 117 | echo "Automatically changes both your MAC and IP address at intervals." 118 | echo "Usage: Enter your network interface, and the tool will randomly assign new values for both." 119 | ;; 120 | *) 121 | echo "Invalid tool number. Please choose a valid tool number from the list." 122 | ;; 123 | esac 124 | } 125 | 126 | # Function to list available tools 127 | list_tools() { 128 | echo "Available Tools:" 129 | for i in "${!TOOLS[@]}"; do 130 | printf " %d) %s\n" $((i+1)) "${TOOLS[$i]}" 131 | done 132 | } 133 | 134 | # Function to show MacIP options 135 | show_options() { 136 | echo "MacIP Configuration Options:" 137 | echo " 1) MAC address change:" 138 | echo " - Allows you to change your MAC address manually." 139 | echo " 2) Auto MAC address change:" 140 | echo " - Automatically assigns a random MAC address." 141 | echo " 3) IP address change:" 142 | echo " - Change your IP address manually." 143 | echo " 4) Auto IP address change:" 144 | echo " - Randomly assigns a new IP address at regular intervals." 145 | echo " 5) MAC and IP address change:" 146 | echo " - Allows you to manually change both MAC and IP." 147 | echo " 6) Auto MAC and IP address change:" 148 | echo " - Automatically assigns both new MAC and IP address at intervals." 149 | } 150 | 151 | # Function to run a specific tool 152 | run_tool() { 153 | if [[ -z "$args" ]]; then 154 | echo "Usage: use " 155 | echo "Example: use 1" 156 | echo "Please specify the tool number to use. Type 'list' to see available tools." 157 | return 158 | fi 159 | 160 | if [[ "$args" =~ ^[0-9]+$ ]] && [[ "$args" -gt 0 && "$args" -le ${#TOOLS[@]} ]]; then 161 | tool_number=$args 162 | user_inputs=$(get_user_inputs "$tool_number") 163 | python3 "${FILES[$((tool_number-1))]}" $user_inputs || { 164 | echo "An error occurred while running the tool. Please check your inputs." 165 | } 166 | else 167 | echo "Invalid tool number. Please choose a valid tool number from the list." 168 | fi 169 | } 170 | 171 | # Function to prompt the user for additional inputs (interface, IP, or MAC address) 172 | get_user_inputs() { 173 | local tool_number=$1 174 | local params="" 175 | 176 | if [[ "$tool_number" -eq 1 || "$tool_number" -eq 2 || "$tool_number" -eq 4 || "$tool_number" -eq 5 || "$tool_number" -eq 6 ]]; then 177 | read -p "Enter network interface (e.g., wlan0, eth0): " interface 178 | params="$params -i $interface" 179 | fi 180 | 181 | if [[ "$tool_number" -eq 1 || "$tool_number" -eq 5 ]]; then 182 | read -p "Enter MAC address (e.g., 00:11:22:33:44:55): " mac 183 | params="$params -m $mac" 184 | fi 185 | 186 | if [[ "$tool_number" -eq 3 || "$tool_number" -eq 5 ]]; then 187 | read -p "Enter IP address (e.g., 192.168.1.100): " ip 188 | params="$params -ip $ip" 189 | fi 190 | 191 | echo "$params" 192 | } 193 | 194 | # Function to update MacIP (placeholder for future implementation) 195 | update_macip() { 196 | echo "Updating MacIP... (This is a placeholder for the actual update process.)" 197 | } 198 | 199 | # Main loop 200 | while true; do 201 | main_menu 202 | case $command in 203 | exit) 204 | echo "Exiting MacIP." 205 | exit 0 206 | ;; 207 | info) 208 | tool_info 209 | ;; 210 | list) 211 | list_tools 212 | ;; 213 | options) 214 | show_options 215 | ;; 216 | update) 217 | update_macip 218 | ;; 219 | use) 220 | run_tool 221 | ;; 222 | *) 223 | echo "Invalid command. Please try again." 224 | ;; 225 | esac 226 | echo "" 227 | read -p "Press Enter to return to the main menu..." 228 | done 229 | --------------------------------------------------------------------------------