用Access分析网站实例

作者:凯旋网络来源:凯旋网络

Www_Chinaz_com

''利用 DHTML 的 innerHTML 来更改网页的源代码,建立一个简单的 FORM ,然后提交给服务器,继续查询下面的 IP
 

以下为引用的内容:
    Bd.innerHTML = "<form method=''POST'' action=''index.php?job=search'' target=''_parent''><input type=''text'' name=''search_ip'' ><input type=''submit'' value=''查询'' name=''B1''></form>"
    ''在 INPUT TEXT search_ip 中填入 IP。
    dc.all.Item("search_ip").Value = strNewIP
    ''用 DHTML 提交 FORM 到服务器
    dc.all.Item("b1").Click
  End Sub

  Private Sub Form_Open(Cancel As Integer) 中国站长.站
  Text1.Value = Nz(DLookup("ip1", "ipaddress", "[mark]=''last" & Me.Caption & "''"), "1.0.0.0") Www_Chinaz_com

  End Sub

Www.Chinaz.com

  Private Sub WebBrowser3_DownloadComplete()

Chinaz@com

站长.站

''该事件在页面成功下载到本地时运行,这时候 DOCUMENT 对象

Chinaz~com


''已经完全被客户端浏览器读取了,我们只要获取 Body 对象中的 innerHTML 即可 中国站.长站

以下为引用的内容:

    If Len(strNowIP) = 0 Then
        splitIP Text1.Value
    End If
   
    If check1.Value = True Then
            Call WriteLog("61.12.15.117")
    End If
  End Sub 中.国.站.长.站

  Function refreshIP() As String      ''搜索完一个IP以后再搜索下面一个
    Dim i As Long
    lngSearchIP(2) = lngSearchIP(2) + 1
    For i = 2 To 4
 
        If lngSearchIP(i) >= 256 Then
            lngSearchIP(i) = 0
            lngSearchIP(i + 1) = lngSearchIP(i + 1) + 1
        End If
    Next i
    refreshIP = Format(lngSearchIP(4), "0") & "." & Format(lngSearchIP(3), "0") & "." & Format(lngSearchIP(2), "0") & "." & Format(lngSearchIP(1), "0")
    strNowIP = refreshIP
    Debug.Print refreshIP
  End Function Chinaz_com

中国.站长站

以下代码请新建一个模块后 COPY 进去

中.国.站.长.站

以下为引用的内容:

  Option Compare Database
  Public lngSearchIP(4) As Long
  Public strNowIP As String
  Public strOKAddress As String
  Public strOKIP As String
  Public blnStop As Boolean
  Function writeOKIP()
    Dim rs As New ADODB.Recordset
    Dim strSql As String

中.国.站.长.站

   strSql = "select * from ipaddress order by enip"
    rs.Open strSql, CurrentProject.Connection, 1, 1
   
    Dim strAdd1 As String
 
    Dim strIP1 As String
    Dim lngENIP1 As Long
    Dim strState As String
    strState = "start"
   
    Dim i As Long
    Dim iA As Long
    iA = rs.RecordCount
   
    Do Until rs.EOF
        If blnStop = True Then Exit Function
        If strAdd1 <> rs("add") Then
            strSql = "update ipaddress_ok set ip2=''" & strIP1 & " '',enip2=" & Str(lngENIP1) & ",mark='' where mark=''setting''" Www_Chinaz_com
            CurrentProject.Connection.Execute strSql
            DoEvents
            strSql = "insert into ipaddress_ok (ip1,enip1,[mark],[add]) values(''" & rs("ip1") & "''," & Str(rs("enip")) & ",''setting'',''" & rs("add") & "'')"
            CurrentProject.Connection.Execute strSql
            DoEvents
        End If
           
        strAdd1 = rs("add")
        strIP1 = rs("ip1")
        lngENIP1 = rs("enip") 中国.站.长站
        i = i + 1

站.长.站


        Form_控制.Label4.Caption = Str(Int(i / iA * 10000) / 100) & "%"
        rs.MoveNext
    Loop
    rs.Close
 
   
    strSql = "update ipaddress_ok set ip2=mid(ip2,1,len(ip2)-2) & ''255''"
    CurrentProject.Connection.Execute strSql
    strSql = "update ipaddress_ok set enip1=enaddr(ip1)"
    CurrentProject.Connection.Execute strSql
    strSql = "update ipaddress_ok set enip2=enaddr(ip2)"
    CurrentProject.Connection.Execute strSql
  End Function
  Function enaddr(Sip As String) As Double 中国站.长.站

  • 广告推荐