Automating macchanger with Python

0 votes

I am trying to use Python to change the mac address of the network interface ens33 every 30 seconds. What Python script should I use to do this? Thanks in advance.

Jun 24, 2019 in Cyber Security & Ethical Hacking by Phalguni
• 1,020 points
553 views

1 answer to this question.

0 votes

You can use the following code:

import subprocess
import time
import random
ip=['00:11:22:33:44:55','23:53:21:53:89:92','88:18:12:59:19:88']
ip1=random.choice(ip)
while(True):    
    subprocess.call(["sudo","ifconfig","ens33","down"])
    subprocess.call(["sudo","ifconfig","ens33","hw","ether",ip1])
    subprocess.call(["sudo","ifconfig","ens33","up"])
    time.sleep(30)
answered Jun 24, 2019 by Avantika
• 1,520 points

Related Questions In Cyber Security & Ethical Hacking

+1 vote
1 answer

Not able to use nmap in python.

nmap module doesn’t have PortScanner attribute. The ...READ MORE

answered Jan 28, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,210 points
2,862 views
0 votes
0 answers

I do not have a real result about encryption file use AES mode CFB in pycrptodome on python

I'm using Ubuntu win. on python I ...READ MORE

Aug 23, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points

closed Aug 23, 2019 by Ahmed 675 views
+1 vote
0 answers

How can I encryption/decryption in Rijndael using python

I found this https://github.com/moeenz/rijndael ,but does not ...READ MORE

Sep 28, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points
4,341 views
0 votes
1 answer

How python is used in ethical hacking?

It is common practice amongst ethical hackers ...READ MORE

answered Feb 3, 2020 in Cyber Security & Ethical Hacking by anonymous
• 59,230 points

edited Oct 7, 2021 by Sarfaraz 922 views
+3 votes
3 answers
+1 vote
1 answer

Python arpspoofing stops the victims internet connection

Here's a similar query. Check this out! https://www.edureka.co/community/53049/arp-spoofing-stops-victim-internet-connection Hope ...READ MORE

answered Sep 21, 2020 in Cyber Security & Ethical Hacking by Karan
• 19,610 points
1,090 views
0 votes
1 answer

SIOCSIFFLAGS: Operation not permitted

You need sudo permissions to make changes to ...READ MORE

answered Feb 6, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,210 points
3,848 views
+1 vote
1 answer
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,055 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP