kekkan 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -0
- data/LICENSE +1 -1
- data/README.markdown +10 -5
- data/Rakefile +20 -2
- data/bin/kekkan +3 -3
- data/kekkan.gemspec +5 -2
- data/lib/kekkan.rb +2 -1
- data/lib/kekkan/base.rb +1 -1
- data/lib/kekkan/base/schema.rb +2 -2
- data/lib/kekkan/cli.rb +1 -1
- data/lib/kekkan/cli/application.rb +6 -6
- data/lib/kekkan/cli/banner.rb +1 -1
- data/lib/kekkan/models.rb +1 -1
- data/lib/kekkan/models/assessmentcheck.rb +1 -1
- data/lib/kekkan/models/cvss.rb +1 -1
- data/lib/kekkan/models/entry.rb +1 -1
- data/lib/kekkan/models/reference.rb +1 -1
- data/lib/kekkan/models/scanner.rb +1 -1
- data/lib/kekkan/models/version.rb +1 -1
- data/lib/kekkan/models/vulnerablesoftwarelist.rb +1 -1
- data/lib/kekkan/parsers.rb +1 -1
- data/lib/kekkan/parsers/cve_2_sax_listener.rb +1 -1
- data/lib/kekkan/version.rb +5 -5
- metadata +29 -9
- metadata.gz.sig +0 -0
- data/NEWS.markdown +0 -12
- data/TODO.markdown +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30f939bb0d86d91f406e721849f399cc9bf1601c
|
4
|
+
data.tar.gz: 7bd8b9a52e2721b6fb901efac5e2e721e3cde60d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8d8f709e3d28251e32ac769359d02e56c739125eb512a5c537475e6ef3813c73f070b84435e6c02652c941e52a23df33a5459213ab5a18f685ecd7f70a970cb
|
7
|
+
data.tar.gz: bf254d228589965b1ebd1441976893b9e7d9f447135717e036f1ecd817abd322d1f58c12954ec48a664eb21f9655c649efc3f214605f28ad03188169e3afdd49
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
J#u����^<^���#On�6
|
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
#Kekkan
|
1
|
+
#Kekkan
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/kekkan)
|
4
|
+
[](https://travis-ci.org/hammack/kekkan)
|
5
|
+
[](https://codeclimate.com/github/hammack/kekkan)
|
6
|
+
[](http://inch-ci.org/github/hammack/kekkan)
|
7
|
+
|
8
|
+
Kekkan is a parser and [ActiveRecord](http://api.rubyonrails.org/classes/ActiveRecord/Base.html) database for [NVD](https://web.nvd.nist.gov) version 2.0 CVE and CPE XML files. The CVE feed can be found on the NVD [here](https://nvd.nist.gov/download.cfm#CVE_FEED).
|
4
9
|
|
5
10
|
The name comes from the Japanese word for 'flaw/defect'.
|
6
11
|
|
@@ -43,12 +48,12 @@ The data can be queried with a built in console or with an external database vie
|
|
43
48
|
% kekkan --console
|
44
49
|
|
45
50
|
# Contributing
|
46
|
-
If you would like to contribute bug fixes/etc to Kekkan. The easiest way is to fork the project on [github](http://github.com/
|
51
|
+
If you would like to contribute bug fixes/etc to Kekkan. The easiest way is to fork the project on [github](http://github.com/hammackj/kekkan) and make the changes in your fork and the submit a pull request to the project.
|
47
52
|
|
48
53
|
# Issues
|
49
|
-
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/
|
54
|
+
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/hammackj/kekkan/issues).
|
50
55
|
|
51
56
|
# Contact
|
52
|
-
You can reach the team at
|
57
|
+
You can reach the team at jacob.hammack[at]hammackj[dot]com.
|
53
58
|
|
54
59
|
You can also contact the team on IRC on irc.freenode.net, #risu
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -23,11 +23,29 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
23
23
|
require "kekkan/version"
|
24
24
|
require 'rake'
|
25
25
|
require 'rake/testtask'
|
26
|
+
require 'digest/sha2'
|
26
27
|
|
27
28
|
task :build do
|
28
29
|
system "gem build #{Kekkan::APP_NAME}.gemspec"
|
29
30
|
end
|
30
31
|
|
32
|
+
task :checksum do
|
33
|
+
built_gem_path = "#{Kekkan::APP_NAME}-#{Kekkan::VERSION}.gem"
|
34
|
+
|
35
|
+
checksum512 = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
36
|
+
checksum256 = Digest::SHA256.new.hexdigest(File.read(built_gem_path))
|
37
|
+
|
38
|
+
checksum_512_path = "checksum/#{Kekkan::APP_NAME}-#{Kekkan::VERSION}.gem.sha512"
|
39
|
+
checksum_256_path = "checksum/#{Kekkan::APP_NAME}-#{Kekkan::VERSION}.gem.sha256"
|
40
|
+
|
41
|
+
File.open(checksum_512_path, 'w' ) {|f| f.write(checksum512) }
|
42
|
+
File.open(checksum_256_path, 'w' ) {|f| f.write(checksum256) }
|
43
|
+
|
44
|
+
system "git add #{checksum_512_path} #{checksum_256_path}"
|
45
|
+
system "git commit #{checksum_512_path} -m 'Added #{Kekkan::APP_NAME}-#{Kekkan::VERSION}.gem SHA512 checksum'"
|
46
|
+
system "git commit #{checksum_256_path} -m 'Added #{Kekkan::APP_NAME}-#{Kekkan::VERSION}.gem SHA256 checksum'"
|
47
|
+
end
|
48
|
+
|
31
49
|
task :tag_and_bag do
|
32
50
|
system "git tag -a v#{Kekkan::VERSION} -m 'version #{Kekkan::VERSION}'"
|
33
51
|
system "git push --tags"
|
@@ -44,7 +62,7 @@ task :tweet do
|
|
44
62
|
puts "Just released #{Kekkan::APP_NAME} v#{Kekkan::VERSION}. #{Kekkan::APP_NAME} is an Nessus XML parser/database/report generator. More information at #{Kekkan::SITE}"
|
45
63
|
end
|
46
64
|
|
47
|
-
task :release => [:
|
65
|
+
task :release => [:build, :checksum, :tag_and_bag, :push, :tweet] do
|
48
66
|
end
|
49
67
|
|
50
68
|
task :clean do
|
data/bin/kekkan
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
1
|
+
#!/usr/bin/env ruby -W0
|
2
|
+
|
3
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
3
4
|
#
|
4
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -24,7 +25,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../lib'))
|
|
24
25
|
$stdout.sync = true
|
25
26
|
$stderr.sync = true
|
26
27
|
|
27
|
-
require 'rubygems'
|
28
28
|
require 'kekkan'
|
29
29
|
|
30
30
|
app = Kekkan::CLI::Application.new
|
data/kekkan.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -31,9 +31,12 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.description = "#{Kekkan::APP_NAME} is an SAX XML parser and database for NVD CVE and CPE XML files."
|
32
32
|
s.license = "MIT"
|
33
33
|
|
34
|
-
s.
|
34
|
+
s.authors = Kekkan::AUTHORS
|
35
35
|
s.email = Kekkan::EMAIL
|
36
36
|
|
37
|
+
s.cert_chain = ['certs/hammackj.pem']
|
38
|
+
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
39
|
+
|
37
40
|
s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['kekkan.gemspec']
|
38
41
|
s.bindir = "bin"
|
39
42
|
s.executables = "#{Kekkan::APP_NAME}"
|
data/lib/kekkan.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -29,6 +29,7 @@ require 'irb'
|
|
29
29
|
require 'yaml'
|
30
30
|
require 'nokogiri'
|
31
31
|
|
32
|
+
require 'kekkan/version'
|
32
33
|
require 'kekkan/base'
|
33
34
|
require 'kekkan/base'
|
34
35
|
require 'kekkan/cli'
|
data/lib/kekkan/base.rb
CHANGED
data/lib/kekkan/base/schema.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -22,7 +22,7 @@ module Kekkan
|
|
22
22
|
module Base
|
23
23
|
|
24
24
|
# Kekkan database Schema
|
25
|
-
class Schema < ActiveRecord::Migration
|
25
|
+
class Schema < ActiveRecord::Migration[4.2]
|
26
26
|
|
27
27
|
# Creates all of the database tables required by the parser
|
28
28
|
#
|
data/lib/kekkan/cli.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -35,7 +35,7 @@ module Kekkan
|
|
35
35
|
end
|
36
36
|
|
37
37
|
#
|
38
|
-
def create_config
|
38
|
+
def create_config file=CONFIG_FILE
|
39
39
|
File.open(file, 'w+') do |f|
|
40
40
|
f.write("database:\n")
|
41
41
|
f.write(" adapter: \n")
|
@@ -49,7 +49,7 @@ module Kekkan
|
|
49
49
|
end
|
50
50
|
|
51
51
|
#
|
52
|
-
def load_config
|
52
|
+
def load_config file=CONFIG_FILE, memory_config=false
|
53
53
|
if File.exists?(file) == true or memory_config == true
|
54
54
|
begin
|
55
55
|
if memory_config
|
@@ -75,7 +75,7 @@ module Kekkan
|
|
75
75
|
# Initiator for [ActiveRecord] migrations.
|
76
76
|
#
|
77
77
|
# @param direction [Symbol] :up or :down
|
78
|
-
def migrate
|
78
|
+
def migrate direction
|
79
79
|
begin
|
80
80
|
if @database["adapter"] == nil
|
81
81
|
return false, "[!] Invalid database adapter, please check your configuration file"
|
@@ -188,8 +188,8 @@ module Kekkan
|
|
188
188
|
def parse_options
|
189
189
|
begin
|
190
190
|
opts = OptionParser.new do |opt|
|
191
|
-
opt.banner = "#{APP_NAME} v#{VERSION}\nJacob Hammack\n#{SITE}\n\n"
|
192
|
-
opt.banner << "Usage: #{APP_NAME} [options] [files_to_parse]"
|
191
|
+
opt.banner = "#{Kekkan::APP_NAME} v#{Kekkan::VERSION}\nJacob Hammack\n#{Kekkan::SITE}\n\n"
|
192
|
+
opt.banner << "Usage: #{Kekkan::APP_NAME} [options] [files_to_parse]"
|
193
193
|
|
194
194
|
opt.separator('')
|
195
195
|
opt.separator('Configuration Options')
|
data/lib/kekkan/cli/banner.rb
CHANGED
data/lib/kekkan/models.rb
CHANGED
data/lib/kekkan/models/cvss.rb
CHANGED
data/lib/kekkan/models/entry.rb
CHANGED
data/lib/kekkan/parsers.rb
CHANGED
data/lib/kekkan/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2012-
|
1
|
+
# Copyright (c) 2012-2017 Jacob Hammack.
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -20,9 +20,9 @@
|
|
20
20
|
|
21
21
|
module Kekkan
|
22
22
|
APP_NAME = "kekkan"
|
23
|
-
VERSION = "0.0.
|
24
|
-
|
25
|
-
EMAIL = "jacob.hammack@
|
26
|
-
SITE = "http://
|
23
|
+
VERSION = "0.0.5"
|
24
|
+
AUTHORS = ["Jacob Hammack"]
|
25
|
+
EMAIL = "jacob.hammack@hammackj.com"
|
26
|
+
SITE = "http://hammackj.github.io/kekkan"
|
27
27
|
CONFIG_FILE = "./kekkan.cfg"
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kekkan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Hammack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDkjCCAnqgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMRYwFAYDVQQDDA1qYWNv
|
14
|
+
Yi5oYW1tYWNrMRgwFgYKCZImiZPyLGQBGRYIaGFtbWFja2oxEzARBgoJkiaJk/Is
|
15
|
+
ZAEZFgNjb20wHhcNMTcwMjExMjIxODQzWhcNMTgwMjExMjIxODQzWjBHMRYwFAYD
|
16
|
+
VQQDDA1qYWNvYi5oYW1tYWNrMRgwFgYKCZImiZPyLGQBGRYIaGFtbWFja2oxEzAR
|
17
|
+
BgoJkiaJk/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
18
|
+
AQCkwSZNLRKFbqHhM/PtgXS9JuFcVOvMafbBJ2cL8vBwyPQkKUOoxnh59wlN/16V
|
19
|
+
GJEB3Di/HkPHMKppVZOYoLJv122VLQ7zE2sgxB3k/HY26WqR3rwXtkiGW3IbNAaJ
|
20
|
+
pPHTC1pLliLcHCEu5/osMgwzUI3aPUBeuFq6d8eDotCyevRUaCLxAv57B70Q9WpJ
|
21
|
+
T6SD4IU9FSBagh2EF53dOopgU30khalOTi+pINSO25wydqHLVF4k3eYgzwEU715I
|
22
|
+
io797U9UmAeLpH6bd+mC5X/kYGIrLIiRoEc4DQqEEXg47jNIkwcvEZxzDUTGEoVA
|
23
|
+
XnORzQIvKme9+4ymKGOts4eRAgMBAAGjgYgwgYUwCQYDVR0TBAIwADALBgNVHQ8E
|
24
|
+
BAMCBLAwHQYDVR0OBBYEFPlgUggO77ZI2oftuKgqdbmRGeSnMCUGA1UdEQQeMByB
|
25
|
+
GmphY29iLmhhbW1hY2tAaGFtbWFja2ouY29tMCUGA1UdEgQeMByBGmphY29iLmhh
|
26
|
+
bW1hY2tAaGFtbWFja2ouY29tMA0GCSqGSIb3DQEBBQUAA4IBAQBmmlCqrIScYh9r
|
27
|
+
EzPvRwo3A/43WrUgJQKAEi7X3f7GDklkhaoZj4d9vgYIff1O24dHsLLJZ+l2k5MF
|
28
|
+
HLWLUeBO6XVizTnOvQfIqqCPow5k3+OtJ9b2hw1Aj9/D46TZ75GOXQTPiFZNRvAM
|
29
|
+
gFsWWShgU0d650pwB6dNYKuI92A7i0zMicHAMeHf0POBdqT/3QeoX0I7FrodGfLd
|
30
|
+
jb4seZqNzpmgbncV5soeKEAXCFhMT8tcwffgWSWSt8HYK+I+Y6n5pXzwf563ZG3d
|
31
|
+
mmb41gpjtpyN4MmJg/dtBA2QAzTR88UfROHdHsH7z5/s3B28ULSb72jogoU7PDuI
|
32
|
+
xWswHWNU
|
33
|
+
-----END CERTIFICATE-----
|
34
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
35
|
dependencies:
|
13
36
|
- !ruby/object:Gem::Dependency
|
14
37
|
name: rails
|
@@ -51,7 +74,7 @@ dependencies:
|
|
51
74
|
- !ruby/object:Gem::Version
|
52
75
|
version: 1.6.8
|
53
76
|
description: kekkan is an SAX XML parser and database for NVD CVE and CPE XML files.
|
54
|
-
email: jacob.hammack@
|
77
|
+
email: jacob.hammack@hammackj.com
|
55
78
|
executables:
|
56
79
|
- kekkan
|
57
80
|
extensions: []
|
@@ -61,10 +84,8 @@ extra_rdoc_files:
|
|
61
84
|
files:
|
62
85
|
- Gemfile
|
63
86
|
- LICENSE
|
64
|
-
- NEWS.markdown
|
65
87
|
- README.markdown
|
66
88
|
- Rakefile
|
67
|
-
- TODO.markdown
|
68
89
|
- bin/kekkan
|
69
90
|
- kekkan.gemspec
|
70
91
|
- lib/kekkan.rb
|
@@ -84,7 +105,7 @@ files:
|
|
84
105
|
- lib/kekkan/parsers.rb
|
85
106
|
- lib/kekkan/parsers/cve_2_sax_listener.rb
|
86
107
|
- lib/kekkan/version.rb
|
87
|
-
homepage: http://
|
108
|
+
homepage: http://hammackj.github.io/kekkan
|
88
109
|
licenses:
|
89
110
|
- MIT
|
90
111
|
metadata: {}
|
@@ -104,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
125
|
version: '0'
|
105
126
|
requirements: []
|
106
127
|
rubyforge_project: kekkan
|
107
|
-
rubygems_version: 2.6.
|
128
|
+
rubygems_version: 2.6.8
|
108
129
|
signing_key:
|
109
130
|
specification_version: 4
|
110
131
|
summary: kekkan
|
111
132
|
test_files: []
|
112
|
-
has_rdoc: yard
|
metadata.gz.sig
ADDED
Binary file
|
data/NEWS.markdown
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# News
|
2
|
-
|
3
|
-
# 0.0.4 (July 2, 2016)
|
4
|
-
- License change to MIT
|
5
|
-
- Copyright updates
|
6
|
-
|
7
|
-
#0.0.1 (October 13, 2012)
|
8
|
-
- Added schema and SAX XML parser for NVD CVE v2 XML format
|
9
|
-
- SQLite is very slow on large XML files, I recommend using MySql
|
10
|
-
|
11
|
-
#0.0.0 (July 09, 2012)
|
12
|
-
- Initial gem push to save the gem name, unusable
|