Új hozzászólás Aktív témák
-
Hege1234
addikt
axioma, atty_hor köszönöm az ötleteket!

így most már szépen ki tud lépni, de lehet csak azért mert így még csak 1 fájlban keres
tesztelem olyan adattal ami csak a 2. vagy 3. fájlban lehetne, ott már lehet majd el fog vérezni megint..(csak, hogy itt az oldalon jobban átlátható legyen ezért most csak az app_key-t tettem bele a többit kiszedtem..)
import re
import time
import glob
log_file_pattern = ".\\drmfiles\\programok\\firefox-log\\log.txt.moz_log.*"
tokens_to_find = 10
found_tokens = set()
while len(found_tokens) < tokens_to_find:
log_files = glob.glob(log_file_pattern)
found_all_tokens = True
for file_path in log_files:
cutted_file_path = re.findall(r'\\([^\\]+)$', file_path)[0].strip()
if file_path in found_tokens:
continue
try:
with open(file_path, 'r') as file:
tdata = file.read()
app_key = re.findall(r"header=.app_key..value=.(.*)..merge=0]", tdata)[0].strip()
print(f"Token found in {cutted_file_path}: app_key: {app_key}\n")
found_tokens.add(file_path)
except (IndexError, FileNotFoundError):
print(f"Token not found in {file_path}. Waiting for the next attempt.")
found_all_tokens = False
except Exception as e:
print(f"Error processing {file_path}: {e}")
found_all_tokens = False
if found_all_tokens:
break
time.sleep(2)
Új hozzászólás Aktív témák
- Legion 5 15ARH7 15.6" FHD IPS Ryzen 5 6600H RTX 3050Ti 16GB 512GB NVMe magyar vbill gar
- AKCIÓ ÚJ Bontatlan Macbook Pro 16 M4 MAX 14CPU 32GPU 36GB 1TB Magyar billentyű Azonnal átvehető Deák
- AKCIÓS ! MacBook Pro 16" M1 Pro 16GB RAM 512GB SSD! 1 év garancia!
- EVGA RTX 3080 10GB GDDR6X FTW3 ULTRTA GAMING Eladó!
- Dell Latitude 5490 14",FHD,i5-8350U,8GB,256GB SSD,WIN11
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

