- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在受强制门户保护的 wifi 网络上连接基于 ESP8266 的传感器(我没有其他选择,我不能要求克减)。
我有一个登录名/密码来连接。
在一台基本的计算机上,当我连接到网络并执行 Internet 请求时(例如,我在 google 上搜索“bl”),我得到了这样的页面:https://url:1003/fgtauth?12291a0aff04200a
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
...
</style>
<body>
<div class="oc">
<div class="ic">
<form action="/" method="post">
<input type="hidden" name="4Tredir" value= "https://www.google.com/search?q=test&ie=utf-8&oe=utf-8">
<input type="hidden" name="magic" value="12291a0aff04200a">
<input type="hidden" name="answer" value="0">
<h1 class="logo">
GENERAL CONDITIONS
</h1>
<p>
I. OBJET <br /> <br />
Some blabla..
</p>
<h2>
Do you agree to the above terms?
</h2>
<div class="fec">
<input type="submit" value= "Yes, I agree" onclick="sb('1')">
<input type="submit" value= "No, I decline" onclick="sb('0')">
</div>
</form>
</div>
</div>
<script>
function sb(val) {
document.forms[0].answer.value = val;
document.forms[0].submit();
}
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
...
</style>
<title>
Firewall Authentication
</title>
</head>
<body>
<div class="oc">
<div class="ic">
<form action="/" method="post">
<input type="hidden" name="4Tredir" value= "https://www.google.com/search?q=bl&ie=utf-8&oe=utf-8">
<input type="hidden" name="magic" value="122713150676bec1">
<h1 class="logo">
Authentication Required
</h1>
<h2>
Please enter your username and password to continue.
</h2>
<div class="fer">
<label for="ft_un">
Username:
</label>
<input name="username" id="ft_un" style="width:245px">
<br>
</div>
<div class="fer">
<label for="ft_pd">
Password:
</label>
<input name="password" id="ft_pd" type="password" style="width:245px">
</div>
<div class="fer">
<input type="submit" value= "Continue">
</div>
</form>
</div>
</div>
</body>
</html>
client.print("POST /update HTTP/1.1\n");
最佳答案
ESP8266 不仅能够使用 HTTPS,事实上最新的 ESP8226 Arduino 代码库包括一个 WiFiClientSecure 类,用于连接到 HTTPS 服务器。
假设这个页面永远不会改变,并且您使用的是 Arduino 环境,您将需要编写一些基本功能。其中之一将是初始 GET
您已经链接的功能,并检查您是否收到了您想要的页面,或者您是否被定向到门户。如果您被定向到门户,则需要编写等效的 POST
函数发送“我同意”响应。
现在,这个 POST
函数将要求您将 HTTP 格式编码的有效负载发送到包含“答案”值的服务器 - 您可以在此处阅读该内容 http://www.w3.org/TR/html401/interact/forms.html#h-17.13 .由于您(可能)不希望页面发生变化,您可以将其硬编码为如下所示:
client.println("POST / HTTP/1.1");
// $PORTAL_HOST should be the host of the captive portal, e.g. 10.1.1.1
client.println("Host: $PORTAL_HOST");
client.println("Content-Type: application/x-www-form-urlencoded");
client.println("Content-Length: 8");
client.print("\n");
client.print("Answer=1");
indexOf
提取魔法/ session 很简单。/
substring
或类似的东西,然后用你现在提取的数据(如果需要)重复上面的代码。
关于arduino - 使用 ESP8266 连接到强制门户 wifi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33343273/
根据此 Microsoft 指南: https://learn.microsoft.com/en-us/azure/app-service/webjobs-create右键单击 Web 作业时,应该会
我正在尝试在新的 Azure 门户中将网站的开发人员组添加到读者角色,并将用户分配到该组。 当我将特定用户添加到网站的读者角色时,用户可以正常看到所有内容,但是当我删除该用户并将其添加到开发人员组时,
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我无法验证 Azure Portal在我的家庭桌面(Windows 10 家庭版)上。它只是挂着以下图标,直到我最终被重定向到 error timeout page . 有趣的是,我仍然可以登录 Of
我知道我的问题并不具体,也没有明确的答案,但我需要帮助来弄清楚从哪里开始寻找。 因此,我们在 Azure 门户上工作,并有一个 Web 作业从队列中获取消息并处理它们;由于一些奇怪的原因,当我使用 S
昨天共享我的 Azure 门户仪表板后,我想我不小心删除了我的默认仪表板,因为它与共享仪表板同名。现在,当我登录门户时,我收到以下消息: Dashboard not found We could no
过去几天我收到一个非常奇怪的错误。当我尝试在 Azure 门户中打开任何 SQL Azure 数据库时,我只是在通知中心收到一条错误消息: Refresh the browser to try aga
我在 BizTalk 方面有相当丰富的经验,但对 ESB 工具包还很陌生。我们实际上并不需要这样的 ESB 解决方案,但我想使用 ESB Portal 来显示错误、修改消息并重新提交。 据我所知,我已
昨天共享我的 Azure 门户仪表板后,我想我不小心删除了我的默认仪表板,因为它与共享仪表板同名。现在,当我登录门户时,我收到以下消息: Dashboard not found We could no
过去几天我收到一个非常奇怪的错误。当我尝试在 Azure 门户中打开任何 SQL Azure 数据库时,我只是在通知中心收到一条错误消息: Refresh the browser to try aga
错误 500:java.util.MissingResourceException:找不到 bundle com.ibm.abc.nl.abcdf、 key en_US 的资源。 我收到此异常。我在
我正在尝试编写一个程序,以编程方式将用户登录到 ArcGIS 门户。 这是我的场景: 用户登录到应用程序 A,用户单击指向 ArcGIS 门户的链接 - 我不希望他们在单击该链接时必须登录门户,因为他
React portals让您将 React 子元素渲染到不同的 DOM 元素中,在页面上完全独立的某个位置。 我想做相反的事情:我想在页面的其他地方渲染一次 DOM 元素,然后根据我的 React
我一直在使用 Azure 搜索通过 Azure 门户远程创建的索引 (Umbraco) 中进行搜索。 今天早上,我收到错误消息,告诉我在索引中允许门户来源。 我不明白为什么我昨天能够搜索,而今天它告诉
我曾使用 Websphere Portal 6.0、6.1 并使用 JSR 168、JSR 286 Portlets 开发了门户应用程序。 现在我正在转移到我将使用 Liferay 门户服务器和 JS
如何使用 portal.properties 配置或覆盖 Liferay 门户属性? 最佳答案 Liferay 属性是一种强大的工具,它允许我们配置 Portal 行为而无需编写 hooks-、ext
我已经安装了 FIM Portal 并且安装成功。但是,我无法在 FI 上查看导航栏和管理控件 最佳答案 在集合 --> 搜索管理员 --> 将您的用户 ID 添加到该集合。 关于sharepoint
我的 Web 应用程序部署在 Azure 门户中。我想从我的解决方案中删除整个 web.config 文件,并想在 Azure 中配置它。是否可以做到这一点,如果可能的话,我需要在哪里提供azure中
我认为这是不可能的,但我想知道是否有任何网址可以将我重定向到标准逻辑应用程序(单租户)中的特定工作流程。 我为什么要问这个问题,因为在消费逻辑应用程序中,如果我向某人提供 URL,他们会直接进入概述页
我是一名优秀的程序员,十分优秀!