Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dumb_compare(str1,str2):
- cur_compare=0
- for c in str2:
- if c==str1[cur_compare]:
- print(c,cur_compare)
- cur_compare+=1
- if cur_compare==len(str1):
- return True
- return False
- '''
- The most famous example of this is probably the Game Grumps incident where this algorithm was abused. The clue was "things a father buys for his child that he plays with instead" or something along those lines. They guessed CD player. They got it right, as they had answered "model car". A quick run of this algorithm will reveal:
- dumb_compare('car','cd player')
- comes out as true, as the letters "c", "a" and "r" show up in order in "cd player".
- There is a tool-assisted run of the game that shows the exploit much better.
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement