Ad

crypto fun

the cypher repeats the following 10 times: left_shift_by(b64encode(a), turn_number)
so to decode you do: b64decode(right_shift_by(code, turn_number))

Code
Diff
  • def should_return_1():
        code = b'jRXbVZyV2pOVk1HUlhVMGRLUjFSc1pHeGlXRTQwVm0wd2QyVkhVWGhTV0doWFYwZG9WVmx0ZEhkVlJscDBUVmM1VjFadGVIbFhhMk0xVmpGS2RHVkliRmhoTWsweFdWZHplRll4WkhWaFJtUlRaV3RGZUZacVFtdFRNVWw0Vkc1T2FGSnRVbGhhVjNSR1pVWmtWMVZyU214U2JHdzBWa2MxUzJGV1NuTlhia0pXWWxob2VsUlVSbXRXTVdSMFVteFNUbUpGY0VwV2JURXdZVEpHVjFOdVVsWmlSMmhoV1d0YVYwMHhjRlpYYlVacVlrWndNRlZ0ZUd0aFZscHpZMFp3VjJKSFVYZFdha1poVTBaT2NscEdhR2xTYTNCWVYxZDBhMVJyTVVkalJWWlRZbGhTV1ZWcVJrdFRWbkJHVjJ4T1ZXSlZXVEpXYlhSM1ZqRmFObEpZWkZwbGEzQklXWHBHVDFkWFRrZFhiV3hUWWtoQ1dWWXhaREJoTVZaeVRWVmtWbUpIYUhOVmJUVkRZMnhTVjFkdFJteFdiR3cxV1ROd1YxWXdNVVZTYTFwWFlsaFNNMVpxUm1GU2JVbzJVV3h3YkdFeGNGbFhhMVpoVkRKU1YxVnVVbXBTYkVwVVZtMDFRMkl4V1hoYVJGSnBUV3RzTkZaWGRHdGhWazVHVGxac1dtSkhhRlJXYkZwaFkxWkdkVnBHVW1sU2JGa3hWa1phYjJFeFduSk5WbWhXWVRKNFdWWnJWVEZrYkZweFVtdDBVMkpIVWpGVk1uaFhZVVV4YzFOcmFGaGlSbkJvVmtSS1RtVkdjRWxVYldoVFRXNW9kMWRXVWtOa01WbDRWMjVLV0dKSFVtOVVWbHBYVGtaYVIyRkhPVmRpVlhCNVdUQmFiMVl5UlhoWGJXaFhUVlp3V0ZwRlpGZFRSa3B5VGxaT2FXRXdjRmxXYlhCS1RWZEZlRmRzYUZSaVJuQlpXVmQwUzJGR1duTmFSemxzWWtad2VGVldhRzloTVZsM1YydG9WbFl6YUROWlZXUkdaV3hHY21KR1pHbFdSVWt3VmxSSmVGWXlVa2RUYmtwb1VtczFjRll3Wkc5WGJGcFlUVlJDYTAxWFVraFdNV2h2VjBkS1dWVnJPVlpoYTFwSVZHdGFhMk5zV25Sa1JtUk9ZVE5DU2xac1kzaGlNV3hYVjFod1ZtRXphRmhWYTFaaFZrWmFkRTFWWkZOaVJrcDZXVlZhYTJGV1NuVlJiVVpYVFc1U1dGbFVSa3BsUm1SWllVWlNhV0V6UW5kV1YzUmhXVlprUjFkdVJsVmlSVFZ6V1d0YWQwMUdiRFpVYlhScFVteHNORll5ZEhkV2JVcFpZVVJPVjFJemFFeFpla3BMVWxaU2MxcEhiRk5OVlZZelZteGFVMUl4YkZkWGJrcE9WbXh3V0ZsWWNGZFhSbXgwWkVWMGEySkdjRWhYYTJSM1ZVWmFjbE5zYUZkaVZGWlFXVlZhUjFaVk1VVmlSbWhYWWtoQ1RWZFVUbXBQVmtKWFYxaG9hRkl6VWxoWldIQkhVMFphYzFWclpGZE5SRVk9V0Zrd1VrOVc=YXpGSFkwV'
    
        for i in range(9, -1, -1):
            code = b64decode(ror(code, i))
        
        return eval(code)
    • def should_return_1():
    • return 1
    • code = b'jRXbVZyV2pOVk1HUlhVMGRLUjFSc1pHeGlXRTQwVm0wd2QyVkhVWGhTV0doWFYwZG9WVmx0ZEhkVlJscDBUVmM1VjFadGVIbFhhMk0xVmpGS2RHVkliRmhoTWsweFdWZHplRll4WkhWaFJtUlRaV3RGZUZacVFtdFRNVWw0Vkc1T2FGSnRVbGhhVjNSR1pVWmtWMVZyU214U2JHdzBWa2MxUzJGV1NuTlhia0pXWWxob2VsUlVSbXRXTVdSMFVteFNUbUpGY0VwV2JURXdZVEpHVjFOdVVsWmlSMmhoV1d0YVYwMHhjRlpYYlVacVlrWndNRlZ0ZUd0aFZscHpZMFp3VjJ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