RubyGems Navigation menu

nasl 0.0.7

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:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 0.6.0 - June 06, 2018 (47.0 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.0 KB)
  6. 0.0.7 - October 19, 2012 (34.5 KB)
显示所有版本 (共 14 个)

Runtime 依赖 (2):

builder >= 0
rainbow >= 0

Development 依赖 (2):

racc >= 0
rake >= 0

业主:

作者:

  • Mak Kolybabi

SHA 256 校验和:

a29ed13d8ce45280b41ae342a4727a86d4250cfcc4c6f0a315476f2db491111e

下载总量 38,651

这个版本 2,950

许可:

需要的 Ruby 版本:

链接: