Scripting

Refer to this section to gain insight into the various scripting languages supported by GFI LanGuard.

Visual Basic Script (VBScript)

VBScript important notes

VBScript functions supported by GFI LanGuard

Common mistakes and pitfalls

Tips and tricks

Developing a script in GFI LanGuard Script Debugger

Creating a VBScript

Running a script

Debugging breakpoints - Step in functionality

Monitoring values inside variables

Debugging under alternative user sessions

Sending parameters to the script

Adding a new script-based vulnerability check to the scanner

Step 1: Create a script which checks for the vulnerability

Step 2: Create a new vulnerability to run the script

Python Scripting

What is Python scripting language?

Creating a new vulnerability check using Python Script Test

Step 1: Creating the script

Step 2: Creating the new vulnerability check

Application Programming Interfaces (APIs) available in Python Scripts

Debugging Python scripts

Python libraries and code reusability

Scripting Objects

Socket objects

OpenTcp

OpenUdp

Close

Recv

Send

SendTo

SetTimeout

DnsLookup

ReverseDnsLookup

SNMP objects

Connect

Get

GetNext

Set

Close

File objects

Connect

Open

Close

Read

Write

WriteLine

Seek

Delete

Size

FileVersion

ProductVersion

Attributes

Registry objects

Connect

Read

Write

GetFirstValue

GetNextValue

GetFirstKey

GetNextKey

DeleteValue

DeleteKey

HTTP objects

Connect

GetURL

PostURL

SendRequest

AddHeader

ClearRequestHeaders

Verb

HTTPVersion

IP

Port

RawResponseHeaders

Body

Authentication

ProxyUser

ProxyPassword

HttpUser

HttpPassword

ResponseHeaders

HTTPHeaders objects

HeaderValue

HeaderName

Count

FTP objects

Connect

GetCurrentDirectory

SetCurrentDirectory

CreateDirectory

RemoveDirectory

DeleteFiles

GetFile

PutFile

RenameFile

FindFirstFile

FindNextFile

FindFileClose

GetFindFileName

GetFindFileSize

GetFindFileAttributes

LastError

Encode objects

Base64Encode

Base64Decode