check_rep icon indicating copy to clipboard operation
check_rep copied to clipboard

Syntax error in utils.py

Open fatmeat opened this issue 3 years ago • 5 comments

Describe the bug Syntax error in utils.py

Screenshots PS D:\Github\check_rep> python .\check_rep.py -q x.x.x.x Traceback (most recent call last): File ".\check_rep.py", line 12, in from core.geomap import map_free_geo, multi_map File "D:\Github\check_rep\core\geomap.py", line 10, in from core.utils import DOMAIN, IP, Helpers, Workers, logger File "D:\Github\check_rep\core\utils.py", line 192 if match := re.findall(self.query, req.text): ^ SyntaxError: invalid syntax

Desktop (please complete the following information): OS: Windows

fatmeat avatar Jun 21 '22 14:06 fatmeat

What version of Python are you using? Thanks!

dfirsec avatar Jun 23 '22 19:06 dfirsec

I came across the same issue on Centos 7 with Python3 :-

Traceback (most recent call last): File "check_rep.py", line 12, in <module> from core.geomap import map_free_geo, multi_map File "/root/check_rep/core/geomap.py", line 11, in <module> from core.utils import DOMAIN, IP, Helpers, Workers, logger File "/root/check_rep/core/utils.py", line 191 if match := re.findall(self.query, req.text): ^ SyntaxError: invalid #syntax

AkhilNagaaroor avatar Jun 28 '22 12:06 AkhilNagaaroor

I've corrected the code and replaced the named expression (Python 3.8 feature.)

dfirsec avatar Jun 29 '22 05:06 dfirsec

Thanks. That error was fixed but I'm getting another error :-

Traceback (most recent call last): File "check_rep.py", line 14, in <module> from core.vt_check import VirusTotalChk File "/root/check_rep/core/vt_check.py", line 48 if json_resp := json.loads(data): ^ SyntaxError: invalid syntax

AkhilNagaaroor avatar Jun 29 '22 08:06 AkhilNagaaroor

Issue resolved; replaced the named expression json_resp := json.loads(data):.

dfirsec avatar Jun 29 '22 11:06 dfirsec