Commit 3c431578 authored by nextime's avatar nextime

Correct file names

parent 528fffee
Pipeline #162 canceled with stages
import asyncio
from playwright.async_api import async_playwright
import argparse
import os
from datetime import datetime
async def monitor_streamate(log_path):
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp("http://localhost:9222")
while True:
contexts = browser.contexts
for context in contexts:
for page in context.pages:
if "performerclient.streamatemodels.com" in page.url:
print(f"Found Streamate tab")
await monitor_requests(page, log_path)
await asyncio.sleep(5) # Check every 5 seconds
async def monitor_requests(page, log_path):
async def log_request(request):
if request.resource_type not in ['document', 'image', 'font', 'stylesheet']:
log_entry = f"[{datetime.now()}] Request: {request.method} {request.url}\n"
with open(log_path, 'a') as f:
f.write(log_entry)
async def log_response(response):
#print(await response.body())
#print(response.request.resource_type)
#if response.request.resource_type not in ['document', 'image', 'font', 'stylesheet']:
if response.request.resource_type in ['xhr'] and not response.url.endswith(".mp3"):
log_entry = f"[{datetime.now()}] Response: {response.status} {response.url} -> BODY: "
log_body = await response.body()
with open(log_path, 'a') as f:
f.write(log_entry)
print(log_body)
f.write(str(log_body))
f.write("\n\n")
page.on("request", log_request)
page.on("response", log_response)
while True:
await asyncio.sleep(1)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Monitor Streamate requests")
parser.add_argument("--log_path", type=str, default="streamate_requests.log",
help="Path to the log file")
args = parser.parse_args()
log_dir = os.path.dirname(args.log_path)
if log_dir and not os.path.exists(log_dir):
os.makedirs(log_dir)
asyncio.run(monitor_streamate(args.log_path))
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define MyAppVersion "0.1" #define MyAppVersion "0.1"
#define MyAppPublisher "SexHackMe" #define MyAppPublisher "SexHackMe"
#define MyAppURL "https://www.sexhack.me" #define MyAppURL "https://www.sexhack.me"
#define MyAppExeName "streamon.exe" #define MyAppExeName "streammon.exe"
#define MyAppAssocName MyAppName + "" #define MyAppAssocName MyAppName + ""
#define MyAppAssocExt ".exe" #define MyAppAssocExt ".exe"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt #define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
...@@ -34,7 +34,7 @@ ChangesAssociations=yes ...@@ -34,7 +34,7 @@ ChangesAssociations=yes
DefaultGroupName={#MyAppName} DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.) ; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest ;PrivilegesRequired=lowest
OutputBaseFilename=streamon OutputBaseFilename=streammon
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
WizardStyle=modern WizardStyle=modern
...@@ -46,8 +46,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl" ...@@ -46,8 +46,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files] [Files]
Source: "C:\Users\User\Desktop\streammon\dist\streamon\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "C:\Users\User\Desktop\streammon\dist\streammon\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\User\Desktop\streammon\dist\streamon\_internal\*"; DestDir: "{app}\_internal"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "C:\Users\User\Desktop\streammon\dist\streammon\_internal\*"; DestDir: "{app}\_internal"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment