✔ 最佳答案
唔好一開始就話寫程式
一開始要識咩係低階語言,機器語言,匯編語言,高階語言,自然語言,英文少少
學好程式編寫概念先
你未有基礎就話寫程式,好難好架
詳細參考電腦與資訊科技
如果你c得明以下d d就去學啦~達人!
Private Function IsPasswordBox(objElement As Object) As Boolean
On Error GoTo err1
If LCase(objElement.getAttribute("Type")) = "password" Then
IsPasswordBox = True
Else
IsPasswordBox = False
End If
Exit Function
err1:
IsPasswordBox = False
End Function
Private Function SearchPasswordsInDoc(objDoc As Object) As Boolean
Dim objElement As Object
Dim lngLen As Long
Dim lngIndex As Long
Dim blnFound As Boolean
'Get the number of elements in the document.
lngLen = objDoc.All.length
'Enumerates all elements in the document, in order to find the password elements.
For Each objElement In objDoc.All
DoEvents
'Checks if the element is a password-box.
If IsPasswordBox(objElement) Then
'We found a password-box, so we reveal it together with window title.
txtPasswords.Text = txtPasswords.Text & "Window Title: " & strCurrTitle & vbCrLf
txtPasswords.Text = txtPasswords.Text & "Password: " & objElement.getAttribute("Value") & vbCrLf & vbCrLf
blnFound = True
End If
Next
lngLen = objDoc.frames.length
'Enumerates all frames in the document
For lngIndex = 0 To lngLen - 1
'First, check if we can access the document object without receiving any error:
If CanAccessDocumentObject(objDoc.frames.Item(lngIndex)) Then
'If the document contains one or more frames, search for a password also in them:
If SearchPasswordsInDoc(objDoc.frames.Item(lngIndex).document) Then blnFound = True
End If
Next
SearchPasswordsInDoc = blnFound
End Function
Private Sub ScanPasswords()
Dim objShellWins As New SHDocVw.ShellWindows
Dim objExplorer As SHDocVw.InternetExplorer
Dim objDocument As HTMLDocument
Dim blnFound As Boolean
Dim blnResult As Boolean
txtPasswords = "Scanning all windows, please wait..." & vbCrLf & vbCrLf
Screen.MousePointer = vbHourglass
'Enumerates All IE windows.
For Each objExplorer In objShellWins
If TypeOf objExplorer.document Is HTMLDocument Then
Set objDocument = objExplorer.document
'Saves the current title for using it if a password-box is found.
strCurrTitle = objDocument.Title
'Search for password-boxes in the document, including all frames in it.
blnResult = SearchPasswordsInDoc(objDocument)
If blnResult Then blnFound = True
End If
版權屬Nir Sofer,用的是高階語言BASIC,軟件原始碼為AsterWin IE v1.03,學好程式編寫概念先啦