Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent console from closing when running as an frozen executable on windows #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions log4j-finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def main():
print(f"[{now}] {hostname} Finished scan, elapsed time: {elapsed:.2f} seconds")
print_summary(stats)
print(f"\nElapsed time: {elapsed:.2f} seconds")
# If script is running as an frozen executable on Windows, prevent the console from closing.
if sys.platform == "win32" and getattr(sys, 'frozen', False):
os.system("pause")


if __name__ == "__main__":
Expand Down