soleranetworks 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.md → README.rdoc} +21 -15
- data/VERSION +1 -1
- data/lib/soleranetworks.rb +6 -6
- data/soleranetworks.gemspec +4 -4
- metadata +5 -5
data/{README.md → README.rdoc}
RENAMED
@@ -1,29 +1,34 @@
|
|
1
|
-
|
1
|
+
= soleranetworks
|
2
2
|
|
3
3
|
Solera Networks API Gem
|
4
4
|
|
5
|
-
|
5
|
+
= Description
|
6
6
|
|
7
7
|
Handy little library and binary to automate building Solera Networks REST API calls
|
8
8
|
|
9
|
-
|
9
|
+
== More Examples
|
10
|
+
|
11
|
+
Looking for more examples of Solera Networks' API usage in various other scripting languages? Check here: http://github.com/fracBlend/Solera-Example-Scripts
|
12
|
+
|
13
|
+
== lib/soleranetworks.rb
|
10
14
|
|
11
15
|
Library for use in your own ruby scripts to build API Call URIs
|
12
16
|
|
13
|
-
|
17
|
+
== solera_get
|
14
18
|
|
15
19
|
Command line tool that automatically builds an API Call and grabs the resulting PCAP.
|
16
20
|
|
17
|
-
|
21
|
+
= Where to get a Demo VM Appliance
|
18
22
|
|
19
23
|
Don't have a Solera DS Network Forensics Appliance?
|
20
24
|
|
21
25
|
Download a [VMWare Based Demo Appliance](http://www.soleranetworks.com/products/network-forensics-appliances/virtual-appliance)
|
22
26
|
|
23
|
-
|
27
|
+
|
28
|
+
= Install
|
24
29
|
$ sudo gem install soleranetworks
|
25
|
-
|
26
|
-
|
30
|
+
= Usage (solera_get)
|
31
|
+
== Command Line Options
|
27
32
|
$ solera_get -h
|
28
33
|
Usage: solera_get [options] host ...
|
29
34
|
-v, --verbose Output more information
|
@@ -61,13 +66,14 @@ Download a [VMWare Based Demo Appliance](http://www.soleranetworks.com/products/
|
|
61
66
|
--vlan_id VLAN_ID vlan_id
|
62
67
|
-h, --help Display this screen
|
63
68
|
|
64
|
-
|
69
|
+
== Pull all traffic from 1.2.3.4
|
65
70
|
$ solera_get -u username -p password --ipv4_address 1.2.3.4
|
66
|
-
|
71
|
+
== Pull all traffic from 1.2.3.4 occurring on 03/02/2010
|
67
72
|
$ solera_get -u username -p password --ipv4_address 1.2.3.4 --timespan 03.02.2010.00.00.00.03.03.2010.00.00.00
|
68
|
-
|
73
|
+
== Pull all DNS traffic larger than 52 bytes
|
69
74
|
$ solera_get -u username -p password --udp_port 53 --packet_length 53_to_1549
|
70
|
-
|
75
|
+
= Usage lib/soleranetworks.rb
|
76
|
+
== Example Script
|
71
77
|
require 'rubygems'
|
72
78
|
require 'soleranetworks'
|
73
79
|
|
@@ -76,7 +82,7 @@ Download a [VMWare Based Demo Appliance](http://www.soleranetworks.com/products/
|
|
76
82
|
:user => 'admin',
|
77
83
|
:pass => 'somePassword',
|
78
84
|
:ipv4_address => '1.2.3.4',
|
79
|
-
:timespan
|
85
|
+
:timespan => (Time.now.getlocal-(60*5)).strftime('%m.%d.%Y.%H.%M.%S')+"."+Time.now.getlocal.strftime('%m.%d.%Y.%H.%M.%S')
|
80
86
|
}
|
81
87
|
request = SoleraNetworks.new(options)
|
82
88
|
|
@@ -84,7 +90,7 @@ Download a [VMWare Based Demo Appliance](http://www.soleranetworks.com/products/
|
|
84
90
|
puts request.uri
|
85
91
|
# https://192.168.20.20/ws/pcap?method=deepsee&user=admin&password=somePassword&path=%2Ftimespan%2F03.25.2010.14.14.37.03.25.2010.14.19.37%2Fipv4_address%2F1.2.3.4%2Fdata.pcap
|
86
92
|
|
87
|
-
|
93
|
+
= Note on Patches/Pull Requests
|
88
94
|
|
89
95
|
* Fork the project.
|
90
96
|
* Make your feature addition or bug fix.
|
@@ -94,6 +100,6 @@ Download a [VMWare Based Demo Appliance](http://www.soleranetworks.com/products/
|
|
94
100
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
95
101
|
* Send me a pull request. Bonus points for topic branches.
|
96
102
|
|
97
|
-
|
103
|
+
= Copyright
|
98
104
|
|
99
105
|
Copyright (c) 2010 fracBlend. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/lib/soleranetworks.rb
CHANGED
@@ -28,15 +28,15 @@ class SoleraNetworks
|
|
28
28
|
# GEM Specific Method Paramaters
|
29
29
|
#
|
30
30
|
# DS Appliance Hostname / IP
|
31
|
-
:host
|
31
|
+
:host => '', # ie: 192.168.20.20
|
32
32
|
# Username for Accessing API
|
33
|
-
:user
|
33
|
+
:user => '',
|
34
34
|
# Password
|
35
|
-
:pass
|
35
|
+
:pass => '',
|
36
36
|
# Filename for returned PCAP
|
37
|
-
:output_filename
|
37
|
+
:output_filename => "data.pcap",
|
38
38
|
# Type of Request URI ['pcap', 'sonar', 'applications', 'conversations', 'packetsizes', 'ipdiscovery', 'bandwidth']
|
39
|
-
:type
|
39
|
+
:type => 'pcap',
|
40
40
|
#
|
41
41
|
# DeepSee API Method Parameters
|
42
42
|
#
|
@@ -132,7 +132,7 @@ class SoleraNetworks
|
|
132
132
|
|
133
133
|
def get_pcap(call)
|
134
134
|
open(call, 'User-Agent' => 'Wget') {|call| @pcap = call.read}
|
135
|
-
File.open(@options[:output_filename], '
|
135
|
+
File.open(@options[:output_filename], 'wb') {|file|
|
136
136
|
file.write(@pcap)
|
137
137
|
puts "#{@options[:output_filename]} : " + make_readable(file.stat.size, 2)
|
138
138
|
}
|
data/soleranetworks.gemspec
CHANGED
@@ -5,24 +5,24 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{soleranetworks}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["fracBlend"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-01}
|
13
13
|
s.default_executable = %q{solera_get}
|
14
14
|
s.description = %q{Solera Neworks API gem}
|
15
15
|
s.email = %q{gbelknap@soleranetworks.com}
|
16
16
|
s.executables = ["solera_get"]
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE",
|
19
|
-
"README.
|
19
|
+
"README.rdoc"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
22
|
".document",
|
23
23
|
".gitignore",
|
24
24
|
"LICENSE",
|
25
|
-
"README.
|
25
|
+
"README.rdoc",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION",
|
28
28
|
"bin/solera_get",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 6
|
9
|
+
version: 0.1.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- fracBlend
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-01 00:00:00 -06:00
|
18
18
|
default_executable: solera_get
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -26,12 +26,12 @@ extensions: []
|
|
26
26
|
|
27
27
|
extra_rdoc_files:
|
28
28
|
- LICENSE
|
29
|
-
- README.
|
29
|
+
- README.rdoc
|
30
30
|
files:
|
31
31
|
- .document
|
32
32
|
- .gitignore
|
33
33
|
- LICENSE
|
34
|
-
- README.
|
34
|
+
- README.rdoc
|
35
35
|
- Rakefile
|
36
36
|
- VERSION
|
37
37
|
- bin/solera_get
|