[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

hta版连接地址转换——转我朋友的代码

  1. <script>
  2. window.onerror=killerror
  3. function killerror(){
  4. return true
  5. }
  6. window.onload=ini
  7. function ini(){
  8. var x=520;y=270
  9. window.resizeTo(x,y)
  10. document.title="链接转换工具 - Made By oiioooiiii"
  11. }
  12. function paste(){
  13. in_add.value=window.clipboardData.getData("text")
  14. }
  15. function copy(){
  16. window.clipboardData.setData("text",out_add.value)
  17. }
  18. function load(){
  19. window.open(out_add.value)
  20. }
  21. function reset(){
  22. in_add.value=""
  23. out_add.value=""
  24. xtp.click()
  25. }
  26. </script>
  27. <style>
  28. body{background:#f0f0f0;}
  29. *{font-size:13;cursor:default;}
  30. a{color:#177cb0;}
  31. a:visited{color:#177cb0;}
  32. a:hover{color:#25f8cb;cursor:hand;}
  33. </style>
  34. <body scroll="no" topMargin="10" oncontextmenu="return false">
  35. <table border width="100%" cellspacing=0 cellpadding=3>
  36. <tr><td>
  37. 请输入需要转换的地址(双击编辑框即可粘贴):
  38. <input id="in_add" style="width:60%;" ondblclick=paste()>
  39. <input type="button" value=" 转 换 " id="ok" onclick="sub()">
  40. <input type="button" value=" 粘 贴 " onclick="paste()">
  41. <div>
  42. 转换后的地址(双击编辑框即可复制):
  43. <input id="out_add" style="width:60%;" ondblclick=copy()>
  44. <input id="load" type="button" value=" 下 载 " onclick="load()">
  45. <input type="button" value=" 复 制 " onclick="copy()">
  46. </div>
  47. </table>
  48. <table border width="100%" cellspacing=0 cellpadding=1 style=margin-top:10><tr><td>
  49. <table cellspacing="0" cellpadding="4" width="100%;">
  50. <tr>
  51. <td width=60%;>
  52. <input type="radio" name="choice" id="xtp" checked>
  53. <span onclick="xtp.click()">迅雷专用链&rArr;普通链接</span>
  54. <td>
  55. <input type="button" value=" 重 置 " onclick="reset()" style=margin-left:4;>
  56. <input type="button" onclick="window.close()" value=" 退 出 " >
  57. <tr>
  58. <td>
  59. <input type="radio" name="choice" id="ktp">
  60. <span onclick="ktp.click()">快车专用链&rArr;普通链接</span>
  61. <td>
  62. <tr>
  63. <td>
  64. <input type="radio" name="choice" id="ftp">
  65. <span onclick="ftp.click()">旋风专用链&rArr;普通链接</span>
  66. <td>
  67. <a href=http://hi.baidu.com/oiioooiiii>作者博客</a>
  68.    
  69. <a href="mailtoiioooiiii@163.com?subject=连接转换工具-意见反馈">意见反馈</a>
  70. </table>
  71. </table>
  72. <script language=vbscript>
  73. Function fDecode(sStringToDecode)
  74. 'This function will decode a Base64 encoded string and returns the decoded string.
  75. 'This becomes usefull when attempting to hide passwords from prying eyes.
  76. Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  77. Dim iDataLength, sOutputString, iGroupInitialCharacter
  78. sStringToDecode = Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")
  79. iDataLength = Len(sStringToDecode)
  80. If iDataLength Mod 4 <> 0 Then
  81. fDecode = "Bad string passed to fDecode() function."
  82. Exit Function
  83. End If
  84. For iGroupInitialCharacter = 1 To iDataLength Step 4
  85. Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString
  86. iDataByteCount = 3
  87. iGroup = 0
  88. For iCharacterCounter = 0 To 3
  89. sCharacter = Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)
  90. If sCharacter = "=" Then
  91. iDataByteCount = iDataByteCount - 1
  92. iData = 0
  93. Else
  94. iData = InStr(1, CharList, sCharacter, 0) - 1
  95. If iData = -1 Then
  96. fDecode = "Bad string passed to fDecode() function."
  97. Exit Function
  98. End If
  99. End If
  100. iGroup = 64 * iGroup + iData
  101. Next
  102. iGroup = Hex(iGroup)
  103. iGroup = String(6 - Len(iGroup), "0") & iGroup
  104. sPreliminaryOutString = Chr(CByte("&H" & Mid(iGroup, 1, 2))) & Chr(CByte("&H" & Mid(iGroup, 3, 2))) & Chr(CByte("&H" & Mid(iGroup, 5, 2)))
  105. sOutputString = sOutputString & Left(sPreliminaryOutString, iDataByteCount)
  106. Next
  107. fDecode = sOutputString
  108. End Function
  109. function ok_onclick
  110. str=in_add.value
  111. str=trim(str)
  112. if str="" then exit function
  113. if left(str,10)="thunder://" then xtp.click
  114. if left(str,11)="flashget://" then ktp.click
  115. if left(str,7)="qqdl://" then ftp.click
  116. if xtp.checked then                          '迅雷转普通
  117. if lcase(left(str,10))<>"thunder://" then
  118. exit function
  119. end if
  120. str=replace(str,left(str,10),"")
  121. str=fdecode(str)
  122. str=trim(str)
  123. str=replace(str,left(str,2),"")
  124. str=replace(str,right(str,2),"")
  125. out_add.value=str
  126. end if
  127. if ktp.checked then                    '快车转普通
  128. if lcase(left(str,11))<>"flashget://" then
  129. exit function
  130. end if
  131. str=replace(str,left(str,11),"")
  132. str=fdecode(str)
  133. str=trim(str)
  134. out_add.value=str
  135. end if
  136. if ftp.checked then                '旋风转普通
  137. if lcase(left(str,7))<>"qqdl://" then
  138. exit function
  139. end if
  140. str=replace(str,left(str,7),"")
  141. str=fdecode(str)
  142. str=trim(str)
  143. out_add.value=str
  144. end if
  145. end function
  146. </script>
复制代码
我靠,代码极强,太厉害了


他的空间是http://hi.baidu.com/oiioooiiii/blog/item/c81337c2079d521c0ff47776.html

戏弄苍天的空间,希望大家访问
1

评分人数

有想过用batch写个吗?
for /f "delims=" %%a in ('%0') do (echo %%a)

TOP

zen me shi luan ma a

TOP

bian ma bi xu bao cun wei UNCODE

TOP

不管用啊,不能转换啊

TOP

不是批处理

TOP

返回列表