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

Fix bug from stopping theHarvester.py from running and update the bin… #938

Merged
merged 1 commit into from
Dec 1, 2021
Merged
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
7 changes: 6 additions & 1 deletion bin/theHarvester
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env python3

# Note: This script runs theHarvester
import sys
import asyncio
from theHarvester import __main__

if sys.version_info.major < 3 or sys.version_info.minor < 7:
print('\033[93m[!] Make sure you have Python 3.7+ installed, quitting.\n\n \033[0m')
sys.exit(1)

if __name__ == '__main__':
platform = sys.platform
if platform == 'win32':
# Required or things will break if trying to take screenshots
import multiprocessing

multiprocessing.freeze_support()
asyncio.DefaultEventLoopPolicy = asyncio.WindowsSelectorEventLoopPolicy
else:
Expand All @@ -18,6 +22,7 @@ if __name__ == '__main__':

if "linux" in platform:
import aiomultiprocess

# As we are not using Windows we can change the spawn method to fork for greater performance
aiomultiprocess.set_context("fork")
asyncio.run(__main__.entry_point())
5 changes: 1 addition & 4 deletions theHarvester.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Note: This script runs theHarvester
# from platform import python_version
import sys
import asyncio
from theHarvester import __main__
Expand All @@ -17,10 +17,7 @@
multiprocessing.freeze_support()
asyncio.DefaultEventLoopPolicy = asyncio.WindowsSelectorEventLoopPolicy
else:
# with uvloop 0.16.0 support for python3.10 has been added
# https://github.com/MagicStack/uvloop/releases/tag/v0.16.0
import uvloop

uvloop.install()

if "linux" in platform:
Expand Down