⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
erol
/
Edit File: posac.py
import subprocess import time import pymysql def kontrol(symbol): script_path = "checksymbol.py" process_name = f"python3.11 {script_path} -symbol {symbol}" process_exists = subprocess.run(["pgrep", "-f", process_name], capture_output=True, text=True).returncode == 0 if not process_exists: try: subprocess.Popen(["python3.11", script_path, "-symbol", symbol]) time.sleep(1) except subprocess.CalledProcessError as e: print(f"Hata: {e}") try: baglanti = pymysql.connect( host='127.0.0.1', db='newcoin', user='root', password='Ua04420076*', port=3306, charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor ) with baglanti.cursor() as islem: try: islem.execute("select * from symbols where isActive=1") ayar_liste=islem.fetchall() for value in ayar_liste: if value['isActive']==1: kontrol(value['symbol']) except Exception as e: print(f"Bilinmeyen bir hata oluştu: {e}") time.sleep(1) except KeyboardInterrupt: print("Ctrl+C'ye basıldı, program kapatılmayacak.") while True: pass finally: if 'baglanti' in locals(): baglanti.close()
Simpan