mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-21 16:45:05 +00:00
Added dynamic imports for all modules inside: 'events/', 'discovery/', 'hunting/' (you can now add new files with new implementations, and not worry about imports.) Changed port timeout to be 1.5 seconds, more reliable results. Changed default log level to INFO
7 lines
299 B
Python
7 lines
299 B
Python
from os.path import dirname, basename, isfile
|
|
import glob
|
|
|
|
# dynamically importing all modules in folder
|
|
files = glob.glob(dirname(__file__)+"/*.py")
|
|
for module_name in (basename(f)[:-3] for f in files if isfile(f) and not f.endswith('__init__.py')):
|
|
exec('from {} import *'.format(module_name)) |