我正在尝试使用 Python 语言检测 graphql 端点。我是一个绝对的初学者,但我尝试过编写代码。你能建议改变和更好的方法吗?代码:
import requests,urllib,urllib.request
import string
consoleDict = [
"",
"/graphql",
"/graphql/console",
"graphql.php",
"graphiql",
"explorer",
"altair",
"/playground"
]
for endpoint in consoleDict:
ep = ' http://159.100.248.211 '
response = requests.get(ep)
if response.status_code in [200,403]:
print("It is a GraphQL endpoint",endpoint)
谢谢 :)