测试账号密码 加密模式  1

18011210338  +

015871     -

测试2

1601120382       +1

mimaHENFuzb  -1

打开网页

手机端

http://10.255.44.33/srun_portal_phone.php?ac_id=1&

电脑端

http://10.255.44.33/srun_portal_pc.php?ac_id=1&

连上西电网 wifi名:stu-xdwlan   密码 :空(所有认证上网的WIFI名都是空)

输入 10.255.44.33

发送:

  1. GET http://10.255.44.33/ac_detect.php?ac_id=1& HTTP/1.1
  2. Host: 10.255.44.33
  3. Connection: keep-alive
  4. Upgrade-Insecure-Requests: 1
  5. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  6. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  7. Referer: http://10.255.44.33/index_1.html
  8. Accept-Encoding: gzip, deflate
  9. Accept-Language: zh-CN,zh;q=0.9
  10. Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKlmvDiG3pL%252BfKr5VTKRuLk0qItTDR0QjBKFE4G8GyMjUM3dNeDa3B5RpzpgI%252B1yveIbZXB7uXYzCInIqfHqZbn9GPjEaUwWEKjrHBE7cXyC0mAwXw%252BO%252FOcy7YZwdJhmFf4%252BUtT%252BWr0Oudrz13KfS4g%253D%253D

  

  

接收:

  1. HTTP/1.1 302 Found
  2. Server: nginx/1.8.0
  3. Date: Thu, 13 Sep 2018 15:35:09 GMT
  4. Content-Type: text/html
  5. Content-Length: 0
  6. Connection: close
  7. X-Powered-By: PHP/5.5.23
  8. Location: http://10.255.44.33/srun_portal_pc.php?ac_id=1&

  网页被重定向到

  1. http://10.255.44.33/srun_portal_pc.php?ac_id=1&

自动跳转

发送:

  1. GET http://10.255.44.33/srun_portal_pc.php?ac_id=1& HTTP/1.1
  2. Host: 10.255.44.33
  3. Connection: keep-alive
  4. Upgrade-Insecure-Requests: 1
  5. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  6. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  7. Referer: http://10.255.44.33/index_1.html
  8. Accept-Encoding: gzip, deflate
  9. Accept-Language: zh-CN,zh;q=0.9

  接收:

  1. HTTP/1.1 200 OK
  2. Server: nginx/1.8.0
  3. Date: Thu, 13 Sep 2018 15:35:09 GMT
  4. Content-Type: text/html; charset=utf-8
  5. Transfer-Encoding: chunked
  6. Connection: close
  7. X-Powered-By: PHP/5.5.23
  8.  
  9. 1f36
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml">
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. <title>登录</title>
  15.  
  16. <script language="javascript" src="js/jquery.js"></script>
  17. <script language="javascript" src="js/srun_portal.js"></script>
  18. <script language="javascript" src="js/message.js"></script>
  19. </head>
  20. <style type="text/css">
  21. * {
  22. margin:0px 0px;
  23. padding:0px 0px;
  24. font-family:'微软雅黑','Microsoft Yahei',Arial, Helvetica, sans-serif;
  25. }
  26. body {
  27. margin:0 auto;
  28. padding:0px 0px;
  29. }
  30. a {
  31. color:#333;
  32. text-decoration: none;
  33. cursor: pointer;
  34. outline:none;
  35. }
  36. a:hover {
  37. text-decoration: none;
  38. color:#06F;
  39. }
  40. ul {
  41. list-style:none;
  42. }
  43. .float_l {
  44. float:left;
  45. }
  46. .float_r {
  47. float:right;
  48. }
  49. .clearfix:before, .clearfix:after {
  50. content: "";
  51. display: block;
  52. }
  53. .clearfix:after {
  54. clear: both;
  55. }
  56. .navbar {
  57. width:100%;
  58. margin:0 auto;
  59. vertical-align:middle;
  60. background:url(images/head-bg.png)
  61. /*background-color:#1997ec;*/
  62. }
  63. .container {
  64. background-image:url(images/bg_5.jpg) ;
  65. height:600px;
  66. margin:0px auto;
  67. text-align:center;
  68. }
  69. .contain {
  70. width:980px;
  71. height:100%;
  72. margin:0 auto;
  73. padding:0px;
  74. }
  75. .footer {
  76. width:980px;
  77. margin:0 auto;
  78. font-size:12px;
  79. height:35px;
  80. line-height:35px;
  81. }
  82.  
  83. .login {
  84. padding:1.5em 1.5em 1em;
  85. /*background-color:#e2eef1;
  86. background-image: linear-gradient(to bottom, rgb(226, 238, 241) 50%, rgb(212, 229, 234) 100%);
  87. border:1px solid #CCC;*/
  88. border-radius: 4px 4px 4px 4px;
  89. text-align:left;
  90. font-size:.875em;
  91. position:relative;
  92.  
  93. }
  94. ul.login li {
  95. margin-bottom:5px;
  96. }
  97. /*----login tab---*/
  98. .margbt { margin-bottom:4px; color:white;}
  99. textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
  100. background-color: rgb(255, 255, 255);
  101. border: 1px solid rgb(204, 204, 204);
  102. box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;
  103. transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
  104. }
  105. select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
  106. display: inline-block;
  107. height: 24px;
  108. margin-bottom: 10px;
  109. font-size: 14px;
  110. line-height: 24px;
  111. color: rgb(36, 36, 36);
  112. border-radius: 3px;
  113. vertical-align: middle;
  114. padding: 4px 6px;
  115. }
  116. textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
  117. border-color: rgba(82, 168, 236, 0.8);
  118. outline: 0px none;
  119. box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(82, 168, 236, 0.6);
  120. }
  121. .input input[type="text"], .input input[type="password"] { width:268px;}
  122. input[type="checkbox"] { vertical-align:middle; margin-top:-3px;}
  123.  
  124. .login input[type='button'],input[type='submit'] {
  125. width:80px;
  126. border:0px solid #FFF;
  127. height:35px;
  128. color:#FFF;
  129. font-size:14px;
  130. background-image:none;
  131. background-clip:border-box;
  132. background-color:#b2cb49;
  133. display:inline-block;
  134. background-attachment:scroll;
  135. background-repeat:repeat;
  136. background-position-x:0%;
  137. background-position-y:0%;
  138. border-top-left-radius:3px;
  139. border-top-right-radius:3px;
  140. border-bottom-left-radius:3px;
  141. border-bottom-right-radius:3px;
  142. cursor:pointer;
  143. }
  144.  
  145. .login input[type='button']:hover,,input[type='submit']:hover {
  146. background-color:#a2c800;
  147. }
  148.  
  149. .login a {
  150. width:80px;
  151. border:0px solid #FFF;
  152. height:35px;
  153. line-height:35px;
  154. text-align:center;
  155. color:#FFF;
  156. font-size:14px;
  157. background-image:none;
  158. background-clip:border-box;
  159. background-color:#3bb3e0;
  160. display:inline-block;
  161. background-attachment:scroll;
  162. background-repeat:repeat;
  163. background-position-x:0%;
  164. background-position-y:0%;
  165. border-top-left-radius:3px;
  166. border-top-right-radius:3px;
  167. border-bottom-left-radius:3px;
  168. border-bottom-right-radius:3px;
  169. }
  170. .login a:hover {
  171. background-color:#2482a5;
  172. }
  173. /*----login tab---*/
  174. .logo {
  175. /* background:url(images/head-bg.png); no-repeat */
  176. height:70px;
  177. margin:0px;
  178. }
  179. .waps{
  180. width:600px;
  181. text-align:center;
  182. line-height:28px;
  183. font-size:12px;
  184. font-family:Arial, Helvetica, sans-serif;
  185. margin-top:100px;
  186. color:white;
  187. text-align:left;
  188. border:1px solid #CCC;
  189. border-radius: 4px 4px 4px 4px;
  190. padding:5px 5px;
  191. }
  192. .con{
  193. text-align:left;
  194. width:600px;
  195. margin:0px auto;
  196. background:rgba(255, 255, 255, 0.8) none repeat scroll 0 0 !important;/*实现FF背景透明,文字不透明*/
  197. filter:Alpha(opacity=80);
  198. background:#fff;/*实现IE背景透明*/
  199. border-radius: 4px 4px 4px 4px;
  200. }
  201. .con p{
  202. position:relative;
  203. padding:5px 10px;
  204. color:black;
  205. }/*实现IE文字不透明*/
  206. </style>
  207. <body class="bottom">
  208.  
  209. <div class="navbar"><div class="logo"><img src="./images/xidian.png" style="width: 300px;margin: 0px 200px;"></div>
  210. <!--<span style="float: right; margin-top: -45px; margin-right:220px;font-size:22px;color:red">上网不涉密 涉密不上网</span>-->
  211. </div>
  212. <div class="container">
  213.  
  214. <div class="contain clearfix">
  215. <!-- <div class="float_l waps" style="margin-top:90px; width:600px; color:white; text-align:left; font-size:13px; border:1px solid #CCC; border-radius: 4px 4px 4px 4px; padding:10px 10px;">
  216. <div class="con">
  217. <p>
  218. <br/>
  219.        
  220. 通知列表: <br/>
  221.    <a href="http://10.0.0.55:8800/notice/list/view?id=4" style="text-decoration:underline" target="_blank">《关于校园网计费系统启用的通知》</a><br/>
  222.    <a href="http://10.0.0.55:8800/notice/list/view?id=3" style="text-decoration:underline" target="_blank">《校园网网费微信支付演示》</a><br/>
  223.    <a href="http://10.0.0.55:8800/notice/list/view?id=1" style="text-decoration:underline" target="_blank">《关于升级后校园网计费系统试运行的通知》</a><br/>
  224. <br/>
  225. <br/>
  226. </p>
  227.  
  228. </div>
  229. </div> -->
  230. <div class="float_r" style="margin-top: 80px;">
  231.  
  232. <form name="form2" action="srun_portal_pc.php" method="post" onsubmit="return check(this)">
  233. <input type="hidden" name="action" value="login">
  234. <input type="hidden" name="ac_id" value="1">
  235. <input type="hidden" name="user_ip" value="">
  236. <input type="hidden" name="nas_ip" value="">
  237. <input type="hidden" name="user_mac" value="">
  238. <input type="hidden" name="url" value="" >
  239. <ul class="login">
  240. <li><p class="margbt">用户名/username</p>
  241. <div class="input">
  242. <input type="text" name="username" size="35" value="" >
  243. </div>
  244. </li>
  245. <li>
  246. <p class="margbt">密码/password</p>
  247. <div class="input">
  248. <input type="password" name="password" size="35" value="">
  249. </div>
  250. </li>
  251. <li><label class="margbt"><input name="save_me" title="记忆密码" type="checkbox" value="1" /> 记住密码</label>                  
  252.  
  253. 79d
  254. <li class="margin">
  255. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  256. <tr valign="middle">
  257. <td width="90" height="40" align="left">
  258. <input class="a a_demo_one" type="submit" id="button" value="登录"/>
  259. </td>
  260. <td width="100" align="center">
  261. <input class="a a_demo_two" type="button" onClick="do_logout()" value="注销"/>
  262. </td>
  263. <td width="90" align="right"><a href="http://10.255.44.1:8800" target="_blank" class="a a_demo_three" id="goto_services">自服务</a>
  264. </td>
  265. </tr>
  266. </table>
  267. <br/>
  268. </li>
  269. </ul>
  270. </form>
  271.  
  272. </div>
  273. </div>
  274.  
  275. </div>
  276. <div class="footer">
  277. <div class="float_l" style="width:auto;">所有版权:© 西安电子科技大学</div>
  278. <div class="float_r">
  279. <a href="/download_client.html" target="_blank" style="color:#FF0000">联系我们</a>  |  联系电话:(02988201252;南校区电话(02981891357
  280. <!--<div class="float_r"><a href="http://" target="_blank" style="color:#00C">有线客户端下载</a>  |  <a href="http://.edu.cn" target="_blank">联系我们</a>  |  <a href="http://nc.tju.edu.cn/inc/Notice/201511/P020151128844022637447.pdf" target="_blank">使用帮助</a></div>
  281. <div style="text-align:center; margin:0px auto;display:none;">北京理工大学 <a href="http://www.bit.edu.cn" target="_blank">联系我们</a>  |  <a href="http://.edu.cn/inc/Notice/201511/P020151128844022637447.pdf" style="text-decoration:underline" target="_blank">使用帮助</a></div>-->
  282. </div>
  283. </body>
  284. </html>
  285.  
  286. 0

  

-------------------------------------------------------

输入账号密码

 发出响应 

- 发送一个表单,里面是自己的上网信息。

  1. POST http://10.255.44.33/srun_portal_pc.php HTTP/1.1
  2. Host: 10.255.44.33
  3. Connection: keep-alive
  4. Content-Length: 93
  5. Cache-Control: max-age=0
  6. Origin: http://10.255.44.33
  7. Upgrade-Insecure-Requests: 1
  8. Content-Type: application/x-www-form-urlencoded
  9. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  10. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  11. Referer: http://10.255.44.33/srun_portal_pc.php?ac_id=1&
  12. Accept-Encoding: gzip, deflate
  13. Accept-Language: zh-CN,zh;q=0.9
  14.  
  15. action=login&ac_id=1&user_ip=&nas_ip=&user_mac=&url=&username=1601120382&password=mimaHENFuzb

  

表单的构造代码:

  1. <form name="form2" action="srun_portal_pc.php" method="post" onsubmit="return check(this)">
  2. <input type="hidden" name="action" value="login">
  3. <input type="hidden" name="ac_id" value="1">
  4. <input type="hidden" name="user_ip" value="">
  5. <input type="hidden" name="nas_ip" value="">
  6. <input type="hidden" name="user_mac" value="">
  7. <input type="hidden" name="url" value="" >
  8. <ul class="login">
  9. <li><p class="margbt">用户名/username</p>
  10. <div class="input">
  11. <input type="text" name="username" size="35" value="" >
  12. </div>
  13. </li>
  14. <li>
  15. <p class="margbt">密码/password</p>
  16. <div class="input">
  17. <input type="password" name="password" size="35" value="">
  18. </div>
  19. </li>
  20. <li><label class="margbt"><input name="save_me" title="记忆密码" type="checkbox" value="1" /> 记住密码</label>
  21.  
  22. 79d
  23. <li class="margin">
  24. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  25. <tr valign="middle">
  26. <td width="90" height="40" align="left">
  27. <input class="a a_demo_one" type="submit" id="button" value="登录"/>
  28. </td>
  29. <td width="100" align="center">
  30. <input class="a a_demo_two" type="button" onClick="do_logout()" value="注销"/>
  31. </td>
  32. <td width="90" align="right"><a href="http://10.255.44.1:8800" target="_blank" class="a a_demo_three" id="goto_services">自服务</a>
  33. </td>
  34. </tr>
  35. </table>
  36. <br/>
  37. </li>
  38. </ul>
  39. </form>

a.找到 <form action="login" id="regform" method="post" autocomplete="off" title="Form used by registered users to login">
这是说明一个表单,注意method字段就好,大多是post,但是也可能为get,两种方式的数据传输是不一样的,需要不同的构造方式,本文以post为例,如果有遇到get情况可以融会贯通或者论坛求助.

b.上面图片其中蓝色的是输入信息的input(需要一点html的知识),
< input id="password" name="password" type="password" size="25" class="text" accesskey="p">
就是上面这样的,主要找到name的值,这是网页提交时候里面密码对应的字段,需要记下,同样要获得username的对应字段.

c.找到表单提交的网站(真的需要html知识),比如上图为  http://10.255.44.33/srun_portal_pc.php  这个提交的网站和<form action="login" id="regform" method="post" autocomplete="off" title="Form used by registered users to login">里面的action字段有关系,说明提交到哪儿去. 但是并不能直接使用这个网址,因为还没有联网的权限没有dns服务器来给我们解析网址.可以ping或者其他的方式获得网址对应的ip (此处针对特殊情况提示,可能有的端口不是默认80,这种情况也需要了解端口号)

收到

-得到登陆界面的源码

  1. HTTP/1.1 200 OK
  2. Server: nginx/1.8.0
  3. Date: Thu, 13 Sep 2018 15:38:27 GMT
  4. Content-Type: text/html; charset=utf-8
  5. Transfer-Encoding: chunked
  6. Connection: close
  7. X-Powered-By: PHP/5.5.23
  8. Set-Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKlmvDiG3pL%252BfKr5VTKRuLk0qItTDR0QjBKFE4G8GyMjUM3dNeDa3B5RpzpgI%252B1yveIbZXB7uXYzCInIqfHqZbn9GPjEaUwWEKjrHBE7cXyC0mAwXw%252BO%252FOcy7YZwdJhmFf4%252BUtT%252BWr0Oudrz13KfS4g%253D%253D; expires=Sat, 13-Oct-2018 15:38:27 GMT; Max-Age=2592000
  9.  
  10. 1e0e
  11. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  12. <html xmlns="http://www.w3.org/1999/xhtml">
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  15. <title>登录</title>
  16.  
  17. <script language="javascript" src="js/jquery.js"></script>
  18. <script language="javascript" src="js/srun_portal.js"></script>
  19. <script language="javascript" src="js/message.js"></script>
  20. </head>
  21. <style type="text/css">
  22. * {
  23. margin:0px 0px;
  24. padding:0px 0px;
  25. font-family:'微软雅黑','Microsoft Yahei',Arial, Helvetica, sans-serif;
  26. }
  27. body {
  28. margin:0 auto;
  29. padding:0px 0px;
  30. }
  31. a {
  32. color:#333;
  33. text-decoration: none;
  34. cursor: pointer;
  35. outline:none;
  36. }
  37. a:hover {
  38. text-decoration: none;
  39. color:#06F;
  40. }
  41. ul {
  42. list-style:none;
  43. }
  44. .float_l {
  45. float:left;
  46. }
  47. .float_r {
  48. float:right;
  49. }
  50. .clearfix:before, .clearfix:after {
  51. content: "";
  52. display: block;
  53. }
  54. .clearfix:after {
  55. clear: both;
  56. }
  57. .navbar {
  58. width:100%;
  59. margin:0 auto;
  60. vertical-align:middle;
  61. background:url(images/head-bg.png)
  62. /*background-color:#1997ec;*/
  63. }
  64. .container {
  65. background-image:url(images/bg_5.jpg) ;
  66. height:600px;
  67. margin:0px auto;
  68. text-align:center;
  69. }
  70. .contain {
  71. width:980px;
  72. height:100%;
  73. margin:0 auto;
  74. padding:0px;
  75. }
  76. .footer {
  77. width:980px;
  78. margin:0 auto;
  79. font-size:12px;
  80. height:35px;
  81. line-height:35px;
  82. }
  83.  
  84. .login {
  85. padding:1.5em 1.5em 1em;
  86. /*background-color:#e2eef1;
  87. background-image: linear-gradient(to bottom, rgb(226, 238, 241) 50%, rgb(212, 229, 234) 100%);
  88. border:1px solid #CCC;*/
  89. border-radius: 4px 4px 4px 4px;
  90. text-align:left;
  91. font-size:.875em;
  92. position:relative;
  93.  
  94. }
  95. ul.login li {
  96. margin-bottom:5px;
  97. }
  98. /*----login tab---*/
  99. .margbt { margin-bottom:4px; color:white;}
  100. textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
  101. background-color: rgb(255, 255, 255);
  102. border: 1px solid rgb(204, 204, 204);
  103. box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;
  104. transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
  105. }
  106. select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
  107. display: inline-block;
  108. height: 24px;
  109. margin-bottom: 10px;
  110. font-size: 14px;
  111. line-height: 24px;
  112. color: rgb(36, 36, 36);
  113. border-radius: 3px;
  114. vertical-align: middle;
  115. padding: 4px 6px;
  116. }
  117. textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
  118. border-color: rgba(82, 168, 236, 0.8);
  119. outline: 0px none;
  120. box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(82, 168, 236, 0.6);
  121. }
  122. .input input[type="text"], .input input[type="password"] { width:268px;}
  123. input[type="checkbox"] { vertical-align:middle; margin-top:-3px;}
  124.  
  125. .login input[type='button'],input[type='submit'] {
  126. width:80px;
  127. border:0px solid #FFF;
  128. height:35px;
  129. color:#FFF;
  130. font-size:14px;
  131. background-image:none;
  132. background-clip:border-box;
  133. background-color:#b2cb49;
  134. display:inline-block;
  135. background-attachment:scroll;
  136. background-repeat:repeat;
  137. background-position-x:0%;
  138. background-position-y:0%;
  139. border-top-left-radius:3px;
  140. border-top-right-radius:3px;
  141. border-bottom-left-radius:3px;
  142. border-bottom-right-radius:3px;
  143. cursor:pointer;
  144. }
  145.  
  146. .login input[type='button']:hover,,input[type='submit']:hover {
  147. background-color:#a2c800;
  148. }
  149.  
  150. .login a {
  151. width:80px;
  152. border:0px solid #FFF;
  153. height:35px;
  154. line-height:35px;
  155. text-align:center;
  156. color:#FFF;
  157. font-size:14px;
  158. background-image:none;
  159. background-clip:border-box;
  160. background-color:#3bb3e0;
  161. display:inline-block;
  162. background-attachment:scroll;
  163. background-repeat:repeat;
  164. background-position-x:0%;
  165. background-position-y:0%;
  166. border-top-left-radius:3px;
  167. border-top-right-radius:3px;
  168. border-bottom-left-radius:3px;
  169. border-bottom-right-radius:3px;
  170. }
  171. .login a:hover {
  172. background-color:#2482a5;
  173. }
  174. /*----login tab---*/
  175. .logo {
  176. /* background:url(images/head-bg.png); no-repeat */
  177. height:70px;
  178. margin:0px;
  179. }
  180. .waps{
  181. width:600px;
  182. text-align:center;
  183. line-height:28px;
  184. font-size:12px;
  185. font-family:Arial, Helvetica, sans-serif;
  186. margin-top:100px;
  187. color:white;
  188. text-align:left;
  189. border:1px solid #CCC;
  190. border-radius: 4px 4px 4px 4px;
  191. padding:5px 5px;
  192. }
  193. .con{
  194. text-align:left;
  195. width:600px;
  196. margin:0px auto;
  197. background:rgba(255, 255, 255, 0.8) none repeat scroll 0 0 !important;/*实现FF背景透明,文字不透明*/
  198. filter:Alpha(opacity=80);
  199. background:#fff;/*实现IE背景透明*/
  200. border-radius: 4px 4px 4px 4px;
  201. }
  202. .con p{
  203. position:relative;
  204. padding:5px 10px;
  205. color:black;
  206. }/*实现IE文字不透明*/
  207. </style>
  208. <body class="bottom">
  209.  
  210. <div class="navbar"><div class="logo"><img src="./images/xidian.png" style="width: 300px;margin: 0px 200px;"></div>
  211. <!--<span style="float: right; margin-top: -45px; margin-right:220px;font-size:22px;color:red">上网不涉密 涉密不上网</span>-->
  212. </div>
  213. <div class="container">
  214.  
  215. <div class="contain clearfix">
  216. <!-- <div class="float_l waps" style="margin-top:90px; width:600px; color:white; text-align:left; font-size:13px; border:1px solid #CCC; border-radius: 4px 4px 4px 4px; padding:10px 10px;">
  217. <div class="con">
  218. <p>
  219. <br/>
  220.        
  221. 通知列表: <br/>
  222.    <a href="http://10.0.0.55:8800/notice/list/view?id=4" style="text-decoration:underline" target="_blank">《关于校园网计费系统启用的通知》</a><br/>
  223.    <a href="http://10.0.0.55:8800/notice/list/view?id=3" style="text-decoration:underline" target="_blank">《校园网网费微信支付演示》</a><br/>
  224.    <a href="http://10.0.0.55:8800/notice/list/view?id=1" style="text-decoration:underline" target="_blank">《关于升级后校园网计费系统试运行的通知》</a><br/>
  225. <br/>
  226. <br/>
  227. </p>
  228.  
  229. </div>
  230. </div> -->
  231. <div class="float_r" style="margin-top: 80px;">
  232.  
  233. <table width="400" height="260" class="login">
  234. <form name="form3" action="srun_portal_pc.php" method="post">
  235. <input type="hidden" name="action" value="auto_logout">
  236. <input type="hidden" name="info" value="">
  237. <input type="hidden" name="user_ip" value="10.175.128.157">
  238. <input type="hidden" name="username" value="1601120383">
  239. <tr>
  240. <td width="70">
  241. </td>
  242. <td valign="top">
  243. <table>
  244. <tr>
  245. <td height="40"></td>
  246. <td height="40" style="font-weight:bold;color:orange;">
  247. 网络已连接 </td>
  248. </tr>
  249. <tr>
  250. <td height="30" align="right" style="font-weight:bold;color:white;">用户名:</td>
  251. <td height="30" style="font-weight:bold;color:white;">  <span id="user_name">1601120383</span></td>
  252. </tr>
  253. <tr>
  254. <td height="
  255. 99d
  256. 30" align="right" style="font-weight:bold;color:white;">已用流量:</td>
  257. <td height="30" style="font-weight:bold;color:white;">  <span id="sum_bytes"><font color="#aaaaaa">正在获取...</font></span></td>
  258. </tr>
  259. <tr>
  260. <td height="30" align="right" style="font-weight:bold;color:white;">已用时长:</td>
  261. <td height="30" style="font-weight:bold;color:white;">  <span id="sum_seconds"></span></td>
  262. </tr>
  263. <tr>
  264. <td height="30" align="right" style="font-weight:bold;color:white;">帐户余额:</td>
  265. <td height="30" style="font-weight:bold;color:white;">  <span id="user_balance"></span></td>
  266. </tr>
  267. <tr>
  268. <td height="30" align="right" style="font-weight:bold;color:white;">IP地址:</td>
  269. <td height="30" style="font-weight:bold;color:white;">  <span id="user_ip"></span></td>
  270. </tr>
  271.  
  272. <script language="javascript">
  273. setTimeout("get_online_info('10.175.128.157')", 2000);
  274. </script>
  275. <tr>
  276. <td colspan="2" height="30"></td>
  277. </tr>
  278. <tr>
  279. <td height="" colspan="2" style="font-weight:bold;color:black;">
  280. <input type="submit" value="注销" class="a a_demo_one"> 
  281. </td>
  282. </tr>
  283. </table>
  284. </table>
  285. </td>
  286. </tr>
  287. </form>
  288. </table>
  289.  
  290. </div>
  291. </div>
  292.  
  293. </div>
  294. <div class="footer">
  295. <div class="float_l" style="width:auto;">所有版权:© 西安电子科技大学</div>
  296. <div class="float_r">
  297. <a href="/download_client.html" target="_blank" style="color:#FF0000">联系我们</a>  |  联系电话:(02988201252;南校区电话(02981891357
  298. <!--<div class="float_r"><a href="http://" target="_blank" style="color:#00C">有线客户端下载</a>  |  <a href="http://.edu.cn" target="_blank">联系我们</a>  |  <a href="http://nc.tju.edu.cn/inc/Notice/201511/P020151128844022637447.pdf" target="_blank">使用帮助</a></div>
  299. <div style="text-align:center; margin:0px auto;display:none;">北京理工大学 <a href="http://www.bit.edu.cn" target="_blank">联系我们</a>  |  <a href="http://.edu.cn/inc/Notice/201511/P020151128844022637447.pdf" style="text-decoration:underline" target="_blank">使用帮助</a></div>-->
  300. </div>
  301. </body>
  302. </html>
  303.  
  304. 0

  

  

自动发送

  1. POST http://10.255.44.33/include/auth_action.php?k=97323 HTTP/1.1
  2. Host: 10.255.44.33
  3. Connection: keep-alive
  4. Content-Length: 32
  5. Accept: */*
  6. Origin: http://10.255.44.33
  7. X-Requested-With: XMLHttpRequest
  8. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  9. Content-Type: application/x-www-form-urlencoded
  10. Referer: http://10.255.44.33/srun_portal_pc.php
  11. Accept-Encoding: gzip, deflate
  12. Accept-Language: zh-CN,zh;q=0.9
  13. Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKlmvDiG3pL%252BfKr5VTKRuLk0qItTDR0QjBKFE4G8GyMjUM3dNeDa3B5RpzpgI%252B1yveIbZXB7uXYzCInIqfHqZbn9GPjEaUwWEKjrHBE7cXyC0mAwXw%252BO%252FOcy7YZwdJhmFf4%252BUtT%252BWr0Oudrz13KfS4g%253D%253D
  14.  
  15. action=get_online_info&key=97323

  

  接收

  1. HTTP/1.1 200 OK
  2. Server: nginx/1.8.0
  3. Date: Thu, 13 Sep 2018 15:38:29 GMT
  4. Content-Type: text/html
  5. Content-Length: 57
  6. Connection: close
  7. X-Powered-By: PHP/5.5.23
  8.  
  9. 3254815282,716678,0.00,40:f0:2f:10:05:aa,0,10.175.128.157

 2 西工大测试 -深蓝认证系统

发送

  1. GET http://222.24.215.2/ HTTP/1.1
  2. Host: 222.24.215.2
  3. Connection: keep-alive
  4. Upgrade-Insecure-Requests: 1
  5. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  6. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  7. Accept-Encoding: gzip, deflate
  8. Accept-Language: zh-CN,zh;q=0.9
  9. Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKZYk0%252BE7NWAwIX8J%252BofU%252FGBv8G2r96CR%252B8lRV1fPAIw7AOLzxqjLJiifbxx8D9jJbg9cx2lpey8ZbFYk2fspNtwmewwdHZGmJWM2FzDsHCznDERDCddiS4ELeuSs5023dMCKn930ThvKk9jIB%252FI%253D

  

接收

  1. HTTP/1.1 302 Moved Temporarily
  2. Server: nginx
  3. Date: Sat, 15 Sep 2018 11:04:33 GMT
  4. Content-Type: text/html
  5. Content-Length: 154
  6. Connection: close
  7. Location: http://222.24.215.2/index_1.html
  8. SRunFlag: SRun portal server
  9.  
  10. <html>
  11. <head><title>302 Found</title></head>
  12. <body bgcolor="white">
  13. <center><h1>302 Found</h1></center>
  14. <hr><center>nginx</center>
  15. </body>
  16. </html>

  

发送

  1. GET http://222.24.215.2/srun_portal_pc.php?ac_id=14& HTTP/1.1
  2. Host: 222.24.215.2
  3. Connection: keep-alive
  4. Upgrade-Insecure-Requests: 1
  5. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  6. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  7. Accept-Encoding: gzip, deflate
  8. Accept-Language: zh-CN,zh;q=0.9
  9. Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKZYk0%252BE7NWAwIX8J%252BofU%252FGBv8G2r96CR%252B8lRV1fPAIw7AOLzxqjLJiifbxx8D9jJbg9cx2lpey8ZbFYk2fspNtwmewwdHZGmJWM2FzDsHCznDERDCddiS4ELeuSs5023dMCKn930ThvKk9jIB%252FI%253D

  

接收

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  4. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
  5. <meta http-equiv="x-ua-compatible" content="ie=8" />
  6. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  7. <title>校园网认证系统</title>
  8. <link href="/css/main.css" rel="stylesheet"/>
  9.  
  10. <script type="text/javascript" language="javascript" src="./js/json2.js"></script>
  11. <script type="text/javascript" language="javascript" src="./js/srun_portal.js"></script>
  12. <script type="text/javascript" language="javascript" src="./js/jquery.min.js"></script>
  13. <style type="text/css">
  14. body{
  15. position: relative;
  16. overflow-x: hidden;
  17. width: 100%;
  18. height: 100%;
  19. }
  20. .pos{
  21. position: absolute;
  22. left:50%;
  23. margin-left: -400px;
  24. top:100px;
  25. right:0;
  26. bottom: 0;
  27. background-color: #fff;
  28. border-radius: 15px;
  29. width:800px;
  30. }
  31. .bottom1{ background: url(images/timg.png) no-repeat center 0/cover; width: 100%; height: 100%;}
  32. </style>
  33. </head>
  34.  
  35. <body class="bottom1">
  36. <div class="max11">
  37. <table class="contain clearfix pos">
  38. <tr height="80">
  39. <td width="40"></td>
  40. <td colspan="3"><img src="data:images/logo22.png" style="width: 250px;"></td>
  41. </tr>
  42. <tr>
  43. <td width="40"></td>
  44. <td width="300" valign="top">
  45. <table width="300">
  46. <tr>
  47. <td><h3 style="margin-top: 20px;">通知公告</h3></td>
  48. </tr>
  49. <tr>
  50. <td class="border bg_color" valign="top" style="line-height:1.3;">
  51. <p> 1、本页面认证使用深澜账号和密码,如深澜账号未激活,请点击此链接激活<a href='http://zizhu.nwpu.edu.cn:8900/active' target='__blank'>http://zizhu.nwpu.edu.cn:8900/active</a>,激活时初始密码为身份证号码后8位(如果有X为大写)<br /><br /> 2、激活后在此页面输入账号和密码可认证上网<br /><br /> 3、访客请点击“访客”按钮,输入邀请码认证上网<br /><br /></p>
  52. </td>
  53. </tr>
  54. <!-- <tr>-->
  55. <!-- <td class="downs bg_rgba">-->
  56. <!-- <h3>附件下载</h3>-->
  57. <!-- <ul class="clearfix">-->
  58. <!-- <li>-->
  59. <!-- <a href="files/校园网用户手册v1.1.doc"><i class="icon_w"></i>校园网用户手册</a>-->
  60. <!-- </li>-->
  61. <!-- </ul>-->
  62. <!-- </td>-->
  63. <!---->
  64. <!-- </tr>-->
  65. </table>
  66. </td>
  67. <td width="30"></td>
  68. <td valign="top">
  69. <table width="350" height="45" bgcolor="#444444" style="margin-top: 20px; display: none;" >
  70. <tr>
  71. <td align="center">
  72. <p style="color:white;font-weight:bold;" >网络准入认证系统</p>
  73. </td>
  74. </tr>
  75. </table>
  76.  
  77. <table width="350" height="260" class="login">
  78. <form name="form2" action="srun_portal_pc.php?ac_id=14&" method="post"
  79. onsubmit="return check(this)">
  80. <input type="hidden" name="action" value="login">
  81. <input type="hidden" name="ac_id" value="14">
  82. <input type="hidden" name="user_ip" value="">
  83. <input type="hidden" name="nas_ip" value="">
  84. <input type="hidden" name="user_mac" value="">
  85. <input type="hidden" name="url" value="">
  86. <tr>
  87. <td width="40">
  88. </td>
  89. <td valign="top" >
  90. <table width="100%" style="margin-left: -150px;">
  91. <tr>
  92. <td height="20" style="color:red;font-size:12px;"></td>
  93. </tr>
  94. <tr>
  95. <td height="25">账号</td>
  96. </tr>
  97. <tr>
  98. <td height="30">
  99. <input type="text" name="username" size="35"
  100. value="2017262083" placeholder="account">
  101. </td>
  102. </tr>
  103. <tr>
  104. <td height="25">密码</td>
  105. </tr>
  106. <tr>
  107. <td height="30">
  108. <input type="password" name="password" size="35"
  109. value="" placeholder="password">
  110. </td>
  111. </tr>
  112. <tr>
  113. <td height="30">
  114. <input name="save_me" title="记忆密码" type="checkbox"
  115. value="1" />
  116. 记住密码
  117. </td>
  118. </tr>
  119. <tr>
  120. <td height="50" align="">
  121. <input type="submit" value="登录" class="a a_demo_one" style="margin-left: 18%;">
  122. <input type="button" value="访客" class="a a_demo_three" style="margin-left: 10%;" onclick="location.href='./srun_portal_code.php?ac_id=14';">
  123. </td>
  124. </tr>
  125. <tr>
  126. <td height="30"></td>
  127. </tr>
  128. </table>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td class="downs bg_rgba">
  133. <div class="align" style="margin-left: 12%">
  134. <h3>附件下载</h3>
  135. <ul class="clearfix">
  136. <li>
  137. <a href="files/用户激活手册.doc"><i class="icon_w"></i>用户激活手册</a>
  138. </li>
  139. </ul>
  140. </div>
  141. </td>
  142.  
  143. </tr>
  144. </form>
  145. </table>
  146. </td>
  147. </tr>
  148. </table>
  149. </div>
  150.  
  151. </body>
  152. </html>

  

输入账号密码提交

发送

  1. POST http://222.24.215.2/srun_portal_pc.php?ac_id=14& HTTP/1.1
  2. Host: 222.24.215.2
  3. Connection: keep-alive
  4. Content-Length: 94
  5. Cache-Control: max-age=0
  6. Origin: http://222.24.215.2
  7. Upgrade-Insecure-Requests: 1
  8. Content-Type: application/x-www-form-urlencoded
  9. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
  10. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  11. Referer: http://222.24.215.2/srun_portal_pc.php?ac_id=14&
  12. Accept-Encoding: gzip, deflate
  13. Accept-Language: zh-CN,zh;q=0.9
  14. Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKZYk0%252BE7NWAwIX8J%252BofU%252FGBv8G2r96CR%252B8lRV1fPAIw7AOLzxqjLJiifbxx8D9jJbg9cx2lpey8ZbFYk2fspNtwmewwdHZGmJWM2FzDsHCznDERDCddiS4ELeuSs5023dMCKn930ThvKk9jIB%252FI%253D
  15.  
  16. action=login&ac_id=14&user_ip=&nas_ip=&user_mac=&url=&username=2017262083&password=qq591428339 //密码修改 3-1

  

  

接收

  1. HTTP/1.1 200 OK
  2. Server: nginx
  3. Date: Sat, 15 Sep 2018 11:01:24 GMT
  4. Content-Type: text/html; charset=utf-8
  5. Content-Length: 6233
  6. Connection: close
  7. Set-Cookie: login=bQ0pOyR6IXU7PJaQQqRAcBPxGAvxAcroYylaKZYk0%252BE7NWAwIX8J%252BofU%252FGBv8G2r96CR%252B8lRV1fPAIw7AOLzxqjLJiifbxx8D9jJbg9cx2lpey8ZbFYk2fspNtwmewwdHZGmJWM2FzDsHCznDERDCddiS4ELeuSs5023dMCKn930ThvKk9jIB%252FI%253D; expires=Mon, 15-Oct-2018 11:01:23 GMT; Max-Age=2592000
  8. SRunFlag: SRun portal server
  9.  
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  13. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
  14. <meta http-equiv="x-ua-compatible" content="ie=8" />
  15. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  16. <title>校园网认证系统</title>
  17. <link href="/css/main.css" rel="stylesheet"/>
  18.  
  19. <script type="text/javascript" language="javascript" src="./js/json2.js"></script>
  20. <script type="text/javascript" language="javascript" src="./js/srun_portal.js"></script>
  21. <script type="text/javascript" language="javascript" src="./js/jquery.min.js"></script>
  22. <style type="text/css">
  23. body{
  24. position: relative;
  25. overflow-x: hidden;
  26. width: 100%;
  27. height: 100%;
  28. }
  29. .pos{
  30. position: absolute;
  31. left:50%;
  32. margin-left: -400px;
  33. top:100px;
  34. right:0;
  35. bottom: 0;
  36. background-color: #fff;
  37. border-radius: 15px;
  38. width:800px;
  39. }
  40. .bottom1{ background: url(images/timg.png) no-repeat center 0/cover; width: 100%; height: 100%;}
  41. </style>
  42. </head>
  43.  
  44. <body class="bottom1">
  45. <div class="max11">
  46. <table class="contain clearfix pos">
  47. <tr height="80">
  48. <td width="40"></td>
  49. <td colspan="3"><img src="data:images/logo22.png" style="width: 250px;"></td>
  50. </tr>
  51. <tr>
  52. <td width="40"></td>
  53. <td width="300" valign="top">
  54. <table width="300">
  55. <tr>
  56. <td><h3 style="margin-top: 20px;">通知公告</h3></td>
  57. </tr>
  58. <tr>
  59. <td class="border bg_color" valign="top" style="line-height:1.3;">
  60. <p> 1、本页面认证使用深澜账号和密码,如深澜账号未激活,请点击此链接激活<a href='http://zizhu.nwpu.edu.cn:8900/active' target='__blank'>http://zizhu.nwpu.edu.cn:8900/active</a>,激活时初始密码为身份证号码后8位(如果有X为大写)<br /><br /> 2、激活后在此页面输入账号和密码可认证上网<br /><br /> 3、访客请点击“访客”按钮,输入邀请码认证上网<br /><br /></p>
  61. </td>
  62. </tr>
  63. <!-- <tr>-->
  64. <!-- <td class="downs bg_rgba">-->
  65. <!-- <h3>附件下载</h3>-->
  66. <!-- <ul class="clearfix">-->
  67. <!-- <li>-->
  68. <!-- <a href="files/校园网用户手册v1.1.doc"><i class="icon_w"></i>校园网用户手册</a>-->
  69. <!-- </li>-->
  70. <!-- </ul>-->
  71. <!-- </td>-->
  72. <!---->
  73. <!-- </tr>-->
  74. </table>
  75. </td>
  76. <td width="30"></td>
  77. <td valign="top">
  78. <table width="350" height="45" bgcolor="#444444" style="margin-top: 20px; display: none;" >
  79. <tr>
  80. <td align="center">
  81. <p style="color:white;font-weight:bold;" >网络准入认证系统</p>
  82. </td>
  83. </tr>
  84. </table>
  85.  
  86. <table width="400" height="260" class="login">
  87. <form name="form3" action="srun_portal_pc.php" method="post">
  88. <input type="hidden" name="action" value="auto_logout">
  89. <input type="hidden" name="info" value="">
  90. <input type="hidden" name="user_ip" value="10.26.87.247">
  91. <input type="hidden" name="username" value="2017262083">
  92. <tr>
  93. <td width="70">
  94. </td>
  95. <td valign="top">
  96. <table>
  97. <tr>
  98. <td height="40"></td>
  99. <td height="40" style="font-weight:bold;color:orange;">
  100. 网络已连接 </td>
  101. </tr>
  102. <tr>
  103. <td height="30" align="right" style="font-weight:bold;color:black;">用户名:</td>
  104. <td height="30">  <span id="user_name">2017262083</span></td>
  105. </tr>
  106. <tr>
  107. <td height="30" align="right" style="font-weight:bold;color:black;">IP地址:</td>
  108. <td height="30">  <span id="user_ip">10.26.87.247</span></td>
  109. </tr>
  110. <script language="javascript">
  111. setTimeout("get_online_info('10.26.87.247')", 2000);
  112. </script>
  113. <tr>
  114. <td colspan="2" height="30"></td>
  115. </tr>
  116. <tr>
  117. <td height="" colspan="2" style="font-weight:bold;color:black;">
  118. <input type="submit" value="注销" class="a a_demo_one"> 
  119. </td>
  120. </tr>
  121. </table>
  122. </table>
  123. </td>
  124. </tr>
  125. </form>
  126. </table>
  127. </td>
  128. </tr>
  129. </table>
  130. </div>
  131.  
  132. </body>
  133. </html>

  

  

 

其他网址;

2.发送POST登陆信息
这一步主要是想网络认证服务器发送认证信息获得上网权限.
公开wifi的web验证一般都至少两个信息(字段) username和password
<ignore_js_op> 
上图中点击一个对话框,右键Inspect (使用Chrome浏览器)或者直接F12开发者模式下区Element,目的是查看这两个要发送信息的字段名字,如下图
<ignore_js_op>

<ignore_js_op> 
a.找到 <form action="login" id="regform" method="post" autocomplete="off" title="Form used by registered users to login">
这是说明一个表单,注意method字段就好,大多是post,但是也可能为get,两种方式的数据传输是不一样的,需要不同的构造方式,本文以post为例,如果有遇到get情况可以融会贯通或者论坛求助.

b.上面图片其中蓝色的是输入信息的input(需要一点html的知识),
< input id="password" name="password" type="password" size="25" class="text" accesskey="p">
就是上面这样的,主要找到name的值,这是网页提交时候里面密码对应的字段,需要记下,同样要获得username的对应字段.

c.找到表单提交的网站(真的需要html知识),比如上图为https://securelogin.arubanetworks.com/cgi-bin/login   这个提交的网站和<form action="login" id="regform" method="post" autocomplete="off" title="Form used by registered users to login">里面的action字段有关系,说明提交到哪儿去. 但是并不能直接使用这个网址,因为还没有联网的权限没有dns服务器来给我们解析网址.可以ping或者其他的方式获得网址对应的ip (此处针对特殊情况提示,可能有的端口不是默认80,这种情况也需要了解端口号)

OK,至此我们需要了解abc三方面的信息.然后简单利用linux的curl命令来模拟我们的web登陆动作,实质就是把需要的数据发送过去.
以post为例子,命令
root@Atom:~# curl -k -d "user=yourusername&password=yourpassword"   172.24.12.239/cgi-bin/login
解释: 
curl 是一个程序
-k表示不接收加密(注意到web使用了https,正常需要openssh等加密解密,Atom安装openssh什么太麻烦且没有必要)
-d 表示data,也就是用post发送时候数据单独的,-d的后面data,字段间用&连接. 
"user=yourusername&password=yourpassword"为我们需要发送的数据,user即使我们在b里面获取的name的字段名字,password是密码的字段名字,=后面为你自己的信息,每一个都必须正确
172.24.12.239/cgi-bin/login  为我们信息提交的地址,在c步骤获取的,如果端口号不是80需要在ip后面加上:xxx,例如172.24.12.239:8080/cgi-bin/login

该命令发送完后,如果正常我们会收到认证成功后返回的信息(一般是一个网页,比如说认证成功3秒跳转xx之类),不用理会. 可以尝试连接网络测试.

WiFi-ESP8266入门http(3-2)网页认证上网-post请求的更多相关文章

  1. WiFi-ESP8266入门http(3-3)网页认证上网-post请求-ESP8266程序

    第一版 原型系统 连上西电的网 直接发送上网的认证信息 返回认证结果网页 成功上网 #include <ESP8266WiFi.h> #define Use_Serial Serial s ...

  2. WiFi-ESP8266入门http(3-1)网页认证上网-post请求(原教程)

    教程:http://geek-workshop.com/thread-37484-1-1.html 源码:链接:https://pan.baidu.com/s/1yuYYqsM-WSOb0AbyAT0 ...

  3. WiFi-ESP8266入门http(3-4)网页一键配网(1若为普通wifi直连 2若为西电网页认证自动网页post请求连接)+网页按钮灯控+MQTT通信

    网页一键配网(1若为普通wifi直连  2若为西电网页认证自动网页post请求连接)+网页按钮灯控+MQTT通信 工程连接:https://github.com/Dongvdong/ESP8266_H ...

  4. 我了解到的新知识之—Apple Captive Portal 网页认证登陆公共Wifi

    因为今天一个用户遇到选择公司WiFi后,无法弹出网页认证登陆界面的问题,随即上网搜索相关信息,因为公司内没有VPN,无法FQ,只能用bing来搜索一下相关信息了. Captive Portal听起来好 ...

  5. 6-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(Wi-Fi模块SSL连接MQTT)

    5-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(配置MQTT的SSL证书,验证安全通信) 首先确定自己的固件打开了SSL,升级篇里面的固件我打开了SSL,如 ...

  6. 5-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(配置MQTT的SSL证书,验证安全通信)

    4-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(为域名申请SSl证书) 前面的准备工作终于完了 复制这两个证书 放到云端MQTT的这个位置,其实放哪里都可以 ...

  7. 4-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(为域名申请SSl证书)

    3-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(购买域名,域名绑定IP) 然后就是等着..... 假设可以了 咱呢是配置MQTT实现SSL安全加密通信,所以 ...

  8. 3-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(购买域名,域名绑定IP)

    2-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(监听Wi-Fi和APP的数据) 因为安全连接是和域名绑在一块的,所以需要申请域名 有没有不知道域名是什么的, ...

  9. 2-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(监听Wi-Fi和APP的数据)

    1-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(来看一下怎么样监听网络数据,监听电脑上位机软件的数据) 因为那个软件只能监听咱自己电脑上的数据,所以咱就用电 ...

随机推荐

  1. 填一个laravel视图缓存没有及时更新的坑

    1.此坑背景 laravel在渲染blade模板后,会将渲染好的结果存到storage/framework/views(默认路径,也可在配置中修改的)中,以便下次使用.但我最近总是发现修改了blade ...

  2. C# 添加Windows服务,定时任务。

    源码下载地址:http://files.cnblogs.com/files/lanyubaicl/20160830Windows%E6%9C%8D%E5%8A%A1.zip 步骤 一 . 创建服务项目 ...

  3. js 中prototype运用(数组)

    转自:http://www.cnblogs.com/chiname/articles/216517.html(侵删)  /*   *  方法:Array.removeAt(Index)   *  功能 ...

  4. Django的URL路由系统

    一. URL配置 URL配置就像Django所支撑网站的目录.它的本质是URL与要为该URL调用的视图之间的映射表.你就是以这种方式告诉Django,对于哪个URL调用的这段代码. 基本格式 from ...

  5. js替换字符串中特殊字符

    var reg=/\\|\/|\?|\?|\*|\"|\“|\”|\'|\‘|\’|\<|\>|\{|\}|\[|\]|\[|\]|\:|\:|\.|\^|\$|\!|\~|\` ...

  6. python爬虫从入门到放弃(九)之 Requests+正则表达式爬取猫眼电影TOP100

    import requests from requests.exceptions import RequestException import re import json from multipro ...

  7. [转] Scala 中的异步事件处理

    在任何并发性应用程序中,异步事件处理都至关重要.无论事件的来源是什么(不同的计算任务.I/O 操作或与外部系统的交互),您的代码都必须跟踪事件,协调为响应它们而执行的操作.应用程序可以采用两种基本方法 ...

  8. java中的泛型与反射

    在java开发中,大多数情况是多人开发,那么如何在没有API的情况下,快速的理解到别人开发的一些类的详细信息呢? 比如函数名,类名,返回参数等等 我们可以定义一个反射机制的类,通过此类来打印此你想要操 ...

  9. [20190306]共享服务模式与SDU.txt

    [20190306]共享服务模式与SDU.txt --//一些文档提到共享服务模式,服务端SDU=65535,测试验证看看.--//链接:https://blogs.sap.com/2013/02/0 ...

  10. [20190212]删除tab$记录的恢复3.txt

    [20190212]删除tab$记录的恢复3.txt --//春节前几天做了删除tan$记录的测试,链接:http://blog.itpub.net/267265/viewspace-2565245/ ...