ronin 1.2.0 → 1.3.0
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.
- data/.gitignore +11 -0
- data/ChangeLog.md +28 -10
- data/Gemfile +1 -1
- data/README.md +14 -41
- data/Rakefile +3 -0
- data/gemspec.yml +14 -15
- data/lib/bond/completions/ronin.rb +0 -5
- data/lib/ronin/address.rb +17 -0
- data/lib/ronin/author.rb +1 -1
- data/lib/ronin/database/database.rb +11 -3
- data/lib/ronin/email_address.rb +33 -0
- data/lib/ronin/host_name.rb +57 -6
- data/lib/ronin/ip_address.rb +49 -5
- data/lib/ronin/license.rb +1 -1
- data/lib/ronin/mac_address.rb +39 -1
- data/lib/ronin/model/has_license.rb +12 -3
- data/lib/ronin/model/importable.rb +65 -0
- data/lib/ronin/repository.rb +12 -4
- data/lib/ronin/spec/database.rb +1 -1
- data/lib/ronin/tcp_port.rb +3 -12
- data/lib/ronin/udp_port.rb +2 -11
- data/lib/ronin/ui/cli/commands/emails.rb +0 -45
- data/lib/ronin/ui/cli/commands/hosts.rb +4 -31
- data/lib/ronin/ui/cli/commands/ips.rb +4 -30
- data/lib/ronin/ui/cli/commands/urls.rb +5 -45
- data/lib/ronin/ui/cli/model_command.rb +17 -27
- data/lib/ronin/ui/cli/resources_command.rb +25 -1
- data/lib/ronin/ui/cli/script_command.rb +1 -1
- data/lib/ronin/ui/console/context.rb +1 -1
- data/lib/ronin/url.rb +43 -1
- data/lib/ronin/version.rb +1 -1
- data/ronin.gemspec +1 -1
- data/spec/email_address_spec.rb +20 -0
- data/spec/host_name_spec.rb +20 -0
- data/spec/ip_address_spec.rb +104 -0
- data/spec/mac_address_spec.rb +20 -0
- data/spec/url_spec.rb +24 -0
- metadata +118 -155
- data/lib/ronin/network/mixins.rb +0 -27
- data/lib/ronin/network/mixins/esmtp.rb +0 -165
- data/lib/ronin/network/mixins/http.rb +0 -723
- data/lib/ronin/network/mixins/imap.rb +0 -151
- data/lib/ronin/network/mixins/pop3.rb +0 -141
- data/lib/ronin/network/mixins/smtp.rb +0 -159
- data/lib/ronin/network/mixins/tcp.rb +0 -331
- data/lib/ronin/network/mixins/telnet.rb +0 -199
- data/lib/ronin/network/mixins/udp.rb +0 -227
- data/lib/ronin/spec/ui/output.rb +0 -28
- data/lib/ronin/ui/output.rb +0 -21
- data/lib/ronin/ui/output/helpers.rb +0 -248
- data/lib/ronin/ui/output/output.rb +0 -146
- data/lib/ronin/ui/output/terminal.rb +0 -21
- data/lib/ronin/ui/output/terminal/color.rb +0 -118
- data/lib/ronin/ui/output/terminal/raw.rb +0 -103
- data/lib/ronin/ui/shell.rb +0 -92
- data/spec/ip_address.rb +0 -84
- data/spec/ui/output_spec.rb +0 -32
data/spec/ip_address.rb
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/ip_address'
|
3
|
-
|
4
|
-
describe IPAddress do
|
5
|
-
let(:example_domain) { 'localhost' }
|
6
|
-
let(:example_ip) { '127.0.0.1' }
|
7
|
-
|
8
|
-
subject { IPAddress.new(:address => example_ip) }
|
9
|
-
|
10
|
-
it "should require an address" do
|
11
|
-
ip = IPAddress.new
|
12
|
-
|
13
|
-
ip.should_not be_valid
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "lookup" do
|
17
|
-
subject { IPAddress }
|
18
|
-
|
19
|
-
let(:bad_domain) { '.bad.domain.com.' }
|
20
|
-
|
21
|
-
it "should lookup host-names to IP Addresses" do
|
22
|
-
ips = subject.lookup(example_domain)
|
23
|
-
|
24
|
-
ips.should_not be_empty
|
25
|
-
ips[0].address.should == example_ip
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should associate the IP addresses with the original host name" do
|
29
|
-
ips = subject.lookup(example_domain)
|
30
|
-
|
31
|
-
ips.each do |ip|
|
32
|
-
ip.host_names[0].address.should == example_domain
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return an empty Array for unknown domain names" do
|
37
|
-
ips = subject.lookup(bad_domain)
|
38
|
-
|
39
|
-
ips.should be_empty
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
describe "#lookup!" do
|
44
|
-
let(:bad_ip) { '0.0.0.0' }
|
45
|
-
|
46
|
-
it "should reverse lookup the host-name for an IP Address" do
|
47
|
-
host_names = subject.lookup!
|
48
|
-
|
49
|
-
host_names.should_not be_empty
|
50
|
-
host_names[0].address.should == example_domain
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should associate the host names with the original IP address" do
|
54
|
-
host_names = subject.lookup!
|
55
|
-
|
56
|
-
host_names.each do |host_name|
|
57
|
-
host_name.ip_addresses[0].address.should == subject
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should return an empty Array for unknown domain names" do
|
62
|
-
ip = IPAddress.new(:address => bad_ip)
|
63
|
-
host_names = ip.lookup!
|
64
|
-
|
65
|
-
host_names.should be_nil
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
describe "#version" do
|
70
|
-
let(:ipv4) { IPAddress.new(:address => '127.0.0.1') }
|
71
|
-
let(:ipv6) { IPAddress.new(:address => '::1') }
|
72
|
-
|
73
|
-
it "should only accept 4 or 6" do
|
74
|
-
ip = IPAddress.new(:address => '1.1.1.1', :version => 7)
|
75
|
-
|
76
|
-
ip.should_not be_valid
|
77
|
-
end
|
78
|
-
|
79
|
-
it "should default to the version of the address" do
|
80
|
-
ipv4.version.should == 4
|
81
|
-
ipv6.version.should == 6
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
data/spec/ui/output_spec.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/ui/output'
|
3
|
-
|
4
|
-
describe UI::Output do
|
5
|
-
it "should be quiet by default" do
|
6
|
-
should be_quiet
|
7
|
-
end
|
8
|
-
|
9
|
-
it "may become verbose" do
|
10
|
-
subject.verbose!
|
11
|
-
|
12
|
-
should be_verbose
|
13
|
-
should_not be_quiet
|
14
|
-
should_not be_silent
|
15
|
-
end
|
16
|
-
|
17
|
-
it "may become quiet" do
|
18
|
-
subject.quiet!
|
19
|
-
|
20
|
-
should be_quiet
|
21
|
-
should_not be_silent
|
22
|
-
should_not be_verbose
|
23
|
-
end
|
24
|
-
|
25
|
-
it "may become silent" do
|
26
|
-
subject.silent!
|
27
|
-
|
28
|
-
should be_silent
|
29
|
-
should_not be_quiet
|
30
|
-
should_not be_verbose
|
31
|
-
end
|
32
|
-
end
|