@Sus31

Можно ли привести строки в читабельный вид?

Имеется следующий код:
import base64
import marshal

s='YwAAAAAAAAAAAgAAAEAAAABzWAAAAGQAAGQBAGwAAG0BAFoBAAFkAABkAgBsAgBaAgBkAwCEAABaAwBkBACEAABaBABlBQBkBQCDAQBaBgBlAwBlBgCDAQByVABlBABlBgCDAQBHSG4AAGQCAFMoBgAAAGn/////KAEAAAB0AwAAAEFFU05jAQAAAAQAAAAFAAAAQwAAAHNfAAAAZAEAZAIAZAMAZAQAZAUAZwUAfQEAeEMAdAAAfAAAagEAZAYAgwEAgwEARF0sAFwCAH0CAH0DAHQCAHwBAHwCABmDAQB0AwB8AwCDAQBrAwByKwB0BABTcSsAV3QFAFMoBwAAAE5zCwAAADE3OTAgKyAxNTQzcwgAAAAxMjM0ICogM3MLAAAAOTk5OSAtIDEzMzdzCQAAADIwNDggLy8gMnMGAAAAMyAqKiA4dAEAAAAtKAYAAAB0CQAAAGVudW1lcmF0ZXQFAAAAc3BsaXR0BAAAAGV2YWx0AwAAAGludHQFAAAARmFsc2V0BAAAAFRydWUoBAAAAHQGAAAAc2VyaWFsdAsAAABleHByZXNzaW9uc3QFAAAAaW5kZXh0BQAAAHZhbHVlKAAAAAAoAAAAAHMIAAAAPHN0cmluZz50BQAAAGNoZWNrBgAAAHMKAAAAAAEVASIBHAEIAWMBAAAAAwAAAAMAAABDAAAAczcAAAB0AABqAQB8AAB0AABqAgCDAgB9AQB8AQBqAwB0BABqBQBkAQCDAQCDAQB9AgB8AgBqBgCDAABTKAIAAABOcywAAAAwUDhwVjBHNldscVV4dXVLTmsreTRONVBUZmFtR0FsbjlnRGhYRHhpNXJNPSgHAAAAUgAAAAB0AwAAAG5ld3QIAAAATU9ERV9FQ0J0BwAAAGRlY3J5cHR0BgAAAGJhc2U2NHQJAAAAYjY0ZGVjb2RldAUAAABzdHJpcCgDAAAAUggAAAB0BgAAAGNpcGhlcnQHAAAAZGVjb2RlZCgAAAAAKAAAAABzCAAAADxzdHJpbmc+dA0AAABnZW5lcmF0ZV9mbGFnDQAAAHMGAAAAAAEVARgBcw4AAABlbnRlciBzZXJpYWw6ICgHAAAAdA0AAABDcnlwdG8uQ2lwaGVyUgAAAABSEAAAAFIMAAAAUhUAAAB0CQAAAHJhd19pbnB1dFIIAAAAKAAAAAAoAAAAACgAAAAAcwgAAAA8c3RyaW5nPnQIAAAAPG1vZHVsZT4DAAAAcwwAAAAQAQwCCQcJBQwBDAE='

exec(marshal.loads(base64.b64decode(s)))
  • Вопрос задан
  • 215 просмотров
Пригласить эксперта
Ответы на вопрос 2
longclaps
@longclaps
Например, как-то так:
s = ('YwAAAAAAAAAAAgAAAEAAAABzWAAAAGQAAGQBAGwAAG0BAFoBAAFkAABkAgBsAgBaAgBkAw'
     'CEAABaAwBkBACEAABaBABlBQBkBQCDAQBaBgBlAwBlBgCDAQByVABlBABlBgCDAQBHSG4A'
     ........
     'DAAAAcwwAAAAQAQwCCQcJBQwBDAE=')
Ответ написан
Комментировать
leahch
@leahch
3D специалист. Dолго, Dорого, Dерьмово.
>>> s='YwAAAAAAAAAAAgAAAEAAAABzWAAAAGQAAGQBAGwAAG0BAFoBAAFkAABkAgBsAgBaAgBkAwCEAABaAwBkBACEAABaBABlBQBkBQCDAQBaBgBlAwBlBgCDAQByVABlBABlBgCDAQBHSG4AAGQCAFMoBgAAAGn/////KAEAAAB0AwAAAEFFU05jAQAAAAQAAAAFAAAAQwAAAHNfAAAAZAEAZAIAZAMAZAQAZAUAZwUAfQEAeEMAdAAAfAAAagEAZAYAgwEAgwEARF0sAFwCAH0CAH0DAHQCAHwBAHwCABmDAQB0AwB8AwCDAQBrAwByKwB0BABTcSsAV3QFAFMoBwAAAE5zCwAAADE3OTAgKyAxNTQzcwgAAAAxMjM0ICogM3MLAAAAOTk5OSAtIDEzMzdzCQAAADIwNDggLy8gMnMGAAAAMyAqKiA4dAEAAAAtKAYAAAB0CQAAAGVudW1lcmF0ZXQFAAAAc3BsaXR0BAAAAGV2YWx0AwAAAGludHQFAAAARmFsc2V0BAAAAFRydWUoBAAAAHQGAAAAc2VyaWFsdAsAAABleHByZXNzaW9uc3QFAAAAaW5kZXh0BQAAAHZhbHVlKAAAAAAoAAAAAHMIAAAAPHN0cmluZz50BQAAAGNoZWNrBgAAAHMKAAAAAAEVASIBHAEIAWMBAAAAAwAAAAMAAABDAAAAczcAAAB0AABqAQB8AAB0AABqAgCDAgB9AQB8AQBqAwB0BABqBQBkAQCDAQCDAQB9AgB8AgBqBgCDAABTKAIAAABOcywAAAAwUDhwVjBHNldscVV4dXVLTmsreTRONVBUZmFtR0FsbjlnRGhYRHhpNXJNPSgHAAAAUgAAAAB0AwAAAG5ld3QIAAAATU9ERV9FQ0J0BwAAAGRlY3J5cHR0BgAAAGJhc2U2NHQJAAAAYjY0ZGVjb2RldAUAAABzdHJpcCgDAAAAUggAAAB0BgAAAGNpcGhlcnQHAAAAZGVjb2RlZCgAAAAAKAAAAABzCAAAADxzdHJpbmc+dA0AAABnZW5lcmF0ZV9mbGFnDQAAAHMGAAAAAAEVARgBcw4AAABlbnRlciBzZXJpYWw6ICgHAAAAdA0AAABDcnlwdG8uQ2lwaGVyUgAAAABSEAAAAFIMAAAAUhUAAAB0CQAAAHJhd19pbnB1dFIIAAAAKAAAAAAoAAAAACgAAAAAcwgAAAA8c3RyaW5nPnQIAAAAPG1vZHVsZT4DAAAAcwwAAAAQAQwCCQcJBQwBDAE='
>>> import base64
>>> import marshal
>>> b= marshal.loads(base64.b64decode(s))
>>> import dis
>>> dis.dis(b)
  3           0 LOAD_CONST               0 (-1)
              3 LOAD_CONST               1 (('AES',))
              6 IMPORT_NAME              0 (Crypto.Cipher)
              9 IMPORT_FROM              1 (AES)
             12 STORE_NAME               1 (AES)
             15 POP_TOP

  4          16 LOAD_CONST               0 (-1)
             19 LOAD_CONST               2 (None)
             22 IMPORT_NAME              2 (base64)
             25 STORE_NAME               2 (base64)

  6          28 LOAD_CONST               3 (<code object check at 0x105d2fd30, file "<string>", line 6>)
             31 MAKE_FUNCTION            0
             34 STORE_NAME               3 (check)

 13          37 LOAD_CONST               4 (<code object generate_flag at 0x105d2fe30, file "<string>", line 13>)
             40 MAKE_FUNCTION            0
             43 STORE_NAME               4 (generate_flag)

 18          46 LOAD_NAME                5 (raw_input)
             49 LOAD_CONST               5 ('enter serial: ')
             52 CALL_FUNCTION            1
             55 STORE_NAME               6 (serial)

 19          58 LOAD_NAME                3 (check)
             61 LOAD_NAME                6 (serial)
             64 CALL_FUNCTION            1
             67 POP_JUMP_IF_FALSE       84

 20          70 LOAD_NAME                4 (generate_flag)
             73 LOAD_NAME                6 (serial)
             76 CALL_FUNCTION            1
             79 PRINT_ITEM
             80 PRINT_NEWLINE
             81 JUMP_FORWARD             0 (to 84)
        >>   84 LOAD_CONST               2 (None)
             87 RETURN_VALUE
>>>
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
22 нояб. 2024, в 22:26
3500 руб./за проект
22 нояб. 2024, в 21:47
3000 руб./за проект
22 нояб. 2024, в 21:44
50000 руб./за проект