- 帖子
- 295
- 积分
- 1142
- 技术
- 2
- 捐助
- 0
- 注册时间
- 2008-2-4
|
hta版连接地址转换——转我朋友的代码
- <script>
- window.onerror=killerror
- function killerror(){
- return true
- }
- window.onload=ini
- function ini(){
- var x=520;y=270
- window.resizeTo(x,y)
- document.title="链接转换工具 - Made By oiioooiiii"
- }
- function paste(){
- in_add.value=window.clipboardData.getData("text")
- }
- function copy(){
- window.clipboardData.setData("text",out_add.value)
- }
- function load(){
- window.open(out_add.value)
- }
- function reset(){
- in_add.value=""
- out_add.value=""
- xtp.click()
- }
-
- </script>
-
- <style>
- body{background:#f0f0f0;}
- *{font-size:13;cursor:default;}
- a{color:#177cb0;}
- a:visited{color:#177cb0;}
- a:hover{color:#25f8cb;cursor:hand;}
- </style>
- <body scroll="no" topMargin="10" oncontextmenu="return false">
- <table border width="100%" cellspacing=0 cellpadding=3>
- <tr><td>
- 请输入需要转换的地址(双击编辑框即可粘贴):
-
-
- <input id="in_add" style="width:60%;" ondblclick=paste()>
- <input type="button" value=" 转 换 " id="ok" onclick="sub()">
-
- <input type="button" value=" 粘 贴 " onclick="paste()">
- <div>
-
- 转换后的地址(双击编辑框即可复制):
-
- <input id="out_add" style="width:60%;" ondblclick=copy()>
- <input id="load" type="button" value=" 下 载 " onclick="load()">
-
- <input type="button" value=" 复 制 " onclick="copy()">
- </div>
- </table>
-
- <table border width="100%" cellspacing=0 cellpadding=1 style=margin-top:10><tr><td>
- <table cellspacing="0" cellpadding="4" width="100%;">
- <tr>
- <td width=60%;>
- <input type="radio" name="choice" id="xtp" checked>
- <span onclick="xtp.click()">迅雷专用链⇒普通链接</span>
- <td>
- <input type="button" value=" 重 置 " onclick="reset()" style=margin-left:4;>
-
- <input type="button" onclick="window.close()" value=" 退 出 " >
-
- <tr>
- <td>
- <input type="radio" name="choice" id="ktp">
- <span onclick="ktp.click()">快车专用链⇒普通链接</span>
-
- <td>
- <tr>
- <td>
- <input type="radio" name="choice" id="ftp">
- <span onclick="ftp.click()">旋风专用链⇒普通链接</span>
- <td>
- <a href=http://hi.baidu.com/oiioooiiii>作者博客</a>
-
- <a href="mailtoiioooiiii@163.com?subject=连接转换工具-意见反馈">意见反馈</a>
- </table>
- </table>
-
- <script language=vbscript>
- Function fDecode(sStringToDecode)
- 'This function will decode a Base64 encoded string and returns the decoded string.
- 'This becomes usefull when attempting to hide passwords from prying eyes.
- Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
- Dim iDataLength, sOutputString, iGroupInitialCharacter
- sStringToDecode = Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")
- iDataLength = Len(sStringToDecode)
- If iDataLength Mod 4 <> 0 Then
- fDecode = "Bad string passed to fDecode() function."
- Exit Function
- End If
- For iGroupInitialCharacter = 1 To iDataLength Step 4
- Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString
- iDataByteCount = 3
- iGroup = 0
- For iCharacterCounter = 0 To 3
- sCharacter = Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)
- If sCharacter = "=" Then
- iDataByteCount = iDataByteCount - 1
- iData = 0
- Else
- iData = InStr(1, CharList, sCharacter, 0) - 1
- If iData = -1 Then
- fDecode = "Bad string passed to fDecode() function."
- Exit Function
- End If
- End If
- iGroup = 64 * iGroup + iData
- Next
- iGroup = Hex(iGroup)
- iGroup = String(6 - Len(iGroup), "0") & iGroup
- sPreliminaryOutString = Chr(CByte("&H" & Mid(iGroup, 1, 2))) & Chr(CByte("&H" & Mid(iGroup, 3, 2))) & Chr(CByte("&H" & Mid(iGroup, 5, 2)))
- sOutputString = sOutputString & Left(sPreliminaryOutString, iDataByteCount)
- Next
- fDecode = sOutputString
- End Function
-
- function ok_onclick
-
- str=in_add.value
- str=trim(str)
- if str="" then exit function
- if left(str,10)="thunder://" then xtp.click
- if left(str,11)="flashget://" then ktp.click
- if left(str,7)="qqdl://" then ftp.click
-
- if xtp.checked then '迅雷转普通
- if lcase(left(str,10))<>"thunder://" then
- exit function
- end if
- str=replace(str,left(str,10),"")
- str=fdecode(str)
- str=trim(str)
- str=replace(str,left(str,2),"")
- str=replace(str,right(str,2),"")
- out_add.value=str
- end if
-
- if ktp.checked then '快车转普通
- if lcase(left(str,11))<>"flashget://" then
- exit function
- end if
- str=replace(str,left(str,11),"")
- str=fdecode(str)
- str=trim(str)
- out_add.value=str
- end if
-
- if ftp.checked then '旋风转普通
- if lcase(left(str,7))<>"qqdl://" then
- exit function
- end if
- str=replace(str,left(str,7),"")
- str=fdecode(str)
- str=trim(str)
- out_add.value=str
- end if
- end function
-
- </script>
复制代码 我靠,代码极强,太厉害了
他的空间是http://hi.baidu.com/oiioooiiii/blog/item/c81337c2079d521c0ff47776.html
戏弄苍天的空间,希望大家访问 |
-
1
评分人数
-
|