Skip to content

Commit

Permalink
Fix #401
Browse files Browse the repository at this point in the history
  • Loading branch information
L1ghtn1ng committed Aug 17, 2020
1 parent d9d3174 commit 7545d1f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
28 changes: 28 additions & 0 deletions bin/theHarvester
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python3

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

if python_version()[0:3] < '3.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:
import uvloop
uvloop.install()
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())
13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import setuptools
from setuptools import setup, find_packages
from theHarvester.lib.core import Core

with open('README.md', 'r') as fh:
long_description = fh.read()

setuptools.setup(
setup(
name='theHarvester',
version=Core.version(),
author="Christian Martorella",
Expand All @@ -13,12 +13,9 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/laramies/theHarvester",
packages=setuptools.find_packages(exclude=['tests']),
entry_points={
'console_scripts': [
'theHarvester = theHarvester.__main__:entry_point'
]
},
packages=find_packages(exclude=['tests']),
python_requires='>=3.7',
scripts=['bin/theHarvester'],

classifiers=[
"Programming Language :: Python :: 3",
Expand Down
2 changes: 1 addition & 1 deletion theHarvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from platform import python_version
import sys
import asyncio
from theHarvester import __main__

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

from theHarvester import __main__

if __name__ == '__main__':
platform = sys.platform
Expand Down
2 changes: 1 addition & 1 deletion theHarvester/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class Core:
@staticmethod
def version() -> str:
return '3.2.0dev4'
return '3.2.0dev5'

@staticmethod
def bing_key() -> str:
Expand Down

0 comments on commit 7545d1f

Please sign in to comment.