Skip to content

Instantly share code, notes, and snippets.

View m3kk-kn1ght's full-sized avatar

m3kk_kn1ght m3kk-kn1ght

View GitHub Profile
const BigNumber = require('bignumber.js');
BigNumber['config']({
'POW_PRECISION': 0x0
});
const readline = require('readline')['createInterface']({
'input': process['stdin'],
'output': process['stdout']
});
var arr = [0x4df, 0x20c, 0x3f5, 0xe7, 0x50a, 0xc0, 0x31e, 0x44e, 0x1a0, 0x409, 0x3a0, 0x48f, 0x54, 0x114, 0x48f, 0x158, 0x4a3, 0xb7, 0x36e, 0x25, 0x26a, 0x14, 0x3d, 0xf5, 0x328, 0x3, 0x9, 0x29f, 0x223, 0x162, 0x2, 0xc3, 0x16c, 0x4b5, 0x14c, 0x26e, 0x18a, 0x1f6, 0x38e, 0x48a, 0x399, 0xd4, 0xb, 0x339, 0x439, 0x35a];
var res = ['28147733412126416143356431805908788848700221138704543049914240750210634423746310795983766007927465537337773675180806753151701119440592637649120674223666407488884928441158916203204899710775857273445369674102642893364763591400590102447525349505851152484162354348321887410090849255334994123327420802898472430345805178661836803666639323568991', '447399672436852483378639143310884430811985995203268293602758420538658689655094464027502179388320170070051455190673236504401910442217462
var a = ['\x62\x47\x39\x6e', '\x57\x57\x39\x31\x49\x47\x31\x31\x63\x33\x51\x67\x61\x32\x35\x76\x64\x79\x42\x30\x61\x47\x55\x67\x5a\x6d\x78\x68\x5a\x79\x42\x69\x65\x53\x42\x75\x62\x33\x63\x68', '\x59\x32\x78\x76\x63\x32\x55\x3d', '\x59\x6d\x6c\x6e\x62\x6e\x56\x74\x59\x6d\x56\x79\x4c\x6d\x70\x7a', '\x59\x32\x39\x75\x5a\x6d\x6c\x6e', '\x63\x6d\x56\x68\x5a\x47\x78\x70\x62\x6d\x55\x3d', '\x59\x33\x4a\x6c\x59\x58\x52\x6c\x53\x57\x35\x30\x5a\x58\x4a\x6d\x59\x57\x4e\x6c', '\x63\x33\x52\x6b\x61\x57\x34\x3d', '\x63\x33\x52\x6b\x62\x33\x56\x30', '\x4d\x6a\x67\x78\x4e\x44\x63\x33\x4d\x7a\x4d\x30\x4d\x54\x49\x78\x4d\x6a\x59\x30\x4d\x54\x59\x78\x4e\x44\x4d\x7a\x4e\x54\x59\x30\x4d\x7a\x45\x34\x4d\x44\x55\x35\x4d\x44\x67\x33\x4f\x44\x67\x34\x4e\x44\x67\x33\x4d\x44\x41\x79\x4d\x6a\x45\x78\x4d\x7a\x67\x33\x4d\x44\x51\x31\x4e\x44\x4d\x77\x4e\x44\x6b\x35\x4d\x54\x51\x79\x4e\x44\x41\x33\x4e\x54\x41\x79\x4d\x54\x41\x32\x4d\x7a\x51\x30\x4d\x6a\x4d\x33\x4e\x44\x59\x7a\x4d\x54\x41\x33\x4f\x54\x55\x35\x4f\x44\x4d\x33\x4e\x6a\x59\x77\x
target = [0x8, 0x8B, 0x0DE, 0x0BF, 0x9D, 0x0A9, 0x4, 0x12, 0x8B, 0x12, 0x12, 0x9A, 0x62, 0x0A9, 0x51, 0x47, 0x0EA, 0x0EA, 0x30, 0x8B, 0x26, 0x2, 0x4B, 0x77, 0x32, 0x74, 0x41, 0x7D, 0x4A, 0x7C, 0x4F, 0x0B, 0x4F, 0x7B, 0x5, 0x6C, 0x1B, 0x7D, 0x0B, 0x63, 0x14, 0x70]
part1 = target[len(target)// 2:][::-1]
part1_copy = part1[:]
part1[0] -= 3
for i in range(1, len(part1)):
part1[i] ^= part1_copy[i - 1]
part1[i] -= 3