Ú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
- Kingston 16GB DDR5 5600MHz CL46 - Új, bontatlan, több darab - Eladó!
- Corsair VENGEANCE RGB 2x16GB DDR5 6400MHz CL32 - Új, bontatlan - Eladó!
- Corsair VENGEANCE RGB 2x16GB DDR5 6200MHz CL36 - Új, bontatlan - Eladó!
- Corsair VENGEANCE RGB 2x16GB DDR5 6000MHz CL36 - Új, bontatlan - Eladó!
- Chieftec proton 750w full moduláris
- ÚJ AKKU! Ár/ÉRTÉK BAJNOK! Dell Latitude 5330 i3-1215U 6mag! 16GB 512GB 13.3" FHD 1 év gar
- Azonnali készpénzes AMD Radeon RX 9000 sorozat videokártya felvásárlás személyesen/csomagküldéssel
- HIBÁTLAN iPhone 13 128GB Green-1 ÉV GARANCIA - Kártyafüggetlen, MS4347
- Lenovo ThinkPad P14s Gen 2 i7-1165G7 32 GB Ram 512 GB SSD 1 év garancia
- DDR4 Szerver RAM felvásárlás - napi árak, elsősorban nagy mennyiségben
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


