davidbombal / red-python-scripts

MIT License
2.04k stars 1.59k forks source link

python mac changer script #16

Closed achalami closed 3 years ago

achalami commented 3 years ago

I got this Error any idea to solve it:

line 57, in getmac_output = subprocess.run("getmac", capture_output=True).stdout.decode().split('\n') UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 243: invalid start byte

davidbombal commented 3 years ago

Solved previously "you are working on windows machine since utf-8 is wrong encoding for that , utf-8 is default encoding for this if you write stdout.decode() instead replace it with stdout.decode("cp1252") it will work ;)"

Script is kept in tact as per the video. Will add a new script with the fix.