简体   繁体   English

URL 查询参数是如何生成的?

[英]How URL query parameters are generated?

在此处输入图片说明

How are the parameters after node?_=xxxxxx are being generated? node?_=xxxxxx 后面的参数是怎么生成的?

How can I capture these if using a Python script to get the URL?如果使用 Python 脚本获取 URL,如何捕获这些内容?

edit: Apologies for not enough info.编辑:抱歉没有足够的信息。 My first novice post.我的第一个新手帖子。

I am trying to get the nodes dictionary using Python from Eve-NG API.我正在尝试使用 Python 从 Eve-NG API 获取节点字典。

Eve-NG API Docs Ref: https://www.eve-ng.net/index.php/documentation/howtos/how-to-eve-ng-api/ Eve-NG API 文档参考: https : //www.eve-ng.net/index.php/documentation/howtos/how-to-eve-ng-api/

curl -s -c /tmp/cookie -b /tmp/cookie
-X GET -H 'Content-type: application/json'
http://127.0.0.1/api/labs/User1/Lab%201.unl/nodes

with above I get a dictionary with nodes data, all the info is correct except url key value "url":"/html5/#/client/MzI3OTIAYwBteXNxbA==?token=AE...000"上面我得到了一个包含节点数据的字典,所有信息都是正确的,除了 url 键值 "url":"/html5/#/client/MzI3OTIAYwBteXNxbA==?token=AE...000"

expected value is - "url": "telnet://127.0.0.1:32769" as show in eve-ng docs.预期值为 - "url": "telnet://127.0.0.1:32769" 如 eve-ng 文档中所示。

From Chrome Developer Tools if I open - http://127.0.0.1/api/labs/User1/Lab%201.unl/nodes?158489xxxx in a tab, I can see the correct "url": "telnet://127.0.0.1:32769" key/value pair.如果我打开 Chrome 开发者工具 - http://127.0.0.1/api/labs/User1/Lab%201.unl/nodes?158489xxxx在选项卡中,我可以看到正确的“url”:“telnet://127.0 .0.1:32769" 键/值对。

you can see in the screenshot the GET request has query parameters node?_=xxxxxxx how can find out how these numbers/timestamps/encoded values are being generated?你可以在截图中看到 GET 请求有查询参数节点?_=xxxxxxx 如何找出这些数字/时间戳/编码值是如何生成的? or how can I modify Python script to capture these can make the correct GET request?或者如何修改 Python 脚本以捕获这些可以发出正确的 GET 请求?

Hope this explains the issue.希望这能解释这个问题。

Thanks谢谢

<div class="form-group has-feedback">
<select name="html5" class="form-control" ng-init="html5='-1'" placeholder="html5" ng-model="html5">
    <option value="-1" selected="">Native console</option>
    <option value="1">Html5 console</option>
</select>
  </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM