File size: 4,419 Bytes
0d888dd
 
 
 
 
 
 
 
b84882d
 
0d888dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ef9801
da4adac
8ef9801
 
508e1c6
8ef9801
 
0d888dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0c29801
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0d888dd
 
 
 
8ef9801
 
 
 
 
2273193
8ef9801
 
 
2273193
 
 
 
 
8ef9801
 
 
19116e5
0d888dd
12dc516
 
 
0d888dd
de5b5bb
0d888dd
 
 
 
53386d3
0d888dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
from flask import Flask, jsonify

from flask_cors import CORS

import subprocess

import IP2Location

import requests













app = Flask(__name__)

CORS(app)  # Enable CORS for all routes


# βœ… Define the latest app version
LATEST_VERSION = "35.0.0"

# βœ… Store the latest APK download link
APK_DOWNLOAD_URL = "https://fastupload.io/df76f82413b02669"





@app.route('/')

def home():

    return ""



# Define ECPM values for different countries based on timezones

ECPM_VALUES = {

    "America/New_York": 60,    # USA (Eastern)

    "America/Chicago": 58,     # USA (Central)

    "America/Denver": 55,      # USA (Mountain)

    "America/Los_Angeles": 52, # USA (Pacific)

    "Europe/London": 70,       # UK

    "Europe/Paris": 65,        # France

    "Europe/Berlin": 67,       # Germany

    "Europe/Zurich": 66,       # Switzerland

    "Europe/Copenhagen": 64,   # Denmark

    "Europe/Madrid": 63,       # Spain

    "Europe/Rome": 62,         # Italy

    "Europe/Stockholm": 68,    # Sweden

    "Europe/Oslo": 69,         # Norway

    "America/Sao_Paulo": 45,   # Brazil

    "Australia/Sydney": 75,    # Australia

    "Europe/Chisinau": 55,     # Moldova

    "Europe/Amsterdam": 66,    # Netherlands

    "Europe/Lisbon": 61,       # Portugal

    "Europe/Brussels": 64,     # Belgium

    "Pacific/Auckland": 80     # New Zealand

}



@app.route('/get_ecpm_player', methods=['GET'])

def get_ecpm():

    # Get timezone from request

    user_timezone = request.args.get('timezone', 'Unknown')



    # Get corresponding ECPM value

    ecpm_value = ECPM_VALUES.get(user_timezone, 50)  # Default to 50 if not found



    return jsonify({"ecpm": ecpm_value, "timezone": user_timezone})



@app.route('/get-ip', methods=['GET'])
def get_ip():
    try:
        # Use ipify API to get the public IP
        response = requests.get("https://api64.ipify.org?format=json")
        data = response.json()
        user_ip = data.get("ip", "Unknown")

        # Use ipwhois.app to get IP details
        details_response = requests.get(f"https://ipwhois.app/json/{user_ip}")
        details = details_response.json()

        return jsonify({
            "ip": user_ip,
            "type": "IPv6" if ":" in user_ip else "IPv4",
            "country": details.get("country", "Unknown"),
            "isp": details.get("isp", "Unknown"),
            "proxy": details.get("proxy", False)  # Detect if IP is a proxy
        })

    except Exception as e:
        return jsonify({"error": str(e)}), 500




@app.route('/check_update', methods=['GET'])
def check_update():
    installed_version = request.args.get("current_version", "0")
    update_available = installed_version < LATEST_VERSION

    response = jsonify({
        "latest_version": LATEST_VERSION,
        "update_available": update_available
    })
    response.headers["Content-Type"] = "application/json"  # βœ… Ensure JSON response
    return response




@app.route('/get_apk_link', methods=['GET'])
def get_apk_link():
    return jsonify({"apk_url": APK_DOWNLOAD_URL})  # βœ… Return latest APK link

@app.route('/get_webpage', methods=['GET'])
def get_webpage():
    return jsonify({"url": "https://upload-apk.com"})  # βœ… Replace with your actual webpage URL


@app.route('/get_latest_version', methods=['GET'])

def get_latest_version():

    latest_version = "34"  # Use snake_case for internal Python variables

    return jsonify({'latestVersion': latest_version})  # Use camelCase in JSON response



@app.route('/get_latest_version2', methods=['GET'])

def get_latest_version2():

    latest_version = "7.0"  # Use snake_case for internal Python variables

    return jsonify({'latestVersion': latest_version})  # Use camelCase in JSON response





# API endpoint returning hardcoded features

@app.route('/api/features')

def get_features():

    features = [

       # {"name": "πŸš€ Fast", "description": "Quick response time with optimized performance."} 

        

       

    ]

    return jsonify(features)



# API endpoint returning hardcoded features

@app.route('/api/features2')

def get_features2():

    features = [

     #  {"name": "πŸš€ Fast", "description": "Quick response time with optimized performance."} 

         

       

    ]

    return jsonify(features)





if __name__ == '__main__':

    subprocess.Popen(["python", "wk.py"])  # Start awake.py



    app.run(host='0.0.0.0', port=7860)