gentilkiwi / wanadecrypt

A decryptor for Wanacry (you need the private key!)
178 stars 71 forks source link

Multiple if pyramids #3

Open deltabeard opened 7 years ago

deltabeard commented 7 years ago

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 https://github.com/gentilkiwi/wanadecrypt/pull/1 fixes this.

maurosampietro commented 7 years ago

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.)

deltabeard commented 7 years ago

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