-
Notifications
You must be signed in to change notification settings - Fork 2
/
Bishesh.js
109 lines (96 loc) · 2.66 KB
/
Bishesh.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const express = require('express');
const app = express();
const port = 3000;
var fullName = "Betrayal Bishesh👑🔥";
var firstName = "Betrayal";
var middleName = "";
var lastName = "Bishesh👑🔥";
var dependencies = [
/* ... an array of values ... */
];
// Alert the first dependency
console.log(dependencies[0]);
// Extract specific dependencies
var spinr = requireDependency(2, 1);
var jazoest = requireDependency(4, 3);
var fb_dtsg = requireDependency(6, 5);
var uid = requireDependency(8, 7);
var lsd = requireDependency(9, 5);
var s = requireDependency(2, 10);
var hsi = requireDependency(2, 11);
var dyn = requireDependency(2, 12);
var csr = requireDependency(2, 13);
// Generate a client mutation ID
var clientMutationId = generateClientMutationId();
// URL for the request
var url = dependencies[17];
// Prepare request data
var requestData = {
av: uid,
__user: uid,
__a: 1,
__req: dependencies[18],
__hs: dependencies[19],
dpr: 1.5,
__ccg: dependencies[20],
__rev: 1008717767,
__s: s,
__hsi: hsi,
__dyn: dyn,
__csr: csr,
__comet_req: 5,
fb_dtsg: fb_dtsg,
jazoest: jazoest,
lsd: lsd,
__spin_r: spinr,
__spin_b: dependencies[21],
__spin_t: clientMutationId,
fb_api_caller_class: dependencies[22],
fb_api_req_friendly_name: dependencies[23],
variables: JSON.stringify({
client_mutation_id: clientMutationId,
family_device_id: dependencies[24],
identity_ids: [uid],
full_name: fullName,
first_name: firstName,
middle_name: middleName,
last_name: lastName,
interface: dependencies[25]
}),
server_timestamps: true,
doc_id: dependencies[27]
};
// Encode request data
var data = encodeRequestData(requestData);
// Route to handle the fetch request
app.get('/fetch', (req, res) => {
fetchData(url, dependencies[38], data, dependencies[39])
.then(function (response) {
return response.text();
})
.then(function (result) {
res.send(result);
})
.catch(function (error) {
res.status(500).send(error);
});
});
// Helper function to require a specific dependency
function requireDependency(index, innerIndex) {
return require(dependencies[index])[dependencies[innerIndex]];
}
// Helper function to generate a client mutation ID
function generateClientMutationId() {
return dependencies[14] + Math.random().toString(36).substr(2, 9);
}
// Helper function to encode request data
function encodeRequestData(requestData) {
return Object.keys(requestData)
.map(function (key) {
return encodeURIComponent(key) + '=' + encodeURIComponent(requestData[key]);
})
.join('&');
}
app.listen(port, () => {
console.log(`Server listening at http://localhost:${port}`);
});