Avoid shadowing args argument from outer scope

pull/11/head
fuomag9 2020-02-05 13:18:50 +01:00
parent c46724ea5e
commit 287d94cf3c
1 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ class GraphQLmap(object):
url = None url = None
headers = None headers = None
def __init__(self, args): def __init__(self, args_graphql):
print(" _____ _ ____ _ ") print(" _____ _ ____ _ ")
print(" / ____| | | / __ \| | ") print(" / ____| | | / __ \| | ")
print(" | | __ _ __ __ _ _ __ | |__ | | | | | _ __ ___ __ _ _ __ ") print(" | | __ _ __ __ _ _ __ | |__ | | | | | _ __ ___ __ _ _ __ ")
@ -30,10 +30,10 @@ class GraphQLmap(object):
print(" |_| |_| ") print(" |_| |_| ")
print(" " * 30, end='') print(" " * 30, end='')
print(f"\033[1mAuthor\033[0m: {self.author} \033[1mVersion\033[0m: {self.version} ") print(f"\033[1mAuthor\033[0m: {self.author} \033[1mVersion\033[0m: {self.version} ")
self.args = args self.args = args_graphql
self.url = args.url self.url = args_graphql.url
self.method = args.method self.method = args_graphql.method
self.headers = None if not args.headers else json.loads(args.headers) self.headers = None if not args_graphql.headers else json.loads(args_graphql.headers)
while True: while True:
query = input("GraphQLmap > ") query = input("GraphQLmap > ")
@ -66,7 +66,7 @@ class GraphQLmap(object):
blind_mssql(self.url, self.method, self.headers) blind_mssql(self.url, self.method, self.headers)
else: else:
exec_advanced(args.url, self.method, query, self.headers) exec_advanced(args_graphql.url, self.method, query, self.headers)
if __name__ == "__main__": if __name__ == "__main__":