VB源代码-网盘解析

'主窗体
Private Sub Command1_Click()
WebBrowser1.Navigate Text1.Text
End Sub
Private Sub Command2_Click()
Clipboard.Clear
Clipboard.SetText Text2.Text
End Sub
Private Sub Command3_Click()
Clipboard.Clear
Clipboard.SetText Text3.Text
End Sub
Private Sub Command4_Click()
Clipboard.Clear
Clipboard.SetText Text4.Text
End Sub
Private Sub Command5_Click()
Clipboard.Clear
Clipboard.SetText Text5.Text
End Sub
Private Sub Text1_Change()
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
Private Sub Text1_GotFocus()
Text1.Text = ""
End Sub
Private Sub Text2_Change()
Text3.Text = "thunder://" & Base64Encode("AA" & Text2.Text & "ZZ")
Text4.Text = "Flashget://" & Base64Encode("[FLASHGET]" & Text2.Text & "FLASHGET")
Text5.Text = "qqdl://" & Base64Encode(Text2.Text)
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If InStr(Text1.Text, "115") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If WebBrowser1.Document.links.Item(i).innerText = "普通下载" Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
ElseIf InStr(Text1.Text, "baidu") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If WebBrowser1.Document.links.Item(i).innerText = "下载" Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
ElseIf InStr(Text1.Text, "good.gd") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If WebBrowser1.Document.links.Item(i).innerText = "江苏电信下载" Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
ElseIf InStr(Text1.Text, "1000eb") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If WebBrowser1.Document.links.Item(i).innerText = "江苏电信下载" Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
ElseIf InStr(Text1.Text, "dl.dbank") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If WebBrowser1.Document.links.Item(i).innerText = "下载" Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
ElseIf InStr(Text1.Text, "kuai") Then
For i = 0 To WebBrowser1.Document.links.length - 1
If InStr(WebBrowser1.Document.links.Item(i), "dl") Then
Text2 = WebBrowser1.Document.links.Item(i)
End If
Next i
End If
End Sub
'地址转换模块
Option Explicit
Public Function Base64Encode(InStr1 As String) As String
Dim mInByte(3) As Byte, mOutByte(4) As Byte
Dim myByte As Byte
Dim i As Integer, LenArray As Integer, j As Integer
Dim myBArray() As Byte
Dim OutStr1 As String
myBArray() = StrConv(InStr1, vbFromUnicode)
LenArray = UBound(myBArray) + 1
For i = 0 To LenArray Step 3
If LenArray - i = 0 Then
Exit For
End If
If LenArray - i = 2 Then
mInByte(0) = myBArray(i)
mInByte(1) = myBArray(i + 1)
Base64EncodeByte mInByte,
mOutByte, 2
ElseIf LenArray - i = 1 Then
mInByte(0) = myBArray(i)
Base64EncodeByte mInByte, mOutByte, 1
Else
mInByte(0) = myBArray(i)
mInByte(1) = myBArray(i + 1)
mInByte(2) = myBArray(i + 2)
Base64EncodeByte mInByte, mOutByte, 3
End If
For j = 0 To 3
OutStr1 = OutStr1 & Chr(mOutByte(j))
Next j
Next i
Base64Encode = OutStr1
End Function
Private Sub Base64EncodeByte(mInByte() As Byte, mOutByte() As Byte, Num As Integer)
Dim tByte As Byte
Dim i As Integer
If Num = 1 Then
mInByte(1) = 0
mInByte(2) = 0
ElseIf Num = 2 Then
mInByte(2) = 0
End If
tByte = mInByte(0) And &HFC
mOutByte(0) = tByte / 4
tByte = ((mInByte(0) And &H3) * 16) + (mInByte(1) And &HF0) / 16
mOutByte(1) = tByte
tByte = ((mInByte(1) And &HF) * 4) + ((mInByte(2) And &HC0) / 64)
mOutByte(2) = tByte
tByte = (mInByte(2) And &H3F)
mOutByte(3) = tByte索尼爱立信 w380c
For i = 0 To 3
If mOutByte(i) >= 0 And mOutByte(i) <= 25 Then
mOutByte(i) = mOutByte(i) + Asc("A")
ElseIf mOutByte(i) >= 26 And mOutByte(i) <= 51 Then
mOutByte(i) = mOutByte(i) - 26 + Asc("a")
ElseIf mOutByte(i) >= 52 And mOutByte(i) <= 61 Then
mOutByte(i) = mOutByte(i) - 52 + Asc("0")
ElseIf mOutByte(i) = 62 Then
mOutByte(i) = Asc("+")
Else
mOutByte(i) = Asc("/")
End If
Next i
If Num = 1 Then
mOutByte(2) = Asc("=")
mOutByte(3) = Asc("=")
ElseIf Num = 2 Then
mOutByte(3) = Asc("=")
End If
End Sub
Public Function Base64Decode(InStr1 As String) As String
Dim mInByte(4) As Byte, mOutByte(3) As Byte
Dim i As Integer, LenArray As Integer, j As Integer
Dim myBArray() As Byte
Dim OutStr1 As String
Dim tmpArray() As Byte
myBArray() = StrConv(InStr1, vbFromUnicode)
LenArray = UBound(myBArray)
ReDim tmpArray(((LenArray + 1) / 4) * 3)
j = 0
For i = 0 To LenArray Step 4
If LenArray - i = 0 Then
Exit For
Else
mInByte(0) = myBArray(i)
mInByte(1) = myBArray(i + 1)
mInByte(2) = myBArray(i + 2)
mInByte(3) = myBArray(i + 3)
Base64DecodeByte mInByte, mOutByte, 4
End If
tmpArray(j * 3) = mOutByte(0)
tmpArray(j * 3 + 1) = mOutByte(1)
tmpArray(j * 3 + 2) = mOutByte(2)
j = j + 1
Next i
Base64Decode = BinaryToString(tmpArray)
End Function
Private Sub Base64DecodeByte(mInByte() As Byte, mOutByte() As Byte, ByteNum As Integer)
Dim tByte As Byte
Dim i As Integer
ByteNum = 0
For i = 0 To 3
If mInByte(i) >= Asc("A") And mInByte(i) <= Asc("Z") Then
mInByte(i) = mInByte(i) - Asc("A")
ElseIf mInByte(i) >= Asc("a") And mInByte(i) <= Asc("z") Then
mInByte(i) = mInByte(i) - Asc("a") + 26
ElseIf mInByte(i) >= Asc("0") And mInByte(i) <= Asc("9") Then
应用集成
mInByte(i) = mInByte(i) - Asc("0") + 52
ElseIf mInByte(i) = Asc("+") Then
mInByte(i) = 62
ElseIf mInByte(i) = Asc("/") Then
mInByte(i) = 63
Else '"="
ByteNum = ByteNum + 1
mInByte(i) = 0
End If
Next i
tByte = (mInByte(0) And &H3F) * 4 + (mInByte(1) And &H30) / 16
mOutByte(0) = tByte
tByte = (mInByte(1) And &HF) * 16 + (mInByte(2) And &H3C) / 4
mOutByte(1) = tByte
tByte = (mInByte(2) And &H3) * 64 + (mInByte(3) And &H3F)
mOutByte(2) = tByte
End Sub
Private Function BinaryToString(ByVal BinaryStr As Variant) As String
Dim lnglen As Long
Dim tmpBin As Variant
Dim strC As String
Dim skipflag As Long
Dim i As Long
skipflag = 0
strC = ""
If Not IsNull(BinaryStr) Then
lnglen = LenB(BinaryStr)
For i = 1 To lnglen
If skipflag = 0 Then
tmpBin = MidB(BinaryStr, i, 1)
If AscB(tmpBin) > 127 Then
strC = strC & Chr(AscW(MidB(BinaryStr, i + 1, 1) & tmpBin))
skipflag = 1
Else
strC = strC & Chr(AscB(tmpBin))
End If
Else
skipflag = 0
End If
纳达尔资料
Next
End If
BinaryToString = strC
End Function
Private Function StringToBinary(ByVal VarString As String) As Variant
Dim strBin As Variant
Dim varchar As Variant
Dim varasc As Long
Dim varlow, varhigh
2010江苏高考英语
Dim i As Long
strBin = ""
For i = 1 To Len(VarString)
varchar = Mid(VarString, i, 1)
varasc = Asc(varchar)
If varasc < 0 Then
varasc = varasc + 65535
End If
If varasc > 255 Then
varlow = Left(Hex(Asc(varchar)), 2)
varhigh = Right(Hex(Asc(varchar)), 2)
strBin = strBin & ChrB("&H" & varlow) & ChrB("&H" & varhigh)
Else
strBin = strBin & ChrB(AscB(varchar))
End If
Next
StringToBinary = strBin
吴阶平简介
End Function
互联网信息服务管理办法

本文发布于:2024-09-24 14:30:10,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/234663.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:江苏   电信   下载   管理
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议