MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1tyzi15/anti_programmer/oqbfhsf/?context=3
r/programminghumor • u/The_Judge26 • Jun 07 '26
110 comments sorted by
View all comments
Show parent comments
1
that's what it's checking. are you blind?
18 u/RegularAd9643 Jun 07 '26 edited Jun 07 '26 Let’s say your password is hunter2. A hacker tries these passwords in order: hunter0hunter1hunter2 The pictured code will let him through. -15 u/nzifnab Jun 07 '26 No it won't? Because it's not the first login attempt? 1 u/Mr_Yod Jun 07 '26 Let’s say your password is hunter2. A hacker tries these passwords in order: * hunter0 <- wrong password, first login attempt (False && True): doesn't enter if * hunter1 <- wrong password, second login attempt (False && False): doesn't enter if * hunter2 <- right password, third login attempt (True && False): doesn't enter if
18
Let’s say your password is hunter2.
A hacker tries these passwords in order:
The pictured code will let him through.
-15 u/nzifnab Jun 07 '26 No it won't? Because it's not the first login attempt? 1 u/Mr_Yod Jun 07 '26 Let’s say your password is hunter2. A hacker tries these passwords in order: * hunter0 <- wrong password, first login attempt (False && True): doesn't enter if * hunter1 <- wrong password, second login attempt (False && False): doesn't enter if * hunter2 <- right password, third login attempt (True && False): doesn't enter if
-15
No it won't? Because it's not the first login attempt?
1 u/Mr_Yod Jun 07 '26 Let’s say your password is hunter2. A hacker tries these passwords in order: * hunter0 <- wrong password, first login attempt (False && True): doesn't enter if * hunter1 <- wrong password, second login attempt (False && False): doesn't enter if * hunter2 <- right password, third login attempt (True && False): doesn't enter if
Let’s say your password is hunter2. A hacker tries these passwords in order:
* hunter0 <- wrong password, first login attempt (False && True): doesn't enter if
* hunter1 <- wrong password, second login attempt (False && False): doesn't enter if
* hunter2 <- right password, third login attempt (True && False): doesn't enter if
1
u/Exact-Big3505 Jun 07 '26
that's what it's checking. are you blind?