yuenwei 发表于 2011-11-23 00:57:27

RG100A-BA终于可以设置FTP服务器的用户名 密码和端口啦

RG100A-BA终于可以设置FTP服务器的用户名 密码和端口啦

先说一下我在论坛求了好多天都没高手理我...............哎

自已动手丰衣足食终于搞迨

好东西要大家分享

知道的就不要看了,因为你们知道却不分享出来太吝啬了

下面是用firebug查到的代码,大家猜猜看是第几行,很简单的.(因为论坛直接发网址要版主审核的.所以........)

<script language="javascript">
1
2<!-- hide
3
4var obj1Items = '0}-{ftpadmin}-{ftpadmin}-{21}-{0}-{telnetadmin}-{telnetadmin}-{23}-{|,|FtpEnable}-{FtpUserName}-{FtpPassword}-{FtpPort}-{TelnetEnable}-{TelnetUserName}-{TelnetPassword}-{TelnetPort}-{|,|';
5var downloadinfo = '0|';
6var usblist = '';
7var obj1Cols = numOfCol(obj1Items);
8/* NOTICE: MDMOID_SERVICE_MANAGE is Type0 object, follow variables are single value */
9var ftpEnable = getValueFromList(obj1Items, 0);
10
11
12var list = usblist.split("|");
13var lenth = downloadinfo.split("|");
14var downloadstatus = lenth;
15function btnFtpcfg() {
16
17 var loc = 'ftpcfg.html';
18
19 var code = 'location="' + loc + '"';
20
21 eval(code);
22
23}
24
25function btnRefrech(){
26var loc = 'usbxdown.html';
27
28 var code = 'location="' + loc + '"';
29
30 eval(code);
31}
32
33function toUtf8(code)
34
35{
36
37 var iByte=0;
38
39 var i=0;
40
41 result="";
42
43 while(code > 0x7f)
44
45 {
46
47 iByte=code%0x40;
48
49 code=(code-iByte)/0x40;
50
51 result="%"+(iByte|0x80).toString(16).toUpperCase()+result;
52
53 i++;
54
55 }
56
57 prefix=;
58
59 if(i>prefix.length)
60
61 {
62
63 i=5;
64
65 }
66
67 result="%"+(code|prefix).toString(16).toUpperCase()+result;
68
69 return result;
70
71}
72
73function chr2Unicode(str)
74
75{
76
77 if ('' != str) {
78
79 var st, t, i;
80
81 st = '';
82
83 for (i = 1; i <= str.length; i ++){
84
85 t = str.charCodeAt(i - 1).toString(16);
86
87 if (t.length < 4)
88
89 while(t.length <4)
90
91 t = '0'.concat(t);
92
93 t = t.slice(0, 2).concat(t.slice(2, 4))
94
95 st = st.concat(t);
96
97 }
98
99 return('0x' + st.toUpperCase());
100
101 }
102
103 else {
104
105 return('');
106
107 }
108
109}
110
111function GB2312toUTF_8(str)
112
113{
114
115 if(str.charAt(0)=='f' && str.charAt(1)=='t' && str.charAt(2) == 'p')
116
117 return str;
118
119 var result = "";
120
121 for(var i=0; i<str.length; i++)
122
123 {
124
125 var uni = chr2Unicode(str.charAt(i));
126
127 if(uni <= 0x7f)
128
129 result = result + str.charAt(i);
130
131 else
132
133 result = result + toUtf8(uni);
134
135 }
136
137 return result;
138
139}
140
141function getfilename(str)
142
143{
144
145 var result = "";
146
147 for(var i=str.length-1; i>=0; i--)
148
149 {
150
151 if(str.charAt(i) == '/' || str.charAt(i) == '\\')
152
153 {
154
155 result = str.substr(i+1, str.length-i-1);
156
157 break;
158
159 }
160
161 }
162
163 return result;
164
165}
166
167
168function avaidftpurl(str)
169{
170
171 var t = 0,q = 0;
172 if(str.charAt(0)!='f' || str.charAt(1)!='t' || str.charAt(2) != 'p'
173 || str.charAt(3)!=':' || str.charAt(4) != '/'|| str.charAt(5) != '/')
174 {
175 return false;
176 }
177
178 for(var i=0; i< str.length-1; i++)
179 {
180
181 if(str.charAt(i) == '/' )
182 {
183 t++;
184 }
185
186 if(str.charAt(i) == ':' )
187 {
188 q++;
189 }
190 }
191
192 if(t < 3)
193 return false;
194 if(q != 1)
195 return false;
196
197 return true;
198
199}
200
201function btnApply()
202{
203 with ( document.forms ) {
204 if(username.value == '')
205 {
206 alert("用户名不能为空");
207 return;
208 }
209 if(password.value == '')
210 {
211 alert("密码不能为空");
212 return;
213 }
214 if(port.value == '')
215 {
216 alert("端口号不能为空");
217 return;
218 }
219 if(port.value < 0 ||port.value >65535)
220 {
221 alert("端口号必须在0--65535范围内");
222 return;
223 }
224 if(remoteUrl.value == '')
225 {
226 alert("Url不能为空");
227 return;
228 }
229
230 if(!avaidftpurl(remoteUrl.value))
231 {
232 alert("Url错误,必须是ftp://xxx/filename的格式");
233 return;
234 }
235
236 var loc = 'usbxdown.cmd?action=add&';
237 loc += 'localdev=' + devpathlist.value;
238 var result = GB2312toUTF_8(remoteUrl.value);
239 loc += '&remoteUrl=' + result;
240 var filename = getfilename(remoteUrl.value);
241 loc += '&filename=' + filename;
242 if(username.value == '') username.value='anonymous';
243 loc += '&username=' + username.value;
244 loc += '&password=' + password.value;
245 loc += '&port=' + port.value;
246}
247var code = 'location="' + loc + '"';
248eval(code);
249}
250
251function frmLoad() {
252 with ( document.forms ) {
253
254 }
255}
256// done hiding -->

yuenwei 发表于 2011-11-23 15:03:40

另附用IE打开FTP的方法(用IE打开不直观 乱码或用软件嫌麻烦的请看)

1、打开IE8浏览器(我的系统是WIN7 32),在“菜单栏”——“工具”——“Internet 选项” ——“高级”,找到 “启用 FTP 文件夹视图 (在InternetExplorer之外)”勾选,再找到 “使用被动FTP(为防火墙和DSL调制解调器兼容性)” 去掉勾选, 然后单击 确定,关闭浏览器。

2、再修改注册表,点击开始菜单,选择运行,输入 regedit 点击确定,进入注册表,依次选择HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_INTERNET_SHELL_FOLDERS 注册表项, 将 iexplorer.exe 项的值由0改为1。打开IE直接在地址栏输入RG100A-BA的FTP地址,即可打开RG100A-BA上的U盘了。

kiwso 发表于 2011-12-8 20:40:17

谢谢楼主,我试过了,可以用的。
但是楼主,这样开了FTP后有什么用处呢?能不能举例说明下啊,小弟不才。

高级管理密码你有什么办法破解没有啊,我需要这个。

yuenwei 发表于 2011-12-9 13:41:12

kiwso 发表于 2011-12-8 20:40 static/image/common/back.gif
谢谢楼主,我试过了,可以用的。
但是楼主,这样开了FTP后有什么用处呢?能不能举例说明下啊,小弟不才。
...

简单来说就是一个共享服务器,你可以上传文件到FTP服务器,也可以从FTP服务器下载文件,文件是由FTP服务器存储的,一般公司应用的比较多.

关于高级管理员密码你可以多看看论坛里的帖子,或用下面的这个软件也可以

kiwso 发表于 2012-2-23 21:58:05

谢谢楼主分享,工具还没有来的及用,现在家里的宽带已经上光纤的了
不过还是很感谢。

wrthzy 发表于 2012-12-2 22:59:13

a菜鸟 发表于 2013-1-14 15:10:46

哥们麻烦做个教程我的无线猫也是RG100A-BA这个型号的

mydust 发表于 2013-1-14 19:55:35

附件下载不下下来

a菜鸟 发表于 2013-1-15 14:05:21

楼主 上线了可以联系一下吗??帮忙一下 小弟也想把这个无线猫搞成FTP

a菜鸟 发表于 2013-1-15 20:45:51

楼主赶紧出现吧等您帮忙呢
页: [1] 2
查看完整版本: RG100A-BA终于可以设置FTP服务器的用户名 密码和端口啦