gentilkiwi / wanadecrypt

A decryptor for Wanacry (you need the private key!)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple if pyramids

deltabeard opened this issue · comments

There are multiple if pyramids in your code, such as line 75. Use your if statements to check if the statement is false rather than true. That way you won't need to wrap all your program logic in ifs.

Edit: It looks like pr #1 fixes this.

I was going exactly to fix that, fortunately i checked the issue before starting.

Your fix could be further enhanced by separating logic and wprints. (introducing internal return states and handling them separately. in this case displaying a message to the user.)

I didn't make the pull request. You should comment your suggested changes on the pull request.