Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #33875
    Avatarbmac
    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
    Avatarbmac
    Participant

    #33878
    Avatarbmac
    Participant

    Mac Changer Picture

    #33880
    Avatarbmac
    Participant

    #33884
    Avatarbmac
    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
    AvatarZaid 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
    Avatarbmac
    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
    AvatarZaid 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.