ronin 1.1.0.rc3 → 1.1.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/ChangeLog.md +10 -5
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +4 -4
- data/bin/ronin +2 -2
- data/bin/ronin-campaigns +2 -2
- data/bin/ronin-console +2 -2
- data/bin/ronin-creds +2 -2
- data/bin/ronin-database +2 -2
- data/bin/ronin-emails +2 -2
- data/bin/ronin-exec +2 -2
- data/bin/ronin-help +2 -2
- data/bin/ronin-hosts +2 -2
- data/bin/ronin-ips +2 -2
- data/bin/ronin-repos +2 -2
- data/bin/ronin-urls +2 -2
- data/gemspec.yml +2 -4
- data/lib/ronin/database/database.rb +12 -13
- data/lib/ronin/database/migrations.rb +2 -29
- data/lib/ronin/database/migrations/1.0.0.rb +568 -0
- data/lib/ronin/database/migrations/1.1.0.rb +125 -0
- data/lib/ronin/spec/database.rb +1 -4
- data/lib/ronin/target.rb +0 -19
- data/lib/ronin/ui/cli/cli.rb +1 -1
- data/lib/ronin/ui/cli/commands/database.rb +15 -22
- data/lib/ronin/ui/output/output.rb +1 -1
- data/lib/ronin/url.rb +23 -24
- data/lib/ronin/url_query_param.rb +4 -6
- data/lib/ronin/url_query_param_name.rb +89 -0
- data/lib/ronin/user_name.rb +0 -2
- data/lib/ronin/version.rb +1 -1
- data/ronin.gemspec +129 -13
- data/spec/host_name_spec.rb +9 -10
- data/spec/ip_address.rb +3 -3
- data/spec/url_query_param_spec.rb +5 -3
- data/spec/url_spec.rb +14 -9
- metadata +9 -35
- data/lib/ronin/database/migrations/add_created_at_column_to_targets_table.rb +0 -48
- data/lib/ronin/database/migrations/add_updated_at_column_to_campaigns_table.rb +0 -47
- data/lib/ronin/database/migrations/create_addresses_table.rb +0 -49
- data/lib/ronin/database/migrations/create_arches_table.rb +0 -43
- data/lib/ronin/database/migrations/create_authors_table.rb +0 -46
- data/lib/ronin/database/migrations/create_campaigns_table.rb +0 -43
- data/lib/ronin/database/migrations/create_countries_table.rb +0 -43
- data/lib/ronin/database/migrations/create_credentials_table.rb +0 -64
- data/lib/ronin/database/migrations/create_email_addresses_table.rb +0 -50
- data/lib/ronin/database/migrations/create_host_name_ip_addresses_table.rb +0 -50
- data/lib/ronin/database/migrations/create_ip_address_mac_addresses_table.rb +0 -50
- data/lib/ronin/database/migrations/create_licenses_table.rb +0 -43
- data/lib/ronin/database/migrations/create_open_ports_table.rb +0 -56
- data/lib/ronin/database/migrations/create_organizations_table.rb +0 -43
- data/lib/ronin/database/migrations/create_os_guesses_table.rb +0 -49
- data/lib/ronin/database/migrations/create_os_table.rb +0 -42
- data/lib/ronin/database/migrations/create_passwords_table.rb +0 -41
- data/lib/ronin/database/migrations/create_ports_table.rb +0 -47
- data/lib/ronin/database/migrations/create_proxies_table.rb +0 -54
- data/lib/ronin/database/migrations/create_repositories_table.rb +0 -60
- data/lib/ronin/database/migrations/create_script_paths_table.rb +0 -46
- data/lib/ronin/database/migrations/create_services_table.rb +0 -46
- data/lib/ronin/database/migrations/create_softwares_table.rb +0 -45
- data/lib/ronin/database/migrations/create_targets_table.rb +0 -49
- data/lib/ronin/database/migrations/create_url_query_params_table.rb +0 -41
- data/lib/ronin/database/migrations/create_url_schemes_table.rb +0 -39
- data/lib/ronin/database/migrations/create_urls_table.rb +0 -65
- data/lib/ronin/database/migrations/create_user_names_table.rb +0 -42
- data/lib/ronin/database/migrations/create_vendors_table.rb +0 -41
@@ -1,43 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/migrations'
|
21
|
-
|
22
|
-
module Ronin
|
23
|
-
module Database
|
24
|
-
module Migrations
|
25
|
-
migration(:create_licenses_table) do
|
26
|
-
up do
|
27
|
-
create_table :ronin_licenses do
|
28
|
-
column :id, Integer, :serial => true
|
29
|
-
column :name, String, :not_null => true
|
30
|
-
column :description, Text, :not_null => true
|
31
|
-
column :url, String, :length => 256
|
32
|
-
end
|
33
|
-
|
34
|
-
create_index :ronin_licenses, :name, :unique => true
|
35
|
-
end
|
36
|
-
|
37
|
-
down do
|
38
|
-
drop_table :ronin_licenses
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/create_addresses_table'
|
21
|
-
require 'ronin/database/migrations/create_ports_table'
|
22
|
-
require 'ronin/database/migrations/migrations'
|
23
|
-
|
24
|
-
module Ronin
|
25
|
-
module Database
|
26
|
-
module Migrations
|
27
|
-
migration(
|
28
|
-
:create_open_ports_table,
|
29
|
-
:needs => [
|
30
|
-
:create_addresses_table,
|
31
|
-
:create_ports_table,
|
32
|
-
]
|
33
|
-
) do
|
34
|
-
up do
|
35
|
-
create_table :ronin_open_ports do
|
36
|
-
column :id, Integer, :serial => true
|
37
|
-
column :ip_address_id, Integer, :not_null => true
|
38
|
-
column :port_id, Integer, :not_null => true
|
39
|
-
column :service_id, Integer
|
40
|
-
column :last_scanned_at, Time
|
41
|
-
column :created_at, Time, :not_null => true
|
42
|
-
end
|
43
|
-
|
44
|
-
create_index :ronin_open_ports,
|
45
|
-
:ip_address_id, :port_id, :service_id,
|
46
|
-
:name => :unique_index_ronin_open_ports,
|
47
|
-
:unique => true
|
48
|
-
end
|
49
|
-
|
50
|
-
down do
|
51
|
-
drop_table :ronin_open_ports
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/migrations'
|
21
|
-
|
22
|
-
module Ronin
|
23
|
-
module Database
|
24
|
-
module Migrations
|
25
|
-
migration(:create_organizations_table) do
|
26
|
-
up do
|
27
|
-
create_table :ronin_organizations do
|
28
|
-
column :id, Integer, :serial => true
|
29
|
-
column :name, String, :not_null => true
|
30
|
-
column :description, Text, :not_null => true
|
31
|
-
column :created_at, Time, :not_null => true
|
32
|
-
end
|
33
|
-
|
34
|
-
create_index :ronin_organizations, :name, :unique => true
|
35
|
-
end
|
36
|
-
|
37
|
-
down do
|
38
|
-
drop_table :ronin_organizations
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/create_addresses_table'
|
21
|
-
require 'ronin/database/migrations/migrations'
|
22
|
-
|
23
|
-
module Ronin
|
24
|
-
module Database
|
25
|
-
module Migrations
|
26
|
-
migration(
|
27
|
-
:create_os_guesses_table,
|
28
|
-
:needs => [:create_addresses_table, :create_os_table]
|
29
|
-
) do
|
30
|
-
up do
|
31
|
-
create_table :ronin_os_guesses do
|
32
|
-
column :id, Serial
|
33
|
-
column :ip_address_id, Integer, :not_null => true
|
34
|
-
column :os_id, Integer, :not_null => true
|
35
|
-
column :created_at, Time, :not_null => true
|
36
|
-
end
|
37
|
-
|
38
|
-
create_index :ronin_os_guesses, :ip_address_id, :os_id,
|
39
|
-
:name => :unique_index_ronin_os_guesses,
|
40
|
-
:unique => true
|
41
|
-
end
|
42
|
-
|
43
|
-
down do
|
44
|
-
drop_table :ronin_os_guesses
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/migrations'
|
21
|
-
|
22
|
-
module Ronin
|
23
|
-
module Database
|
24
|
-
module Migrations
|
25
|
-
migration(:create_os_table) do
|
26
|
-
up do
|
27
|
-
create_table :ronin_os do
|
28
|
-
column :id, Integer, :serial => true
|
29
|
-
column :name, String, :not_null => true
|
30
|
-
column :version, String
|
31
|
-
end
|
32
|
-
|
33
|
-
create_index :ronin_os, :name
|
34
|
-
end
|
35
|
-
|
36
|
-
down do
|
37
|
-
drop_table :ronin_os
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/migrations'
|
21
|
-
|
22
|
-
module Ronin
|
23
|
-
module Database
|
24
|
-
module Migrations
|
25
|
-
migration(:create_passwords_table) do
|
26
|
-
up do
|
27
|
-
create_table :ronin_passwords do
|
28
|
-
column :id, Integer, :serial => true
|
29
|
-
column :clear_text, String, :length => 256, :not_null => true
|
30
|
-
end
|
31
|
-
|
32
|
-
create_index :ronin_passwords, :clear_text, :unique => true
|
33
|
-
end
|
34
|
-
|
35
|
-
down do
|
36
|
-
drop_table :ronin_passwords
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/create_organizations_table'
|
21
|
-
require 'ronin/database/migrations/migrations'
|
22
|
-
|
23
|
-
module Ronin
|
24
|
-
module Database
|
25
|
-
module Migrations
|
26
|
-
migration(
|
27
|
-
:create_ports_table,
|
28
|
-
:needs => :create_organizations_table
|
29
|
-
) do
|
30
|
-
up do
|
31
|
-
create_table :ronin_ports do
|
32
|
-
column :id, Integer, :serial => true
|
33
|
-
column :protocol, String, :not_null => true
|
34
|
-
column :number, Integer, :not_null => true
|
35
|
-
column :organization_id, Integer
|
36
|
-
end
|
37
|
-
|
38
|
-
create_index :ronin_ports, :protocol, :number, :name => :protocol_number, :unique => true
|
39
|
-
end
|
40
|
-
|
41
|
-
down do
|
42
|
-
drop_table :ronin_ports
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/create_addresses_table'
|
21
|
-
require 'ronin/database/migrations/create_ports_table'
|
22
|
-
require 'ronin/database/migrations/migrations'
|
23
|
-
|
24
|
-
module Ronin
|
25
|
-
module Database
|
26
|
-
module Migrations
|
27
|
-
migration(
|
28
|
-
:create_proxies_table,
|
29
|
-
:needs => [
|
30
|
-
:create_addresses_table,
|
31
|
-
:create_ports_table
|
32
|
-
]
|
33
|
-
) do
|
34
|
-
up do
|
35
|
-
create_table :ronin_proxies do
|
36
|
-
column :id, Integer, :serial => true
|
37
|
-
column :type, String, :not_null => true
|
38
|
-
column :anonymous, Boolean, :default => false
|
39
|
-
column :latency, Float
|
40
|
-
column :alive, Boolean, :default => true
|
41
|
-
column :ip_address_id, Integer, :not_null => true
|
42
|
-
column :port_id, Integer, :not_null => true
|
43
|
-
column :created_at, DateTime
|
44
|
-
column :updated_at, DateTime
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
down do
|
49
|
-
drop_table :ronin_proxies
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
|
-
#
|
4
|
-
# This file is part of Ronin.
|
5
|
-
#
|
6
|
-
# Ronin is free software: you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
9
|
-
# (at your option) any later version.
|
10
|
-
#
|
11
|
-
# Ronin is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
|
-
#
|
19
|
-
|
20
|
-
require 'ronin/database/migrations/create_licenses_table'
|
21
|
-
require 'ronin/database/migrations/migrations'
|
22
|
-
|
23
|
-
module Ronin
|
24
|
-
module Database
|
25
|
-
module Migrations
|
26
|
-
migration(:create_repositories_table, :needs => :create_licenses_table) do
|
27
|
-
up do
|
28
|
-
create_table :ronin_repositories do
|
29
|
-
column :id, Integer, :serial => true
|
30
|
-
column :scm, String
|
31
|
-
column :path, FilePath, :not_null => true
|
32
|
-
column :uri, DataMapper::Property::URI
|
33
|
-
column :installed, Boolean, :default => false
|
34
|
-
column :name, String
|
35
|
-
column :domain, String, :not_null => true
|
36
|
-
column :title, Text
|
37
|
-
column :source, DataMapper::Property::URI
|
38
|
-
column :website, DataMapper::Property::URI
|
39
|
-
column :description, Text
|
40
|
-
|
41
|
-
column :license_id, Integer
|
42
|
-
end
|
43
|
-
|
44
|
-
create_table :ronin_author_repositories do
|
45
|
-
column :id, Integer, :serial => true
|
46
|
-
column :author_id, Integer
|
47
|
-
column :repository_id, Integer
|
48
|
-
end
|
49
|
-
|
50
|
-
create_index :ronin_repositories, :path, :unique => true
|
51
|
-
end
|
52
|
-
|
53
|
-
down do
|
54
|
-
drop_table :ronin_author_repositories
|
55
|
-
drop_table :ronin_repositories
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|