- 【更新日志】
--V1.1新添了 紫霞->水木社区 的福音理论上解决了偶尔会在好友列表卡住的问题(因受Fterm接口的制约,实际效果由网络速度决定)
--V1.0每天都要手动从Zixia穿梭到Free,实在太烦,不能忍了试试这个吧:【穿梭福音: 紫霞->自由空间】,刚写的用法很简单:
0. 先改脚本里的user和pass,保存(只做一次)1. 然后开Fterm
2. 然后通过Fterm的菜单运行这个脚本
3. 然后用SSH方式登录bbs.zixia.net,手动/自动登录皆可(一定要SSH,一定用域名登)
然后.....Wait & See运行一次,以后多次登录均有效(如在好友列表卡住,先按回车再按左箭头皆可)
-
【脚本源代码】
'==================================================================================
' <Transevangel -- ZIXIA 2 FREE> Auto Proxy script for Fterm
' By AyuanX, July 2007
' Version 1.1
' Report Bugs to <ayuanx$163!com>
'==================================================================================
' Q: Why do we need it?
' A:
' Because it is in pain that we find the meaning of life.
' And the state of grace that we lose when we sway.
'==================================================================================
' Q: How do we use it?
' A:
' 0. Set up your preference(user & pass) below
' 1. Run this script from Fterm menu
' 2. Login ZIXIA by domain name in SSH
' PS: a) Telnet is not supported yet, maybe in future version
' b) Domain name must contain "ZIXIA"(ingnore case), IP login is not supported yet
' c) Currently the script is far from perfect, so you're on your own risk!
'=================================================================================
' Q: What's new in V1.1?
' A:
' Solved the freezing problem at Friends Online Interface
'=================================================================================
user="AyuanX" '== Your ID of Free NOT Zixia
pass="whosgonnabemybaby" '== Sorry but we have to show our love in PLAIN language
Const delay=10 '== Oh yeah, World Wide Waiting (in millisecond)
Const tag="欢迎您使用ssh方式访问" '== I'm sure you will neither suicide nor modify this
'==================================================================================
Function waitandact(wid, line, char, key)
If IsNull(char) Then
Dim buf(22)
For j=0 To 22
buf(j)=FTerm.Windows(wid).GetBuffer(j)
Next
FTerm.Windows(wid).SendConvertedData(key)
k=0
Do
FTerm.Delay(delay)
For j=0 To 22
k=k+Abs(StrComp(buf(j), FTerm.Windows(wid).GetBuffer(j)))
Next
Loop until k
Else
buf=FTerm.Windows(wid).GetBuffer(line)
If InStr(1, buf, char, 0) Then
FTerm.Windows(wid).SendConvertedData(key)
Do
FTerm.Delay(delay)
buff=FTerm.Windows(wid).GetBuffer(line)
Loop until StrComp(buf, buff)
waitandact=True
Else
waitandact=False
End If
End If
End Function
flag=True
Sub FTerm_OnDataCome(wid, data)
If flag Then
If InStr(1, LCase(FTerm.Windows(wid).HostAddress), "zixia", 1) Then
If InStr(1, data, tag, 0) Then
On Error Resume Next
flag=False
FTerm.Delay(delay)
call waitandact(wid, 22, Null, "^M")
For j=0 To 10 'To avoid dead lock
If waitandact(wid, 0, "主选单", "z^Mb^Mf^M") Then
Exit For
Else
If waitandact(wid, 0, "好朋友列表", "^[[D") Then
Else
call waitandact(wid, 0, Null, "^[[D")
End If
End If
Next
FTerm.Delay(delay)
call waitandact(wid, 22, Null, user&"^M"&pass&"^M^M")
For j=0 To 10 'To avoid dead lock
If waitandact(wid, 0, "自由空间", "^[[Df^M") Then
Exit For
Else
call waitandact(wid, 0, Null, "^[[D")
End If
Next
flag=True
End If
End If
End If
End Sub
'==================================================================================
' Run just one time and forever auto proxy!
'==================================================================================
'==================================================================================
' <Transevangel -- ZIXIA 2 NEWSMTH> Auto Proxy script for Fterm
' By AyuanX, July 2007
' Version 1.1
' Report Bugs to <ayuanx$163!com>
'==================================================================================
' Q: Why do we need it?
' A:
' Because it is in pain that we find the meaning of life.
' And the state of grace that we lose when we sway.
'==================================================================================
' Q: How do we use it?
' A:
' 0. Set up your preference(user & pass) below
' 1. Run this script from Fterm menu
' 2. Login ZIXIA by domain name in SSH
' PS: a) Telnet is not supported yet, maybe in future version
' b) Domain name must contain "ZIXIA"(ingnore case), IP login is not supported yet
' c) Currently the script is far from perfect, so you're on your own risk!
'=================================================================================
' Q: What's new in V1.1?
' A:
' Solved the freezing problem at Friends Online Interface
'=================================================================================
user="AyuanX" '== Your ID of Free NOT Zixia
pass="whosgonnabemybaby" '== Sorry but we have to show our love in PLAIN language
Const delay=10 '== Oh yeah, World Wide Waiting (in millisecond)
Const tag="欢迎您使用ssh方式访问" '== I'm sure you will neither suicide nor modify this
'==================================================================================
Function waitandact(wid, line, char, key)
If IsNull(char) Then
Dim buf(22)
For j=0 To 22
buf(j)=FTerm.Windows(wid).GetBuffer(j)
Next
FTerm.Windows(wid).SendConvertedData(key)
k=0
Do
FTerm.Delay(delay)
For j=0 To 22
k=k+Abs(StrComp(buf(j), FTerm.Windows(wid).GetBuffer(j)))
Next
Loop until k
Else
buf=FTerm.Windows(wid).GetBuffer(line)
If InStr(1, buf, char, 0) Then
FTerm.Windows(wid).SendConvertedData(key)
Do
FTerm.Delay(delay)
buff=FTerm.Windows(wid).GetBuffer(line)
Loop until StrComp(buf, buff)
waitandact=True
Else
waitandact=False
End If
End If
End Function
flag=True
Sub FTerm_OnDataCome(wid, data)
If flag Then
If InStr(1, LCase(FTerm.Windows(wid).HostAddress), "zixia", 1) Then
If InStr(1, data, tag, 0) Then
On Error Resume Next
flag=False
FTerm.Delay(delay)
call waitandact(wid, 22, Null, "^M")
For j=0 To 10 'To avoid dead lock
If waitandact(wid, 0, "主选单", "z^Mb^Mc^M") Then
Exit For
Else
If waitandact(wid, 0, "好朋友列表", "^[[D") Then
Else
call waitandact(wid, 0, Null, "^[[D")
End If
End If
Next
FTerm.Delay(delay)
call waitandact(wid, 22, Null, user&"^M"&pass&"^M^M")
For j=0 To 10 'To avoid dead lock
If waitandact(wid, 0, "水木社区", "^[[Df^M") Then
Exit For
Else
call waitandact(wid, 0, Null, "^[[D")
End If
Next
flag=True
End If
End If
End If
End Sub
'==================================================================================
' Run just one time and forever auto proxy!
'==================================================================================url : http://ayuanx.spaces.live.com/blog/cns!1870FA594F47FA92!869.entry