Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #33875
    bmac
    Participant

    Hi,

    I was following the lecture about making the mac_changer.py script more secure by doing the:

    subprocess.call([“ls”, “-l”])

    instead of

    subprocess.call(“exit 1”, shell=True)

    and i get a traceback errror please see image below:

    #33877
    bmac
    Participant

    #33878
    bmac
    Participant

    Mac Changer Picture

    #33880
    bmac
    Participant

    #33884
    bmac
    Participant

    /home/bmac/PycharmProjects/mac_changer/venv/bin/python /home/bmac/PycharmProjects/mac_changer/mac_changer.py
    interface > eth0
    new MAC > 00:11:22:33:44:55
    [+] Changing MAC address for eth0 to 00:11:22:33:44:55
    Traceback (most recent call last):
    File “/home/bmac/PycharmProjects/mac_changer/mac_changer.py”, line 14, in <module>
    subprocess.call([“sudo ifconfig”, interface, “down”])
    File “/usr/lib/python3.8/subprocess.py”, line 340, in call
    with Popen(*popenargs, **kwargs) as p:
    File “/usr/lib/python3.8/subprocess.py”, line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    File “/usr/lib/python3.8/subprocess.py”, line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: ‘sudo ifconfig’

    Process finished with exit code 1

    #33959
    Zaid SabihZaid Sabih
    Moderator

    None of the screenshots above are loading, please send them again.
    Also can you please show us the code? and are you using the custom Kali I made for this course?

    #33997
    bmac
    Participant

    Hi Zaid,

    Sorry about the pictures I did not know how to inset a picture using the HTML tags 😛

    I actually was using Kali Linux 2020 version. I downloaded your custom Kali VM,, and it worked!! thank you for your help I appreciate it.

    #34056
    Zaid SabihZaid Sabih
    Moderator

    Great stuff, glad you got it 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Privacy Overview
ZSecurity logo featuring a stylized red letter Z

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

3rd Party Cookies

This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping these cookies enabled helps us to improve our website.