update
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ from flask import Flask, Response, request
|
|
| 7 |
from threading import Thread
|
| 8 |
from collections import deque
|
| 9 |
import json
|
| 10 |
-
import
|
| 11 |
|
| 12 |
BASE = "http://159.69.3.189"
|
| 13 |
LOGIN_URL = f"{BASE}/login"
|
|
@@ -15,17 +15,18 @@ GET_RANGE_URL = f"{BASE}/portal/sms/received/getsms"
|
|
| 15 |
GET_NUMBER_URL = f"{BASE}/portal/sms/received/getsms/number"
|
| 16 |
GET_SMS_URL = f"{BASE}/portal/sms/received/getsms/number/sms"
|
| 17 |
|
| 18 |
-
USERNAME =
|
| 19 |
-
PASSWORD =
|
| 20 |
-
BOT_TOKEN =
|
| 21 |
-
CHAT_ID =
|
| 22 |
-
CUSTOM_DOMAIN = os.getenv("CUSTOM_DOMAIN", "https://fourstore-tele.hf.space")
|
| 23 |
|
| 24 |
session = httpx.Client(follow_redirects=True, timeout=30.0)
|
| 25 |
sent_cache = set()
|
| 26 |
csrf_token = None
|
| 27 |
LOGIN_SUCCESS = False
|
| 28 |
|
|
|
|
|
|
|
| 29 |
sms_cache = {}
|
| 30 |
sms_counter = {}
|
| 31 |
range_counter = {}
|
|
@@ -39,6 +40,10 @@ def get_search_date():
|
|
| 39 |
wib = get_wib_time()
|
| 40 |
return (wib - timedelta(days=1)).strftime("%Y-%m-%d") if wib.hour < 7 else wib.strftime("%Y-%m-%d")
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
def login():
|
| 43 |
global csrf_token, LOGIN_SUCCESS
|
| 44 |
try:
|
|
@@ -819,7 +824,7 @@ def stream():
|
|
| 819 |
|
| 820 |
from queue import Queue
|
| 821 |
def run_server():
|
| 822 |
-
app.run(host='0.0.0.0', port=
|
| 823 |
|
| 824 |
Thread(target=run_server, daemon=True).start()
|
| 825 |
|
|
|
|
| 7 |
from threading import Thread
|
| 8 |
from collections import deque
|
| 9 |
import json
|
| 10 |
+
import socket
|
| 11 |
|
| 12 |
BASE = "http://159.69.3.189"
|
| 13 |
LOGIN_URL = f"{BASE}/login"
|
|
|
|
| 15 |
GET_NUMBER_URL = f"{BASE}/portal/sms/received/getsms/number"
|
| 16 |
GET_SMS_URL = f"{BASE}/portal/sms/received/getsms/number/sms"
|
| 17 |
|
| 18 |
+
USERNAME = "rezaciledug35@gmail.com"
|
| 19 |
+
PASSWORD = "Ciledug577"
|
| 20 |
+
BOT_TOKEN = "8458437657:AAGtvRh5dBdLIhONXN3rH1heDrgCSW-jyHQ"
|
| 21 |
+
CHAT_ID = "-1003328735276"
|
|
|
|
| 22 |
|
| 23 |
session = httpx.Client(follow_redirects=True, timeout=30.0)
|
| 24 |
sent_cache = set()
|
| 25 |
csrf_token = None
|
| 26 |
LOGIN_SUCCESS = False
|
| 27 |
|
| 28 |
+
CUSTOM_DOMAIN = "https://fourstore-tele.hf.space"
|
| 29 |
+
|
| 30 |
sms_cache = {}
|
| 31 |
sms_counter = {}
|
| 32 |
range_counter = {}
|
|
|
|
| 40 |
wib = get_wib_time()
|
| 41 |
return (wib - timedelta(days=1)).strftime("%Y-%m-%d") if wib.hour < 7 else wib.strftime("%Y-%m-%d")
|
| 42 |
|
| 43 |
+
def log(msg):
|
| 44 |
+
timestamp = datetime.now().strftime("%H:%M:%S")
|
| 45 |
+
print(f"[{timestamp}] {msg}")
|
| 46 |
+
|
| 47 |
def login():
|
| 48 |
global csrf_token, LOGIN_SUCCESS
|
| 49 |
try:
|
|
|
|
| 824 |
|
| 825 |
from queue import Queue
|
| 826 |
def run_server():
|
| 827 |
+
app.run(host='0.0.0.0', port=8080, debug=False, threaded=True)
|
| 828 |
|
| 829 |
Thread(target=run_server, daemon=True).start()
|
| 830 |
|