由 whz81 在 05-16-2003 12:03 发表:
电信宽带上网,fttx+lan,比较复杂,此法国内的宽带上网都可以了
在zest兄 放出铁桶上网之后,深受启发,但直接应用却不行,没有所提到的/queryPort.jsp?ip="+clientIp+"&newbl="+languagetype
相似的都没有,只好苦读index.jsp.htm(为什么是.htm,稍后再说),我靠,20KB,看了我个小时。
闲话不说,
1.用Teleport Pro,webzip,等离线浏览软件在windows下 把整个网站下下来,我的10.27.1.81/index.jsp,把一些不相关的文件去掉,当然你不去掉也行
2。对下载下来的index.jsp.htm修改,原文件index.jsp,下载后就变成index.jsp.htm,如下
1<html><!-- saved from url=(0022) http://internet.e-mail \-->
2<html>
3<head>
4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
5<title>Welcome to PortalServer</title>
6<script language="JavaScript" src="httpsurl.js" tppabs="http://10.27.1.81/httpsurl.js">
7</script>
8<script language="JavaScript">
9
10function modiPrompt(FORM)
11
12{
13
14with(FORM) {
15
16if (servicetype.selectedIndex==2)
17
18{
19
20id.value ="";
21
22id.style.background = "lightgrey";
23
24id.disabled = true;
25
26inputpassword.value = "";
27
28inputpassword.style.background = "lightgrey";
29
30inputpassword.disabled = true;
31
32
33
34}
35
36else
37
38{
39
40id.style.background = "white";
41
42id.disabled = false;
43
44inputpassword.style.background = "white";
45
46inputpassword.disabled = false;
47
48}
49
50}
51
52}
53
54
55
56
57
58function languageSelect()
59
60{
61
62var i=window.document.fm0.languagetype.value;
63
64window.parent.location.href="index.jsp-newbl=.htm"/*tpa=http://10.27.1.81/index.jsp?newbl=*/+i;
65
66}
67
68
69
70var ifwait=false;
71
72function iwait(t){
73
74if(ifwait==true){
75
76return true;
77
78}else{
79
80ifwait=true;
81
82window.setTimeout("ifwait=false;",t);
83
84return false;
85
86}
87
88}
89
90
91
92function ipvalue()
93
94{
95
96//zhaihuachun IT13PT-276-E12206 2002-08-29 begin
97
98window.document.fm0.ip.value = '218.94.51.98' ; //这句改为你现在的ip,注意不要少了分号
99
100
101
102//PortalClient.localIP;
103
104if (((window.document.fm0.ip.value).toLowerCase()=="undefined")||(window.document.fm0.ip.value=="")) {
105
106window.open("ipError.jsp.htm"/*tpa=http://10.27.1.81/ipError.jsp*/,"控件下载","width=500,height=350,top=100,left=300,toolbar=1,location=1,directories=1,menubar=1,scrollbars=1,resizable=1");
107
108return false;
109
110}
111
112//zhaihuachun IT13PT-276-E12206 2002-08-29 end
113
114return true;
115
116}
117
118
119
120
121
122function pwdcode(moreFlag)
123
124{
125
126var iw=iwait(5000);
127
128if(iw) return false;
129
130if(check(moreFlag))
131
132{
133
134//var url=gethttpsurl();
135
136//url=url.substring(url.indexOf('//'));
137
138url='10.27.1.81';
139
140pswd=window.document.fm0.inputpassword.value;
141
142service_type=window.document.fm0.servicetype.value;
143
144if (ipvalue())
145
146{
147
148if(pswd!="") window.document.fm0.password.value = pswd;
149
150window.document.fm0.action='https:// 10.27.1.81 /servlet/scpservlet.UserDataReqLoginServlet';//这句,直接把url改成真实ip,
151
152var Then = new Date()
153
154Then.setTime(Then.getTime() + 60*1000*60*24*365 ) //60秒
155
156if (window.document.fm0.saveflag.checked)
157
158{
159
160document.cookie = "username="+window.document.fm0.id.value+";expires="+ Then.toGMTString() ;
161
162document.cookie = "password="+window.document.fm0.password.value+";expires="+ Then.toGMTString() ;
163
164document.cookie = "saveflag=1;expires="+ Then.toGMTString() ;
165
166}
167
168else
169
170{
171
172document.cookie = "username="+window.document.fm0.id.value+";expires="+ Then.toGMTString() ;
173
174document.cookie = "password="+""+";expires="+ Then.toGMTString() ;
175
176document.cookie = "saveflag=0;expires="+ Then.toGMTString() ;
177
178}
179
180return true;
181
182}
183
184}
185
186return false;
187
188}
189
190
191
192function close_online()
193
194{
195
196var url=gethttpsurl();
197
198url=url.substring(0, url.length-10);
199
200window.fm0.action=url+"/servlet/scpservlet.CloseReqServlet";
201
202return true;
203
204}
205
206
207
208</script>
209<script language="JavaScript" src="eg20.js" tppabs="http://10.27.1.81/eportalserver/eg20.js"></script>
210</head>
211<body background="" bgcolor="">
212<center>
213<div style="visibility:hidden">
214<object classid="clsid:817C90B5-1688-42BE-9044-58422DB088B2" codebase="http://10.27.1.81:80/PortalAX.cab#version=1,0,0,8" height="10" id="PortalClient" width="10">
215<param name="httpPrefix" tppabs="http://10.27.1.81/" value="index.htm"/>
216<param name="httpsPrefix" tppabs="https://10.27.1.81/" value="index-1.htm"/>
217<param name="LogEnabled" value="false"/>
218</object>
219</div>
220<script language="javascript">
221
222PortalClient.init_var();
223
224</script>
225<table align="center" bgcolor="#FFFFFF" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumbe1" style="border-collapse: collapse" width="770">
226<tr>
227<td align="center" width="100%">
228<html>
229<head>
230<meta content="zh-cn" http-equiv="Content-Language"/>
231<meta content="Microsoft FrontPage 4.0" name="GENERATOR"/>
232<meta content="FrontPage.Editor.Document" name="ProgId"/>
233<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
234<title>新建网页 1</title>
235<style type="text/css">
236
237<!--
238
239A:link {text-decoration: none; font-size:9pt}
240
241A:visited {text-decoration: none; font-size:9pt}
242
243A:active {text-decoration: none; font-size:9pt}
244
245A:hover {text-decoration:none;color:#000080}body, table {font-size: 9pt}tr, td{font-size:9pt}
246
247a:link.news3 {COLOR: #0000ff; TEXT-DECORATION: none}
248
249\-->
250
251.d{FONT-SIZE: 8pt; color:#FFFF00;}
252
253.c{FONT-SIZE: 10.5pt;TEXT-DECORATION: none;}
254
255.e{FONT-SIZE: 10.5pt;font-family: Times New Roman;TEXT-DECORATION: none;}
256
257</style></head>
258<body alink="#000000" leftmargin="0" link="#000000" topmargin="0" vlink="#000000">
259<table align="center" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse" width="760">
260<tr>
261<td height="40" width="100%">
262<a href="java script:if(confirm('http://www.supernj.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.supernj.com/'" target="_parent" tppabs="http://www.supernj.com/"><img border="0" height="40" src="logo.gif" tppabs="http://10.27.1.81/homepage/img/logo.gif" width="60"/></a><img border="0" height="40" src="top1.gif" tppabs="http://10.27.1.81/homepage/img/top1.gif" width="300"/></td>
263</tr>
264<tr>
265<td bgcolor="#0066CC" height="20" style="color: #FFFFFF; font-size: 9pt; font-weight: bold" width="100%"> 南京电信欢迎您;今天是:<script language="JavaScript">
266
267<!--
268
269tmpDate = new Date();
270
271date = tmpDate.getDate();
272
273month= tmpDate.getMonth() + 1 ;
274
275year= tmpDate.getYear();
276
277document.write(year);
278
279document.write("年");
280
281document.write(month);
282
283document.write("月");
284
285document.write(date);
286
287document.write("日");
288
289
290
291// -->
292
293</script> <a href="java script:if(confirm('http://www.jlonline.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.jlonline.com/'" target="_parent" tppabs="http://www.jlonline.com/"><font color="FFFFF">金陵热线</font></a> <a href="java script:if(confirm('http://www.990.net/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.990.net/'" target="_parent" tppabs="http://www.990.net/"><font color="FFFFF">990</font></a> <a href="java script:if(confirm('http://www.supernj.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.supernj.com/'" target="_parent" tppabs="http://www.supernj.com/"><font color="FFFFF">超级金陵热线</font></a>
294</td>
295</tr>
296<tr>
297<td height="1" width="100%"></td>
298</tr>
299<tr>
300<td bgcolor="#33CC33" height="4" width="100%"></td>
301</tr>
302</table>
303<table align="center" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber2" style="border-collapse: collapse" width="760">
304<tr>
305<td valign="top" width="320">
306<p align="center">
307<a href="java script:if(confirm('http://202.102.24.5/ad/entmail.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://202.102.24.5/ad/entmail.htm'" target="_blank" tppabs="http://202.102.24.5/ad/entmail.htm">
308<img border="0" height="180" src="headline2.jpg" tppabs="http://10.27.1.81/homepage/img/headline2.jpg" width="320"/></a></p></td>
309<td valign="top" width="10">
310</td>
311<td line-height:150%"="" style="line-height: 150%" valign="top" width="430">
312<br/>
313<span lang="en-us"> <b>尊敬的宽带用户:</b><br/>
314</span>
315<span lang="en-us">
316
317南京电信为向您提供更优质的服务,将于12月7日2:00—12:00对西家大塘地区的宽带网络进行优化。工程完工后,本地区的宽带网(FTTX+LAN方式)用户上网时,将不再使用静态IP地址,改用WEB认证方式登录,用户需要在控制面板的网络设置中将原来的“指定IP地址”改为“动态获取IP地址”。如果用户仍有不清楚的地方,我公司还有以下两种方式通知:1)通过1000号通知用户新的上网账号和密码;2)给用户分发新的上网说明书,请用户注意收听和查阅。用户也可以通过拨打1000号查询上网账号和密码。<br/>
318</span>
319<br/>
320<br/>
321<b>南京电信分公司多媒体局</b></td>
322</tr>
323</table>
324<table align="center" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="760">
325<tr>
326<td bgcolor="#999999" height="24" width="100%"><b><font color="#FFFFFF">
327
328活动通知:</font></b></td>
329</tr>
330<tr>
331<td height="1" width="100%"></td>
332</tr>
333</table>
334<table align="center" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber4" style="border-collapse: collapse" width="760">
335<tr>
336<td height="100" width="100%"><iframe align="center" frameborder="0" height="100" marginheight="0" marginwidth="0" name="products" scrolling="no" src="intro.html" tppabs="http://10.27.1.81/homepage/intro.html" width="760"></iframe></td>
337</tr>
338</table>
339</body>
340</html>
341</td>
342</tr>
343</table>
344<div id="Layer1" style="HEIGHT: 48px; LEFT: 200px; POSITION: absolute; TOP: 100px; WIDTH: 660px; Z-INDEX: 3">
345<table border="0" height="33" width="70%">
346<tbody>
347<tr>
348<td width="30%">
349</td>
350<td width="30%">
351</td>
352<td width="40%">
353</td>
354</tr>
355</tbody>
356</table></div>
357<table align="center" bgcolor="#33CC33" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber2" style="border-collapse: collapse" width="770">
358<form method="post" name="fm0" target="_parent">
359<tr style="font-size: 9pt">
360<td align="center" nowrap="" style="font-size: 9pt" width="100%">
361<font color="#FFFFFF"><b>Account</b></font><input maxlength="32" name="id" size="12" title="please input your account number" type="text" value=" abc "/> //请把用户名填好
362
363<font color="#FFFFFF"><b>Password</b></font><input maxlength="16" name="inputpassword" size="10" title="please input your password" type="password" value=" 1234567 "/> ////请把密码填好
364
365<input name="saveflag" type="checkbox" value="1"/>RememberPassword
366
367<font color="#FFFFFF"><b>Language</b></font>
368<select name="languagetype" onchange="languageSelect(); ">
369<option value="1"> 中文 </option>
370<option selected="" value="0"> English </option>
371</select>
372<input name="Submit" onclick="return pwdcode(0)" type="submit" value="Login"/>
373</td>
374</tr>
375<tr>
376<td bgcolor="#FFFFFF" height="1" style="line-height: 150%" width="100%">
377<input name="ip" type="hidden"/>
378<input name="ClientIP" type="hidden"/>
379<input name="servicetype" type="hidden" value="201+"/>
380<input name="ipmode" type="hidden" value="1"/>
381<input maxlength="16" name="password" size="23" title="Hidden Encrypt Password!" type="hidden" value=""/>
382<input name="LocalIP" type="hidden" value=""/>
383</td>
384</tr>
385</form>
386</table>
387<table align="center" bgcolor="#5555ff" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="790">
388<tr style="font-size: 9pt">
389<td>
390<img height="5" src="" width="0"/><br/>
391<font color="#dddddd">
392
3931.To give you more securites, please setup
394
395<a href="ca.crt" style="color: #ffff00; font-size: 13; text-decoration: none" target="_blank" tppabs="http://10.27.1.81/ca.crt">“Certificate”</a>,If you have any other problems, please see
396
397<a href="ssl_help.html" style="color: #ffff00; font-size: 13; text-decoration: none" tppabs="http://10.27.1.81/template/ssl_help.html">“Setup Guide”。</a><br/>
398
3992.If your browser is abnormal,<a href="ielpkzhc.exe" style="color: #ffff00; font-size: 13; text-decoration: none" target="_blank" tppabs="http://10.27.1.81/ielpkzhc.exe"> Please setup Chinese Language Package。</a><br/>
400<div align="center">The IE4.0 or higher navigator version is recommended.Copyright © 2001 by Huawei Technologies Co., Ltd. All Rights Reserved。</div>
401</font>
402</td>
403</tr>
404</table>
405</center>
406<script language="javascript">
407
408fm0.servicetype.selectedIndex=0;
409
410</script>
411</body>
412</html>
413
414
415
416
417
418
419
420
421
422
423
424
425
4263。改完后就可以上网了,可能有人会问ip变了怎么办,我用到现在还没有变过,除了操座系统不同,还是附一份自动改ip 的东西,
427
428这份程序有zest兄提供,但需要改一点,大家可以去看 http://www.linuxsir.com/bbs/showthr...2329#post212329
429
430
431
432#!/bin/bash
433
434#dhclient eth0 //如果开机启用了dhcp就不用这一行了
435
436OLDIP=`grep "window.document.fm0.ip.value " /mnt/f:/Untitled/index.jsp.htm|sed "s/^ *//"|sed "s/ /'/g"|cut -f4 -d'` //前面的index.jsp.htm加绝对地址,你下载到什么文件夹
437
438MYIP=`ifconfig eth0|grep inet|sed 's/^ *//'|sed 's/ /:/g'|cut -f3 -d:`
439
440echo $OLDIP
441
442echo $MYIP
443
444cat /mnt/f:/Untitled/index.jsp.htm|sed s/$OLDIP/$MYIP/> /mnt/f:/Untitled/index.tmp //同样加绝对地址
445
446mv /mnt/f:/Untitled/index.tmp /mnt/f:/Untitled/index.jsp.htm
447
448
449
450konqueror index.jsp.htm //自动运行网页,必须有konqueror
451
452
453
454
455
456把文件存盘后,chmod -x 文件名
457
458
459
460文件名改为.sh后缀,就可以直接点击执行,以上内容可能和你的不径相同,请准照实际情况修改,
461
462
463
464请大家尊重zest兄和我的劳动成果,转载请注明
465
466abc
467
468
469
470
471* * *
472
473
474_由 藕节 在 08-07-2003 11:13 发表:_
475
476
477
478****
479
480
481
482
483
484我们用的是联创的设备,登陆页面 http://218.3.216.18
485
486验证地址: https://218.3.216.18:8443/examples/servlet/Validate
487
488请问这样怎么通过验证上网呀
489
490
491
492
493* * *
494
495
496_由 藕节 在 08-07-2003 11:16 发表:_
497
498
499
500****
501
502
503
504
505
506看了一下,好象有个 https://218.3.216.18:8443/examples/...idate/index.jsp ,这个就是验证页面了
507
508
509
510
511* * *
512
513
514_由 藕节 在 08-07-2003 16:19 发表:_
515
516
517
518****
519
520
521
522
523
524jsp 文件搞不下来,teleport和webzip都用过了
525
526
527
528Thu Aug 07 16:18:21 2003 正在连接 218.3.216.18 [IP=218.3.216.18:8443]
529
530Thu Aug 07 16:18:21 2003 GET /examples/servlet/Validate/index.jsp HTTP/1.1
531
532Thu Aug 07 16:18:21 2003 Host: 218.3.216.18
533
534Thu Aug 07 16:18:21 2003 Accept: */*
535
536Thu Aug 07 16:18:21 2003 Referer: https://218.3.216.18:8443/examples/servlet/Validate
537
538Thu Aug 07 16:18:21 2003 User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)
539
540Thu Aug 07 16:18:21 2003 Pragma: no-cache
541
542Thu Aug 07 16:18:21 2003 Cache-Control: no-cache
543
544Thu Aug 07 16:18:21 2003 Connection: close
545
546Thu Aug 07 16:18:21 2003 证书作者无效或不正确
547
548
549
550Thu Aug 07 16:18:21 2003 等待 5秒后重试
551
552Thu Aug 07 16:18:27 2003 正在连接 218.3.216.18 [IP=218.3.216.18:8443]
553
554Thu Aug 07 16:18:27 2003 GET /examples/servlet/Validate/index.jsp HTTP/1.1
555
556Thu Aug 07 16:18:27 2003 Host: 218.3.216.18
557
558Thu Aug 07 16:18:27 2003 Accept: */*
559
560Thu Aug 07 16:18:27 2003 Referer: https://218.3.216.18:8443/examples/servlet/Validate
561
562Thu Aug 07 16:18:27 2003 User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)
563
564Thu Aug 07 16:18:27 2003 Pragma: no-cache
565
566Thu Aug 07 16:18:27 2003 Cache-Control: no-cache
567
568Thu Aug 07 16:18:27 2003 Connection: close
569
570Thu Aug 07 16:18:27 2003 证书作者无效或不正确
571
572
573
574Thu Aug 07 16:18:27 2003 等待 5秒后重试
575
576Thu Aug 07 16:18:32 2003 正在连接 218.3.216.18 [IP=218.3.216.18:8443]
577
578Thu Aug 07 16:18:32 2003 GET /examples/servlet/Validate/index.jsp HTTP/1.1
579
580Thu Aug 07 16:18:32 2003 Host: 218.3.216.18
581
582Thu Aug 07 16:18:32 2003 Accept: */*
583
584Thu Aug 07 16:18:32 2003 Referer: https://218.3.216.18:8443/examples/servlet/Validate
585
586Thu Aug 07 16:18:32 2003 User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)
587
588Thu Aug 07 16:18:32 2003 Pragma: no-cache
589
590Thu Aug 07 16:18:32 2003 Cache-Control: no-cache
591
592Thu Aug 07 16:18:32 2003 Connection: close
593
594Thu Aug 07 16:18:32 2003 证书作者无效或不正确
595
596
597
598
599* * *
600
601
602_由 zest 在 08-07-2003 16:46 发表:_
603
604
605
606****
607
608
609
610
611
612看看这个:
613
614http://linuxsir.com/postnuke/module...r=0&thold=0
615
616用方法5
617
618试试用 curl 的脚本,先不考虑 keep-alive 的情况
619
620应该比较简单。
621
622
623
624
625* * *
626
627
628_由 藕节 在 08-07-2003 17:01 发表:_
629
630
631
632****
633
634
635
636
637
638我们这儿就需要keep-alive
639
640
641
642
643* * *
644
645
646_由 zest 在 08-07-2003 17:18 发表:_
647
648
649
650****
651
652
653
654
655
656需要按方法5分析keep-alive 包的内容,然后按照它的内容修改脚本。
657
658
659
660
661* * *
662
663
664_由 藕节 在 08-07-2003 17:31 发表:_
665
666
667
668****
669
670
671
672
673
674看来得花些时间了,要不你帮帮忙看看,我们的认证页面是哪儿都能访问的。万分感激
675
676
677
678
679* * *
680
681
682_由 zest 在 08-07-2003 17:49 发表:_
683
684
685
686****
687
688
689
690
691
692但是keep-alive 包的内容我无法得到
693
694
695
696至少应该先连通,你可以先做联接脚本:
697
698
699
700>
701> 源码:
702>
703> * * *
704>
705>
706> >
707> #!/bin/bash
708> >
709> UN=你的用户名
710> >
711> PW=你的口令
712> >
713>
714> >
715> curl --trace trace.txt -A 'Mozilla' -d "username=$UN&password=$PW" https://218.3.216.18:8443/examples/servlet/Validate
716> >
717>
718> >
719>
720>
721> * * *
722
723
724
725当然 curl 得先装上
726
727
728
729
730* * *
731
732
733_由 藕节 在 08-07-2003 22:29 发表:_
734
735
736
737****
738
739
740
741
742
743看来我得回去之后才能实验了,到时候再请教吧,我现在在外地实习,过几天就回,谢了先
744
745
746
747
748* * *
749
750
751_由 藕节 在 08-16-2003 17:17 发表:_
752
753
754
755****
756
757
758
759
760
761我已经按照你的提示试了一下
762
763trace.txt见附件
764
765
766
767终端得到的信息如下:
768
769<html>
770<head>
771<title>联创宽带_用户登陆<title>
772<stytle>
773
774body{font-size:9pt}
775
776<style></style></stytle></title></title></head></html></html>