(strng)
| 19 | return decrypted |
| 20 | |
| 21 | def brute_force(strng): |
| 22 | key = 1 |
| 23 | decrypted = '' |
| 24 | while key <= 94: |
| 25 | for x in strng: |
| 26 | indx = (ord(x) - key) % 256 |
| 27 | if indx < 32: |
| 28 | indx = indx + 95 |
| 29 | decrypted = decrypted + chr(indx) |
| 30 | print("Key: {}\t| Message: {}".format(key, decrypted)) |
| 31 | decrypted = '' |
| 32 | key += 1 |
| 33 | return None |
| 34 | |
| 35 | |
| 36 | def main(): |