From 4e8484fc3a057722cdb4729694454cd9579bef94 Mon Sep 17 00:00:00 2001 From: Tib3rius <48113936+Tib3rius@users.noreply.github.com> Date: Sun, 15 Aug 2021 16:33:55 -0400 Subject: [PATCH] Update autorecon.py Fixed bug where inspect.signature() returned different values depending on python version. Using inspect.getfullargspec() instead. --- autorecon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autorecon.py b/autorecon.py index 0bec848..aea1534 100644 --- a/autorecon.py +++ b/autorecon.py @@ -470,11 +470,11 @@ class AutoRecon(object): if member_name == 'configure': configure_function_found = True elif member_name == 'run' and inspect.iscoroutinefunction(member_value): - if len(inspect.signature(member_value).parameters) != 2: + if len(inspect.getfullargspec(member_value).args) != 2: fail('Error: the "run" coroutine in the plugin "' + plugin.name + '" should have two arguments.', file=sys.stderr) run_coroutine_found = True elif member_name == 'manual': - if len(inspect.signature(member_value).parameters) != 3: + if len(inspect.getfullargspec(member_value).args) != 3: fail('Error: the "manual" function in the plugin "' + plugin.name + '" should have three arguments.', file=sys.stderr) manual_function_found = True