Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ Make sure the DLL file is built and available in either of these paths:
Launch the target application (e.g., LockDownBrowser.exe).

Run the injector:
`python inject.py`
```
python inject.py
```

The script:

Expand Down
7 changes: 5 additions & 2 deletions inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if not os.path.exists(dll_file):
dll_file = os.path.join(os.getcwd(), "DLLHooks/Release/DLLHooks.dll")
if not os.path.exists(dll_file):
raise FileNotFoundError("DLLHooks.dll not found in expected directories.")
print("Warning: DLLHooks.dll not found in expected directories. Continuing without a DLL (injection will be skipped).")

monitored_process = "LockDownBrowser"

Expand All @@ -34,7 +34,10 @@
print(f"Target detected: {task_name} (PID: {pid})")
try:
agent.attach_to_pid(pid)
agent.inject_shared_library(dll_file)
if os.path.exists(dll_file):
agent.inject_shared_library(dll_file)
else:
print("DLL file not present; skipping injection step.")
agent.cleanup()
found = True
break
Expand Down