February 2015
Beginner to intermediate
244 pages
4h 37m
English
Now we will briefly cover a few examples of different NSE version scripts to familiarize ourselves with the structure and required components.
The modbus-discover script was written by Alexander Rudakov to retrieve device information through the modbus protocol. Modbus is very popular among Supervisory Control And Data
Acquisition (SCADA) systems. The script attempts to discover valid Slave IDs (SIDs) and retrieve additional device information:
action = function(host, port) -- If false, stop after first sid. local aggressive = stdnse.get_script_args('modbus-discover.aggressive') local opts = {timeout=2000} local results = {} for sid = 1, 246 do stdnse.print_debug(3, "Sending command ...Read now
Unlock full access