From 145970261b763439096d7ae277fc15bbdcefbcc1 Mon Sep 17 00:00:00 2001 From: adindrabkin <47116975+adindrabkin@users.noreply.github.com> Date: Sun, 24 Jul 2022 16:44:33 -0400 Subject: [PATCH] Skip args where args_ttype is None The try-catch block at line 62 allows args_ttype to be None. Line 74 was updated to an f-string to convert None to str(None) to prevent the program from crashing. Recently ran into this issue when testing a development environment which caused a None type to appear. Changing to an f-string mitigated this issue and allowed for enumeration to continue. --- graphqlmap/attacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphqlmap/attacks.py b/graphqlmap/attacks.py index ecc62a0..0c49b70 100644 --- a/graphqlmap/attacks.py +++ b/graphqlmap/attacks.py @@ -70,8 +70,8 @@ def dump_schema(url, method, graphversion, headers, use_json, proxy): print("{} (\033[93m{}\033[0m!), ".format(args_name, args_ttype), end='') cmdlist.append(args_name) - # generate mutation query - mutation_args += args_name + ":" + args_ttype + "," + # generate mutation query as a formatted string to avoid the program crashing when args_ttype is None + mutation_args += f'{args_name}:{args_ttype},' print("") if (types['name'].lower().strip() == "mutations"):