The NSE registry is a Lua table designed to store variables shared between all scripts during a scan. The registry is stored at the nmap.registry
variable. For example, some of the brute-force scripts will store valid credentials so that other scripts can use them to perform authenticated actions. We insert values as in any other regular Lua table:
table.insert( nmap.registry.credentials.http, { username = username, password = password } )