ssh_scan 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -2
- data/bin/ssh_scan +27 -0
- data/lib/ssh_scan.rb +1 -0
- data/lib/ssh_scan/version.rb +1 -1
- data/ssh_scan.gemspec +1 -0
- metadata +17 -3
- data/bin/ssh_scan.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a227becd669eb5ec2b6586021dff565677832baa
|
4
|
+
data.tar.gz: f264bd2a58088a9731d0dd1633158ff408419b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d21e7f8b147cf5296fc07a13bd2c99ebe2f062503c3781e29cc0d3cfa552266cfbdd0bf2d66db7c3ce23a9e5821791735c5a003af3be74eacf4e7fd95dbdfa2
|
7
|
+
data.tar.gz: f9cd8d31d3fc498364e87e891969f1d543f4e08349a0259d84d6ea906b908653363f3a400da535559a4dff86567e49679acd677ca2c32f80d858e1d8f9cc0e45
|
data/README.md
CHANGED
@@ -9,14 +9,25 @@ A Ruby-based SSH configuration and policy scanner
|
|
9
9
|
|
10
10
|
- **Minimal Dependancies** - Uses native Ruby and BinData to do it's work, no heavy dependancies.
|
11
11
|
- **Not Just a Script** - Implementation is portable for use in another project or for automation of tasks.
|
12
|
-
- **Simple** -
|
12
|
+
- **Simple** - Just point ssh_scan at an SSH service and get a JSON report of what is supports and it's policy status
|
13
|
+
- **Configurable** - Make your own custom policies that fit your unique policy requirements.
|
13
14
|
|
14
15
|
## Setup
|
15
16
|
|
16
|
-
To install, type
|
17
|
+
To install as a gem, type
|
17
18
|
|
18
19
|
```bash
|
19
20
|
gem install ssh_scan
|
21
|
+
ssh_scan
|
22
|
+
```
|
23
|
+
|
24
|
+
To install from source, type
|
25
|
+
|
26
|
+
```bash
|
27
|
+
git clone https://github.com/claudijd/ssh_scan.git
|
28
|
+
cd ssh_scan
|
29
|
+
gem install bindata
|
30
|
+
./bin/ssh_scan
|
20
31
|
```
|
21
32
|
|
22
33
|
## Example Command-Line Usage
|
@@ -29,6 +40,8 @@ Run `ssh_scan -h` to get this
|
|
29
40
|
Example: ssh_scan 192.168.1.1
|
30
41
|
Example: ssh_scan 192.168.1.1 22
|
31
42
|
|
43
|
+
See here for [example output](https://github.com/claudijd/ssh_scan/blob/master/examples/192.168.1.1.json)
|
44
|
+
|
32
45
|
## Rubies Supported
|
33
46
|
|
34
47
|
This project is integrated with [travis-ci](http://about.travis-ci.org/) and is regularly tested to work with the following rubies:
|
data/bin/ssh_scan
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Path setting slight of hand
|
4
|
+
$:.unshift File.join(File.dirname(__FILE__), "../lib")
|
5
|
+
|
6
|
+
require 'ssh_scan'
|
7
|
+
|
8
|
+
# Usage: ruby ssh_scan.rb 192.168.1.1
|
9
|
+
if ARGV[0].nil? || ARGV[0] == "-h" || ARGV[0] == "--help"
|
10
|
+
puts "ssh_scan #{SSHScan::VERSION} (https://github.com/claudijd/ssh_scan)\n\n" +
|
11
|
+
"Usage: ssh_scan [ip] [port]\n" +
|
12
|
+
" -h, --help Show this message\n\n" +
|
13
|
+
"Example: ssh_scan 192.168.1.1\n" +
|
14
|
+
"Example: ssh_scan 192.168.1.1 22\n\n"
|
15
|
+
exit
|
16
|
+
end
|
17
|
+
|
18
|
+
# Populate the info we need to perform a scan
|
19
|
+
ip = ARGV[0].chomp
|
20
|
+
port = ARGV[1].nil? ? 22 : ARGV[1].to_i
|
21
|
+
policy = SSHScan::IntermediatePolicy.new
|
22
|
+
|
23
|
+
# Perform scan and get results
|
24
|
+
scan_engine = SSHScan::ScanEngine.new()
|
25
|
+
result = scan_engine.scan(ip, port, policy)
|
26
|
+
|
27
|
+
puts JSON.pretty_generate(result)
|
data/lib/ssh_scan.rb
CHANGED
data/lib/ssh_scan/version.rb
CHANGED
data/ssh_scan.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.homepage = 'http://rubygems.org/gems/ssh_scan'
|
27
27
|
|
28
28
|
s.add_dependency('bindata', '~> 2.0')
|
29
|
+
s.add_development_dependency('pry')
|
29
30
|
s.add_development_dependency('rspec', '~> 3.0')
|
30
31
|
s.add_development_dependency('rspec-its', '~> 1.2')
|
31
32
|
s.add_development_dependency('rake', '~> 10.3')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssh_scan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Claudius
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,7 +83,7 @@ dependencies:
|
|
69
83
|
description: A Ruby-based SSH scanner for configuration and policy scanning
|
70
84
|
email: claudijd@yahoo.com
|
71
85
|
executables:
|
72
|
-
- ssh_scan
|
86
|
+
- ssh_scan
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
@@ -80,7 +94,7 @@ files:
|
|
80
94
|
- Gemfile
|
81
95
|
- README.md
|
82
96
|
- Rakefile
|
83
|
-
- bin/ssh_scan
|
97
|
+
- bin/ssh_scan
|
84
98
|
- lib/ssh_scan.rb
|
85
99
|
- lib/ssh_scan/basic_server.rb
|
86
100
|
- lib/ssh_scan/constants.rb
|
data/bin/ssh_scan.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'ssh_scan'
|
2
|
-
|
3
|
-
# Usage: ruby ssh_scan.rb 192.168.1.1
|
4
|
-
|
5
|
-
# Populate the info we need to perform a scan
|
6
|
-
ip = ARGV[0].chomp
|
7
|
-
port = ARGV[1].nil? ? 22 : ARGV[1].to_i
|
8
|
-
policy = SSHScan::IntermediatePolicy.new
|
9
|
-
|
10
|
-
# Perform scan and get results
|
11
|
-
scan_engine = SSHScan::ScanEngine.new()
|
12
|
-
result = scan_engine.scan(ip, port, policy)
|
13
|
-
|
14
|
-
puts JSON.pretty_generate(result)
|