<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    GFI LanGuard 腳本調試程序支持泛型函數

    Echo

    Echo 是顯示輸出的簡單函數。

    語法

    Echo (String)

    返回結果

    不返回數據。

    示例

    該示例將顯示“Test”一詞:

    Function Main
    
    echo "test"
    
    End Function

    WriteToLog

    Writetolog 會將傳遞給它的所有字符串都寫入到腳本引擎日志文件。

    語法

    WriteToLog(String)

    返回結果

    不返回數據。

    示例

    Function Main
    
    WritetoLog "test"
    
    End Function

    StatusBar

    StatusBar 用于在當前活動組件的狀態欄中顯示字符串。

    語法

    StatusBar(String)

    返回結果

    不返回數據。

    示例

    Function Main
    
    StatusBar "test"
    
    End Function

    AddListItem

    AddListItem 是一個允許腳本向用戶返回反饋的函數。 該函數將添加傳遞給它的任何字符串作為觸發漏洞的一個子節點。 AddListItem 函數具有 2 個不同的參數。 第一個參數指定父節點,第二個參數是要添加到樹中的字符串。 如果父節點左側為空,該函數會將指定字符串添加到頂部的可用節點(漏洞父節點)。 即使樹可以根據需要具有很多同級節點,但只能有 1 個級別。

    語法

    AddListItem(String,String)

    返回結果

    不適用

    示例

    Function MAIN
         Dim wmi As Object
         Dim objset As Object
         Dim obj As Object
         Dim monitor As Object
         Dim prop As Object
         Set wmi = GetObject("winmgmts:\\127.0.0.1\root\cimv2")
         Set objset = wmi.instancesof("Win32_service")
         For Each obj In objset
              Set monitor = obj
              For Each prop In monitor.properties_
                   If VarType(prop.value) = 8 Then
                   If Not (IsNull(prop.value)) Then
                   If prop.name = "Name" Then
                   If left(prop.value,1) = "a" then
                        AddListItem("A",prop.value)
                   End If
                   If left(prop.value,1) = "b" then
                        AddListItem("B",prop.value)
                   End If
                   If left(prop.value,1) = "c" Then
                        AddListItem("C",prop.value)
                   End if
                   End If
                   End If
                   End If
              Next
              Next
         main = true
    End Function

    SetDescription

    SetDescription 可用于向用戶返回簡單的反饋,方法為使用編程方法更改漏洞說明以指示觸發漏洞的更詳細的原因。 SetDescription 只有一個參數。 觸發漏洞后,傳遞給函數的字符串將設置為該漏洞的新說明。

    語法

    SetDescription(String)

    返回結果

    不適用

    示例

    Function Main
    
    SetDescription (“將設置此新描述來取代漏洞中指定的描述”)
    
    Main=true
    
    End Function

    本文章首發在 網安wangan.com 網站上。

    上一篇 下一篇
    討論數量: 0
    只看當前版本


    暫無話題~
    亚洲 欧美 自拍 唯美 另类