Skip to content

Commit

Permalink
Merge pull request #213 from 13ph03nix/master
Browse files Browse the repository at this point in the history
fix(): finding a python module version gives error
  • Loading branch information
13ph03nix authored Aug 30, 2021
2 parents 3018943 + c360ef3 commit d5512d1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,9 @@ Cross-platform shell code generation

# version 1.8.1
-----------------
* fix check_requires() can not handle dependent version correctly # 208
* fix check_requires() can not handle dependent version correctly #208
* update docs

# version 1.8.2
-----------------
* fix finding a python module version gives error
2 changes: 1 addition & 1 deletion manpages/poc-console.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ is maintained at:
.I https://github.com/knownsec/pocsuite3/blob/master/docs/USAGE.md
.PP
.SH VERSION
This manual page documents pocsuite version 1.8.1
This manual page documents pocsuite version 1.8.2
.SH AUTHOR
.br
(c) 2014-2021 by Knownsec 404 Team
Expand Down
2 changes: 1 addition & 1 deletion manpages/pocsuite.1
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ is maintained at:
.I https://github.com/knownsec/pocsuite3/blob/master/docs/USAGE.md
.PP
.SH VERSION
This manual page documents pocsuite version 1.8.1
This manual page documents pocsuite version 1.8.2
.SH AUTHOR
.br
(c) 2014-2021 by Knownsec 404 Team
Expand Down
2 changes: 1 addition & 1 deletion pocsuite3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'pocsuite'
__version__ = '1.8.1'
__version__ = '1.8.2'
__author__ = 'Knownsec Security Team'
__author_email__ = '[email protected]'
__license__ = 'GPL 2.0'
Expand Down
6 changes: 4 additions & 2 deletions pocsuite3/lib/core/register.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import pkg_resources
import importlib.machinery
import importlib.util
from importlib.abc import Loader
Expand Down Expand Up @@ -54,8 +55,9 @@ def check_requires(data):
install_name = t[0]
if not import_name:
import_name = install_name
m = __import__(import_name)
logger.info(f'{install_name}=={m.__version__} has been installed')
__import__(import_name)
ver = pkg_resources.get_distribution(import_name).version
logger.info(f'{install_name}=={ver} has been installed')
except ImportError:
err_msg = f'{install_name} not found, try install with "python -m pip install {install_name}"'
logger.error(err_msg)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def find_packages(where='.'):

setup(
name='pocsuite3',
version='1.8.1',
version='1.8.2',
url='http://pocsuite.org',
description='Pocsuite is an open-sourced remote vulnerability testing framework developed by the Knownsec Security Team.',
long_description="""\
Expand Down

0 comments on commit d5512d1

Please sign in to comment.