The SQL contained an unchecked string literal, which may in theory be used to attack the database.
Changed the script to functional programming paradigm to remove the big number of local attributes to decrease memory usage when running it. Additional OS info are now included.