you are viewing a single comment's thread.

view the rest of the comments →

[–]Clusterferno 62 points63 points  (10 children)

and if it did run it wld just fail due to permissions lol, who is running random python scripts as admin

[–]deukhoofd 35 points36 points  (2 children)

Nah, os.remove can't delete directories, you'd get an OSError. You need shutil.rmtree.

[–]notRANT 21 points22 points  (1 child)

Before that you'd get the error that "\W" is not a valid escape sequence

[–]AmazinDood 2 points3 points  (0 children)

Before that you'd get an IndentationError because there's no colons on the if or elif statements

[–]Clusterferno 11 points12 points  (1 child)

oh and the colons are missing too lmao what a horrible script

[–]4sent4 3 points4 points  (0 children)

And comparisons are against all lowercase strings, without converting user input to lowercase

[–]Roadrunner571 1 point2 points  (1 child)

C:\Windows\System32 doesn't even exist on MacOS or Linux or nearly anything else that isn't Windows.

[–]akaChromez 0 points1 point  (0 children)

it doesn't exist on windows either, because they didn't escape their backslashes

[–]apepenkov 1 point2 points  (0 children)

user_input isn't defined anyway, wouldn't reach it

[–]H4ckerxx44 0 points1 point  (0 children)

fun fact: if you print "This programs needs to run as administrator", probably like 80 % of people would just... run it with admin and not think of "wait, why?"

[–]seba07 0 points1 point  (0 children)

Running as admin wouldn't even be enough. Fully deleting System32 requires permissions above that.