- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- gerner1
- Luck Dragon: Asszociációs játék. :)
- norbx: IRC a 90-es évek és a 2000-es évek elején
- Depression: Hardver rúzs effektus?
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- koxx: Légpárna az egérpadon: ATK A9 Air gamer egér
- horzoli: Auchan házhozszállítás
- ldave: New Game Blitz - 2026
Új hozzászólás Aktív témák
-
Hege1234
addikt
Sziasztok!
hogyan tudnék kilépni ebből a loopból?
a firefox log fájljában kerestetek 10 token-t
a fájlok nem egyből kerülnek bele a mappába, hanem folyamatosan
és minden 100MB adat után csinál egy új fájlt
log.txt.moz_log.0
log.txt.moz_log.1
log.txt.moz_log.2így elképzelhető, hogy valamelyik token majd csak a 2. vagy 3. fájlban lesz megtalálható..
script:
import re
import time
import glob
log_file_pattern = ".\\firefox-log\\log.txt.moz_log.*"
tokens_to_find = 10
tokens_found = 0
processed_files = set()
while tokens_found < tokens_to_find:
log_files = glob.glob(log_file_pattern)
for file_path in log_files:
cutted_file_path = re.findall(r'\\([^\\]+)$', file_path)[0].strip()
if file_path not in processed_files:
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()
azukiapp = re.findall(r"E/nsHttp...AzukiApp:.(.*)", tdata)[0].strip()
azukiststoken = re.findall(r"E/nsHttp...AzukiSTSToken:.(.*)", tdata)[0].strip()
natcho = re.findall(r"E/nsHttp.uri=.*natco_key=(.*)&device_type=WEB&channel_number=", tdata)[0].strip()
Device_Id = re.findall(r"header=.Device-Id..value=.(.*)..merge=0]", tdata)[0].strip()
bff_token = re.findall(r"header=.bff_token..value=.(.*)..merge=0]", tdata)[0].strip()
sess_id = re.findall(r"https://.*wv_getlicense.*session_uid=(.*?)&", tdata)[0].strip()
acc_ount = re.findall(r"E/nsHttp.uri=.*user_token=(.*)&session", tdata)[0].strip()
try:
azudrm = re.findall(r'D/n.*?AzukiApp.*?[^.].*?[^.]\"AzukiDRM\" value=\"(.*?)\"', tdata)[0].strip()
except:
azudrm = re.findall(r"E/nsHttp...AzukiApp:..*.*[^?].*[^?.].*[^?.]E/nsHttp...AzukiDRM:.(.*)", tdata)[0].strip()
get_lic = re.findall(r"E/nsHttp uri=(.*wv_getlicense.*token.*)", tdata)[0].strip()
print(f"Token found in {cutted_file_path}: app_key: {app_key}\n")
print(f"Token found in {cutted_file_path}: azukiapp: {azukiapp}\n")
print(f"Token found in {cutted_file_path}: azukiststoken: {azukiststoken}\n")
print(f"Token found in {cutted_file_path}: natcho: {natcho}\n")
print(f"Token found in {cutted_file_path}: Device_Id: {Device_Id}\n")
print(f"Token found in {cutted_file_path}: bff_token: {bff_token}\n")
print(f"Token found in {cutted_file_path}: sess_id: {sess_id}\n")
print(f"Token found in {cutted_file_path}: acc_ount: {acc_ount}\n")
print(f"Token found in {cutted_file_path}: azudrm: {azudrm}\n")
print(f"Token found in {cutted_file_path}: get_lic: {get_lic}\n")
tokens_found += 1
processed_files.add(file_path)
except (IndexError, FileNotFoundError):
print(f"Token not found in {cutted_file_path}. Waiting for the next attempt.")
except Exception as e:
print(f"Error processing {cutted_file_path}: {e}")
time.sleep(2)
print(f"All tokens found! Press Enter to exit.")
stopsdf = input('\stop now!')még a loopban lévő print:
Token not found in log.txt.moz_log.0. Waiting for the next attempt.
Token not found in log.txt.moz_log.0. Waiting for the next attempt.
Token not found in log.txt.moz_log.0. Waiting for the next attempt.
Token found in log.txt.moz_log.0: app_key: ex****k
Token found in log.txt.moz_log.0: azukiapp: 3**
Token found in log.txt.moz_log.0: azukiststoken: AuthTok****
Token found in log.txt.moz_log.0: natcho: T****0P
Token found in log.txt.moz_log.0: Device_Id: 95d6****a4
Token found in log.txt.moz_log.0: bff_token: AuthTok****
Token found in log.txt.moz_log.0: sess_id: e4ab****f91
Token found in log.txt.moz_log.0: acc_ount: 100****001
Token found in log.txt.moz_log.0: azudrm: bd****C0=
Token found in log.txt.moz_log.0: get_lic: htt****lsemajd miután a log.txt.moz_log.0 betelt és létrejön a log.txt.moz_log.1 a mappában
elkezdi azt is csekkolni több száz sort nem teszek be róla, de az így néz ki:Token not found in log.txt.moz_log.1. Waiting for the next attempt.
.
.
Token not found in log.txt.moz_log.1. Waiting for the next attempt.
Token not found in log.txt.moz_log.1. Waiting for the next attempt.
.
.
Token not found in log.txt.moz_log.1. Waiting for the next attempt.
Token not found in log.txt.moz_log.2. Waiting for the next attempt.
Token not found in log.txt.moz_log.3. Waiting for the next attempt.
Token not found in log.txt.moz_log.1. Waiting for the next attempt.azt nem értem, hogy a loop-ból miért nem tud kilépni amikor a mostani helyzetben már az 1. fájlban megtalál minden token-t amit kerestetek és a print jelzi is..

lehet kellene valahova egy break és az, hogy megadom hogy 10 tokent találjon meg az nem elég a kilépéshez?
vagy más ok miatt mehet mégis a következő fájlra?
Új hozzászólás Aktív témák
- AKCIÓ! Huawei Watch 4 Pro eSIM okosóra garanciával hibátlan működéssel
- Azonnali készpénzes INTEL CPU NVIDIA VGA számítógép felvásárlás személyesen / postával korrekt áron
- GYÖNYÖRŰ iPhone 14 Plus 256GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS4526
- MSI 17 Pulse FHD IPS 144Hz i7-13700H 14mag 16GB 512GB SSD Nvidia RTX 4060 8GB 140W Win11 Garancia
- HP EliteBook 840 G7 i5-10210U 16GB 256GB FHD 400nit 1 év garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

