⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modpluginshandling.bas

📁 全面网络扫描器VB源代码 很实用
💻 BAS
📖 第 1 页 / 共 2 页
字号:
    bug_fixing_time = vbNullString
    bug_exploit_availability = vbNullString
    bug_exploit_url = vbNullString
    bug_severity = vbNullString
    bug_popularity = vbNullString
    bug_simplicity = vbNullString
    bug_impact = vbNullString
    bug_risk = vbNullString
    bug_nessus_risk = vbNullString
    bug_iss_scanner_rating = vbNullString
    bug_netrecon_rating = vbNullString
    bug_check_tool = vbNullString
    
    source_cve = vbNullString
    source_certvu_id = vbNullString
    source_cert_id = vbNullString
    source_uscertta_id = vbNullString
    source_securityfocus_bid = vbNullString
    source_osvdb_id = vbNullString
    source_secunia_id = vbNullString
    source_securiteam_url = vbNullString
    source_securitytracker_id = vbNullString
    source_scip_id = vbNullString
    source_tecchannel_id = vbNullString
    source_heise_news = vbNullString
    source_heise_security = vbNullString
    source_aerasec_id = vbNullString
    source_nessus_id = vbNullString
    source_issxforce_id = vbNullString
    source_snort_id = vbNullString
    source_arachnids_id = vbNullString
    source_mssb_id = vbNullString
    source_mskb_id = vbNullString
    source_netbsdsa_id = vbNullString
    source_rhsa_id = vbNullString
    source_ciac_id = vbNullString
    source_literature = vbNullString
    source_misc = vbNullString
    
    session_procedure_type = vbNullString
    session_procedure_commands = vbNullString
    session_triggers = vbNullString
    session_trigger_match = vbNullString
End Sub

Public Function ReadPluginFromFile(ByRef strFileName As String, _
                                    ByRef strFilePath As String) As String
                                    
    Dim strPluginFullFileName As String 'The full path and name of the plugin file

    'This is just a workaround because the Open dialog can't split file name and path
    If InStrB(1, strFileName, "\", vbBinaryCompare) Then
        strPluginFullFileName = strFileName
    Else
        strPluginFullFileName = strFilePath & "\" & strFileName
    End If

    'Check the existence of the file
    On Error Resume Next
    If LenB(Dir$(strPluginFullFileName)) Then
        'Flush the old plugin content before loading new data
        plugin_filecontent = vbNullString
        
        plugin_filepath = strFilePath
        plugin_filename = strFileName
        
        'Open and read the plugin file
        Open strPluginFullFileName For Input As 1
            plugin_filecontent = Input(LOF(1), #1)
        Close
        ReadPluginFromFile = plugin_filecontent
    
        'Set the plugin silesize
        plugin_filesize = Len(plugin_filecontent)
    Else
        'Call errPluginDoesNotExist(strFilePath & "\" & strFileName)
    End If
End Function

'Public Function HowManyLoadedPlugins() As Integer
    'If frmMain.filATKPlugins.ListCount Then
    '    If frmMain.tvwPlugins.Nodes.Count Then
    '        On Error Resume Next 'Workaround to prevent kill if node is not available.
    '        HowManyLoadedPlugins = frmMain.tvwPlugins.Nodes("ATK ID").Children
    '    End If
    'Else
    '    HowManyLoadedPlugins = 0
    'End If

    'If frmMain.filNASLPlugins.ListCount Then
    '    If frmMain.tvwPlugins.Nodes.Count Then
    '        On Error Resume Next 'Workaround to prevent kill if node is not available.
    '        HowManyLoadedPlugins = HowManyLoadedPlugins + frmMain.tvwPlugins.Nodes("NASL ID").Children
    '    End If
    'Else
    '    HowManyLoadedPlugins = HowManyLoadedPlugins + 0
    'End If
'End Function

' ******************************************************************
' * This function extracts the possible ISBN number from a string. *
' * It works but there is one really nasty limitation:             *
' * 1. The ISBN numbers have to be written without the suggested   *
' *    delimiters as like spaces or dashes.                        *
' * This limitation should be fixed in an upcoming release.        *
' ******************************************************************

Public Function GetISBNFromString(TextString As String) As String
    Dim WordArray() As String
    Dim PossibleISBNNumber As String
    Dim i As Integer
    Dim j As Integer
    
    WordArray = Split(TextString, " ")
    
    For i = 0 To UBound(WordArray)
        'Reset the possible ISBN number for the next text block
        PossibleISBNNumber = vbNullString
        
        For j = 1 To Len(WordArray(i))
            If Len(PossibleISBNNumber) < 12 Then
                If Mid$(WordArray(i), j, 1) Like "[0-9]" Then
                    PossibleISBNNumber = PossibleISBNNumber & Mid$(WordArray(i), j, 1)
                ElseIf InStrB(j, WordArray(i), "X", vbBinaryCompare) Then
                    PossibleISBNNumber = PossibleISBNNumber & Mid$(WordArray(i), j, 1)
                End If
                    
                If PossibleISBNNumber Like "#########?" Then
                    GetISBNFromString = PossibleISBNNumber
                    Exit Function
                End If
            End If
        Next j
    Next i
End Function

Public Sub SetPluginSessionProcedure()
    If LenB(plugin_procedure_detection) Then
        session_procedure_type = "detection"
        session_procedure_commands = plugin_procedure_detection
    ElseIf LenB(plugin_procedure_exploit) Then
        session_procedure_type = "exploit"
        session_procedure_commands = plugin_procedure_exploit
    Else
        session_procedure_type = vbNullString
        session_procedure_commands = vbNullString
    End If
End Sub

Public Sub ActivatePluginMenuModes()
    If LenB(plugin_procedure_detection) Then
'        frmMain.mnuPluginsRunDetectionItem.Enabled = True
    Else
'        frmMain.mnuPluginsRunDetectionItem.Enabled = False
    End If

    If LenB(plugin_procedure_exploit) Then
'        frmMain.mnuPluginsRunExploitItem.Enabled = True
    Else
'        frmMain.mnuPluginsRunExploitItem.Enabled = False
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -