-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.ts
16 lines (14 loc) · 5.41 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This is a buffer payload, try decrypting it
/**
check encoded_sample.payload in consts
*/
import { decodeData } from "./wam/index.js";
import { read, readFileSync, writeFileSync } from "fs";
import { WAM_EVENTS, WAM_GLOBALS } from "./wam/utils.js";
const buf = Buffer.from(
"V0FNBQGVAwAwCwiADQZNYWMgT1OAEREyLjMwMDAuMTAxMjAyNDM4MSAVUC8f7/FliCcBEENocm9tZSAxMjIuMC4wLjAYeQKICwMGQ2hyb21lKIMDOHkGBBhpDYiPDgl4MjU1NzY5MjeImREHMTAuMTUuNyhrGDirOAQ4wwICGO0zCGsDOagG/xIBEgISAxIEEgUSBhIHEggSCRIKEgsSDBINEg4SDxIQEhESEhITEhQSFVAvH+/xZShpDTmUB/+CAQR3YXdjIgISA1AvH+/xZThpDQI5sBL/IgEiAlAvJe/xZThpDQM5TgX/ggEOaW5pdGlhbC1hc3NldHMSAhIEQgNoE1AvJe/xZThpDQQ54AX/UgHOA3cAYgIA8OfzigAAAFAvL+/xZThpDQU50A3/ggISMDA1RTRBRDgxNzEwMzU0MjA3IgtCA3E+MgECUC8w7/FlOGkNBjnQDf+CAhIwMDVFNEFEODE3MTAzNTQyMDciC0IDJEMyAQMSB1AvMe/xZThpDQc50A3/ggISMDA1RTRBRDgxNzEwMzU0MjA3IgtCA5RDMgEEEgcyBBRQLzHv8WU4aQ0IOQID/yIBUC8x7/FlOGkNCTlWB/8yAQYSAhIFEgMSBhIEEgdQLzHv8WU4aQ0KOSgM/xIGEgkSBxIFEgoyARQSGxIdEgJCC6xYIg1SDB2XAABSA9CbAABSBECcAAASDlAvMe/xZThpDQs57hD/UgVPlq0TUgSh6wMAMgMGMgIIUC8x7/FlOGkNDDloBf+CAQVlMno3ZVIC+O7xZTIFElIDQ4ABACIGMgcGUC8x7/FlOGkNDTnsEP9SB0+WrRMyAhJS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ggEyL3JzcmMucGhwL3YzL3lUL3IvQkNFUE1WZ3JER2MuanM/X25jX3g9SWozV3A4bGc1S3pCAukREgNQLzHv8WU4aQ0pObAC/4IBRy9yc3JjLnBocC92M2k2OGE0L3lWL2wvbWFrZWhhc3RlX2poYXNoL0V1TDBERWJoN1VNLmpzP19uY194PUlqM1dwOGxnNUt6QgIoEhIDUC8x7/FlOGkNKjmwAv+CAUcvcnNyYy5waHAvdjNpUFM0NC95eS9sL21ha2VoYXN0ZV9qaGFzaC90WHRCN016RjBiTC5qcz9fbmNfeD1JajNXcDhsZzVLekIC5BgSA1AvMe/xZThpDSs5sAL/ggE7L3JzcmMucGhwL3YzL3l1L2wvMCxjcm9zcy9uRGJUa3FsdkdQUC5jc3M/X25jX3g9SWozV3A4bGc1S3pCAl8DEgNQLzHv8WU4aQ0sObAC/4IBMi9yc3JjLnBocC92My95Si9yL3p0VWdhZ3VwRGxPLmpzP19uY194PUlqM1dwOGxnNUt6QgKNExIDUC8x7/FlOGkNLTmwAv+CASEvcnNyYy5waHAvdjMveVAvci9yWVpxUENCYUc3MC5wbmdCAicBEgNQLzHv8WU4aQ0uObAC/4IBjy9zdGF0aWNfcmVzb3VyY2VzL3dlYndvcmtlcl92MS9pbml0X3NjcmlwdC8/X19ocz0xOTc5NS5IWVAlM0F3aGF0c2FwcF9jb21ldF9wa2cuMi4xLi4wLjEmX19zcGluX3I9MTAxMjAyNDM4MSZfX3NwaW5fYj10cnVuayZfX3NwaW5fdD0xNzEwMzU0MTkxQgIKARIDUC8x7/FlOGkNLzmwAv+CAUcvcnNyYy5waHAvdjNpVHZ5NC95SS9sL21ha2VoYXN0ZV9qaGFzaC94NjhaRFpMSlFLMi5qcz9fbmNfeD1JajNXcDhsZzVLekICxw8SA1AvMe/xZThpDTA57hD/UgVPlq0TUgSViQQAMgMIMgIGUC857/FlOGkNMTnuEP9SBU+WrRNSBLSoBAAyAwYyAgg=",
"base64"
);
writeFileSync("./test.payload", buf);
const { header, data } = decodeData(buf);
console.log(header, data);