Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decode 3D-Secure PaRes in Python

I'm unable to find a way to decode information (PaRes) posted back from 3D-Secure ACS service.

Does someone have an idea how to decomress/decode this string?

eNrNWWmP4ziS/SuFno/ubt221HAmQN23dcvyN13WYR22JFvHrx/ZWVWdW12z2ztYLCYBpchgMBjB4OMj5b2Td2nK2ml879L3vZb2fZilX4rk7RfkjCckuiVgjKDwOEWpkAoJGIlQAj+n2C765X1vACvtX8qv0t/o8Ui7vmibd+R3+Hd0D32rrgN3cR42w/s+jG+0pL/jOxyhyD30tbqv005i3wmCwHEcwzAURREE2UMf4j30Z3/j/iz1azBTkbzvSP7E7+RQczf0MKIdzVbhcYhxiSff9tBTY5+EQ/qOwggBUyj+Bdn9ARN/wNQeesn316c5ULf31TZGwjC8hz6L9uu8dWkTz+9r4Hvoe22fTte2SVeNNcrv5T30p3fXsHmH/8XfOsbauneO7/uhqP/iHYrvoZd83w/hcO/f3T30tbSHnp0kK72974v1P9Mm6Tpre+h75SVm0yEsqvcwjgeJ/Wj8Kloz1CRt91JFngn6XttDH2ahV67f93aRNeuYXfplqqumf/slH4brHxA0juPvI/Z722UQusYCwRS0KiR9kf3jl49eaSI15/Z/1Y0Jm7Yp4rAqlnBYV4yWDnmbfAFV1nbFkNc/M+NYT0sIZHHMb6up32IEb357SmAMIVab0M+Nfors74zyo7NdH/7W5yHyHOAHQ+97Kz2nzwWSfnEt6e2Xf/xd2LBFlvbDv+PON1c+W/hmzwure/o+6M1tdtTjw9WYAB2EDoXI6GQEzgF/+9bvQ3MPfff/a3Afmfw0Yx+KUoZzQ5xyUx1JVPpgWXtDZ4KDhl2dFlsiZenylJXsrB9PMFuBwyUIFS/E7LuqJJk/lgMxTcfzjogtW9WbiqDztHrgGxC6YE4KS3Rn6cgzsULUg3xQ4eQCC+4DIkt066OPeYtk/e60GIkW5q3R8sEIh85NYlS7IzCVD2NbrK+ZPM9GrQZvn7L0NUolnT+iOq6gY8Mh/CjZ96hM40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+0Si8IaeWQOHDoDTw8FlIx1nPowR57IFRw5d5ISVWuaeoGxUloMXrSd7tho49DApV1VfDrLiQsvSBO9OMcqskx3QYyyhEQPny7DZrlmilAvm4G3PikLJPX1rvCuuX95BbBCf/1FmF6B0kzjHmEYlZLFzfa0PiY4fqZHZafYOh1lOHAEeLp83GKGfXS4bpvW9C1OSquM45aXs+DVriR4buYDN08MNSGjh25tvJja2HsHoatPg5xWhJ6tm3JYJgv23Pq+gGv44bGPPjAwEpEWmQVuVyI872AzpGg5EMcGZhKn82E8a4URHSGbG8cd6BLblfEFFteGHkxSWzZba7LcvGVXjnJEDxRzVGQJjFILnyf7B6YRm12VKD4U5qfJtiKzJWDyUioj+iWOB9O11EdXVJw13uBDVBYoO+BGe74i6LFRjxuNmx0umkARFit6jfruKWFAkZuDQtTmOkJUBNCLWhJArC1vDtDOYOl90JqqpyetrM6YBS5NBpUduH2gEi72kGEB39Vs6MRiOz49vaTLRD683MY9P0T2Z8fz14f4V+/Hjw/Qn/+VeGfNzoALw==

I read somewhere that it can be base64 encoded - but I could not figure out how to decode it using python. Is it eventually compressed as well?

Any input welcome!

like image 208
ohrstrom Avatar asked Jan 08 '23 12:01

ohrstrom


1 Answers

import base64
import zlib

data = base64.b64decode('eNrNWWmP4ziS/S...')
xml_data = zlib.decompress(data)
print xml_data
like image 89
Sergey Avatar answered Jan 21 '23 12:01

Sergey