2021-12-02 03:52:26 +08:00
|
|
|
#!/usr/bin/env python3
|
2019-03-24 16:07:45 +08:00
|
|
|
# Note: This script runs theHarvester
|
2019-07-03 18:44:22 +08:00
|
|
|
import sys
|
2019-12-21 11:12:55 +08:00
|
|
|
import asyncio
|
2020-08-18 07:08:07 +08:00
|
|
|
from theHarvester import __main__
|
2019-12-21 11:12:55 +08:00
|
|
|
|
2021-11-22 17:26:49 +08:00
|
|
|
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)
|
|
|
|
|
2020-06-29 12:11:55 +08:00
|
|
|
if __name__ == '__main__':
|
|
|
|
platform = sys.platform
|
|
|
|
if platform == 'win32':
|
|
|
|
# Required or things will break if trying to take screenshots
|
|
|
|
import multiprocessing
|
2021-11-22 17:26:49 +08:00
|
|
|
|
2020-06-29 12:11:55 +08:00
|
|
|
multiprocessing.freeze_support()
|
|
|
|
asyncio.DefaultEventLoopPolicy = asyncio.WindowsSelectorEventLoopPolicy
|
|
|
|
else:
|
2021-10-18 08:16:29 +08:00
|
|
|
import uvloop
|
|
|
|
uvloop.install()
|
2020-12-16 06:09:18 +08:00
|
|
|
|
2020-07-05 03:38:11 +08:00
|
|
|
if "linux" in platform:
|
2020-07-01 06:47:06 +08:00
|
|
|
import aiomultiprocess
|
2021-11-22 17:26:49 +08:00
|
|
|
|
2020-07-01 06:47:06 +08:00
|
|
|
# As we are not using Windows we can change the spawn method to fork for greater performance
|
|
|
|
aiomultiprocess.set_context("fork")
|
2020-06-29 12:11:55 +08:00
|
|
|
asyncio.run(__main__.entry_point())
|