You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ali@koalasec batchql]$ python3 batch.py -e https://api.target.com/graphql/ --header "Api-Key: 999999999"
Traceback (most recent call last):
File "/home/ali/tools/batchql/batch.py", line 28, in <module>
point_index = header.find(":")
^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'find'
However i was able to solve the issue by modify the code to:
if args.header:
for header in args.header:
if isinstance(header, list):
header = header[0]
if ":" in header: # Ensure the format is correct
point_index = header.find(":")
header_dict[header[:point_index].strip()] = header[point_index+1:].strip()
else:
print(f"Invalid header format: {header}")
instead of:
if args.header:
for header in args.header:
point_index = header.find(":")
header_dict[header[:point_index].strip()] = header[point_index+1:].strip()
The text was updated successfully, but these errors were encountered:
I was getting the bellow error:
However i was able to solve the issue by modify the code to:
instead of:
The text was updated successfully, but these errors were encountered: