silent-akinator-pro 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,13 +2,18 @@ const { Akinator: BaseAki, AkinatorAnswer } = require("@aqul/akinator-api");
|
|
|
2
2
|
|
|
3
3
|
class Akinator extends BaseAki {
|
|
4
4
|
constructor(config = {}) {
|
|
5
|
-
|
|
6
|
-
const safeConfig = {
|
|
5
|
+
super({
|
|
7
6
|
region: config.region || 'en',
|
|
8
7
|
childMode: config.childMode || false
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// 🚀 THE MOBILE APP SPOOF: Overwriting headers to bypass Cloudflare
|
|
11
|
+
this.client.defaults.headers.common['User-Agent'] = 'Akinator/1.2.3 (Android; 13; Scale/2.0)';
|
|
12
|
+
this.client.defaults.headers.common['Referer'] = 'https://en.akinator.com/';
|
|
13
|
+
this.client.defaults.headers.common['X-Requested-With'] = 'com.digidust.akinator.freemium';
|
|
14
|
+
this.client.defaults.headers.common['Accept'] = 'application/json';
|
|
15
|
+
|
|
16
|
+
console.log("🧞 SILENT TECH: Android Handshake Initialized");
|
|
12
17
|
}
|
|
13
18
|
}
|
|
14
19
|
|