RubyGems Navigation menu

nasl 0.0.8

Installation ============ Git --- Installing the source from Git is done as follows: git clone git://github.com/tenable/nasl.git Gem --- Installing the package from RubyGems is done as follows: gem install nasl Usage ===== Standalone ---------- To avoid conflicting with the NASL interpreter, the NASL gem's binary is installed as . As an application, it has very few actions that it can perform. * Benchmark: This benchmarks the time taken to parse the input path(s) over a number of iterations. The number of iterations can be adjusted by the <-i> switch. % nasl-parse -i 10 benchmark /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl -------------------------[ ssl_certificate_chain.nasl ]------------------------- Rehearsal -------------------------------------------- Tokenize 1.687500 0.000000 1.687500 ( 1.688397) Parse 1.835938 0.015625 1.851562 ( 1.857094) ----------------------------------- total: 3.539062sec user system total real Tokenize 1.304688 0.015625 1.320312 ( 1.319951) Parse 1.046875 0.000000 1.046875 ( 1.046957) -------------------------[ ssl_certificate_chain.nasl ]------------------------- * Parse: This parses the input path(s) and indicates whether the parse was successful. % nasl-parse parse /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl -------------------------[ ssl_certificate_chain.nasl ]------------------------- Successfully parsed the contents of the file. -------------------------[ ssl_certificate_chain.nasl ]------------------------- * Test: This runs unit tests distributed with the application. Specific unit tests can be specified on the command line, otherwise all tests will be run. % nasl-parse test Run options: # Running tests: ............................................................................. Finished tests in 11.773983s, 6.5398 tests/s, 33493.8487 assertions/s. 77 tests, 394356 assertions, 0 failures, 0 errors, 0 skips * Tokenize: This tokenizes the input path(s) and prints the token/byte-range pairs to stdout. % nasl-parse tokenize /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl -------------------------[ ssl_certificate_chain.nasl ]------------------------- [COMMENT, 0...1076] [IF, 1076...1079] [LPAREN, 1079...1080] [IDENT, 1080...1091] [CMP_LT, 1091...1093] ... -------------------------[ ssl_certificate_chain.nasl ]------------------------- * XML: This parses the input path(s), and then prints an XML representation of the parse tree to stdout. % nasl-parse xml /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl -------------------------[ ssl_certificate_chain.nasl ]------------------------- < ... -------------------------[ ssl_certificate_chain.nasl ]------------------------- Library ------- The primary users of this gem are [Pedant][pedant] and [Nasldoc][nasldoc]. Other uses are encouraged, of course! The class is the most useful part, obviously, and can be used as follows: require 'nasl' tree = Nasl::Parser.new.parse(file_contents, path_to_file) That's all there is to it. If there are any errors, it'll throw an instance of that will include as much context about the error as possible. [nasldoc]: https://github.com/tenable/nasldoc [pedant]: https://github.com/tenable/pedant

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.6.0 - June 06, 2018 (47 KB)
  2. 0.5.0 - June 05, 2018 (46.5 KB)
  3. 0.4.0 - June 01, 2018 (44.5 KB)
  4. 0.3.0 - September 04, 2015 (39.5 KB)
  5. 0.2.0 - August 28, 2014 (39 KB)
  6. 0.0.8 - October 25, 2012 (34.5 KB)
Show all versions (14 total)

Runtime Dependencies (2):

builder >= 3.1.4
rainbow >= 0

Development Dependencies (2):

racc >= 0
rake >= 0

Owners:

Authors:

  • Mak Kolybabi

SHA 256 checksum:

3021cd1892c5601163230032ba738c2fbb085a2fb0d14dff140260b4b6c383be

Total downloads 38,764

For this version 3,045

Licenses:

N/A

Required Ruby Version: None

Links: