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.
Files changed (2) hide show
  1. package/index.js +10 -5
  2. 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
- // 🚀 THE FIX: Force default values if the user leaves them empty
6
- const safeConfig = {
5
+ super({
7
6
  region: config.region || 'en',
8
7
  childMode: config.childMode || false
9
- };
10
- super(safeConfig);
11
- console.log("🧞 SILENT TECH AKINATOR ENGINE: LOADED");
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silent-akinator-pro",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Silent Tech Premium Akinator API. High-speed and professional.",
5
5
  "main": "index.js",
6
6
  "keywords": [