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.
Files changed (66) hide show
  1. data/ChangeLog.md +10 -5
  2. data/Gemfile +1 -1
  3. data/README.md +1 -1
  4. data/Rakefile +4 -4
  5. data/bin/ronin +2 -2
  6. data/bin/ronin-campaigns +2 -2
  7. data/bin/ronin-console +2 -2
  8. data/bin/ronin-creds +2 -2
  9. data/bin/ronin-database +2 -2
  10. data/bin/ronin-emails +2 -2
  11. data/bin/ronin-exec +2 -2
  12. data/bin/ronin-help +2 -2
  13. data/bin/ronin-hosts +2 -2
  14. data/bin/ronin-ips +2 -2
  15. data/bin/ronin-repos +2 -2
  16. data/bin/ronin-urls +2 -2
  17. data/gemspec.yml +2 -4
  18. data/lib/ronin/database/database.rb +12 -13
  19. data/lib/ronin/database/migrations.rb +2 -29
  20. data/lib/ronin/database/migrations/1.0.0.rb +568 -0
  21. data/lib/ronin/database/migrations/1.1.0.rb +125 -0
  22. data/lib/ronin/spec/database.rb +1 -4
  23. data/lib/ronin/target.rb +0 -19
  24. data/lib/ronin/ui/cli/cli.rb +1 -1
  25. data/lib/ronin/ui/cli/commands/database.rb +15 -22
  26. data/lib/ronin/ui/output/output.rb +1 -1
  27. data/lib/ronin/url.rb +23 -24
  28. data/lib/ronin/url_query_param.rb +4 -6
  29. data/lib/ronin/url_query_param_name.rb +89 -0
  30. data/lib/ronin/user_name.rb +0 -2
  31. data/lib/ronin/version.rb +1 -1
  32. data/ronin.gemspec +129 -13
  33. data/spec/host_name_spec.rb +9 -10
  34. data/spec/ip_address.rb +3 -3
  35. data/spec/url_query_param_spec.rb +5 -3
  36. data/spec/url_spec.rb +14 -9
  37. metadata +9 -35
  38. data/lib/ronin/database/migrations/add_created_at_column_to_targets_table.rb +0 -48
  39. data/lib/ronin/database/migrations/add_updated_at_column_to_campaigns_table.rb +0 -47
  40. data/lib/ronin/database/migrations/create_addresses_table.rb +0 -49
  41. data/lib/ronin/database/migrations/create_arches_table.rb +0 -43
  42. data/lib/ronin/database/migrations/create_authors_table.rb +0 -46
  43. data/lib/ronin/database/migrations/create_campaigns_table.rb +0 -43
  44. data/lib/ronin/database/migrations/create_countries_table.rb +0 -43
  45. data/lib/ronin/database/migrations/create_credentials_table.rb +0 -64
  46. data/lib/ronin/database/migrations/create_email_addresses_table.rb +0 -50
  47. data/lib/ronin/database/migrations/create_host_name_ip_addresses_table.rb +0 -50
  48. data/lib/ronin/database/migrations/create_ip_address_mac_addresses_table.rb +0 -50
  49. data/lib/ronin/database/migrations/create_licenses_table.rb +0 -43
  50. data/lib/ronin/database/migrations/create_open_ports_table.rb +0 -56
  51. data/lib/ronin/database/migrations/create_organizations_table.rb +0 -43
  52. data/lib/ronin/database/migrations/create_os_guesses_table.rb +0 -49
  53. data/lib/ronin/database/migrations/create_os_table.rb +0 -42
  54. data/lib/ronin/database/migrations/create_passwords_table.rb +0 -41
  55. data/lib/ronin/database/migrations/create_ports_table.rb +0 -47
  56. data/lib/ronin/database/migrations/create_proxies_table.rb +0 -54
  57. data/lib/ronin/database/migrations/create_repositories_table.rb +0 -60
  58. data/lib/ronin/database/migrations/create_script_paths_table.rb +0 -46
  59. data/lib/ronin/database/migrations/create_services_table.rb +0 -46
  60. data/lib/ronin/database/migrations/create_softwares_table.rb +0 -45
  61. data/lib/ronin/database/migrations/create_targets_table.rb +0 -49
  62. data/lib/ronin/database/migrations/create_url_query_params_table.rb +0 -41
  63. data/lib/ronin/database/migrations/create_url_schemes_table.rb +0 -39
  64. data/lib/ronin/database/migrations/create_urls_table.rb +0 -65
  65. data/lib/ronin/database/migrations/create_user_names_table.rb +0 -42
  66. data/lib/ronin/database/migrations/create_vendors_table.rb +0 -41
@@ -1,46 +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_repositories_table'
21
- require 'ronin/database/migrations/migrations'
22
-
23
- module Ronin
24
- module Database
25
- module Migrations
26
- migration(
27
- :create_script_paths_table,
28
- :needs => :create_repositories_table
29
- ) do
30
- up do
31
- create_table :ronin_script_paths do
32
- column :id, Integer, :serial => true
33
- column :path, FilePath, :not_null => true
34
- column :timestamp, Time, :not_null => true
35
- column :class_name, String, :not_null => true
36
- column :repository_id, Integer, :not_null => true
37
- end
38
- end
39
-
40
- down do
41
- drop_table :ronin_script_paths
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,46 +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_services_table,
28
- :needs => :create_organizations_table
29
- ) do
30
- up do
31
- create_table :ronin_services do
32
- column :id, Integer, :serial => true
33
- column :name, String, :not_null => true
34
- column :organization_id, Integer
35
- end
36
-
37
- create_index :ronin_services, :name, :unique => true
38
- end
39
-
40
- down do
41
- drop_table :ronin_services
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,45 +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_softwares_table'
21
- require 'ronin/database/migrations/migrations'
22
-
23
- module Ronin
24
- module Database
25
- module Migrations
26
- migration(:create_softwares_table, :needs => :create_vendors_table) do
27
- up do
28
- create_table :ronin_softwares do
29
- column :id, Integer, :serial => true
30
- column :name, String, :not_null => true
31
- column :version, String, :not_null => true
32
- column :vendor_id, Integer
33
- end
34
-
35
- create_index :ronin_softwares, :name
36
- create_index :ronin_softwares, :version
37
- end
38
-
39
- down do
40
- drop_table :ronin_arches
41
- end
42
- end
43
- end
44
- end
45
- 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_campaigns_table'
21
- require 'ronin/database/migrations/create_addresses_table'
22
- require 'ronin/database/migrations/migrations'
23
-
24
- module Ronin
25
- module Database
26
- module Migrations
27
- migration(
28
- :create_targets_table,
29
- :needs => [:create_campaigns_table, :create_addresses_table]
30
- ) do
31
- up do
32
- create_table :ronin_targets do
33
- column :id, Integer, :serial => true
34
- column :campaign_id, Integer, :not_null => true
35
- column :address_id, Integer, :not_null => true
36
- end
37
-
38
- create_index :ronin_targets, :campaign_id, :address_id,
39
- :name => :unique_index_ronin_campaigns,
40
- :unique => true
41
- end
42
-
43
- down do
44
- drop_table :ronin_targets
45
- end
46
- end
47
- end
48
- end
49
- 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_url_query_params_table) do
26
- up do
27
- create_table :ronin_url_query_params do
28
- column :id, Integer, :serial => true
29
- column :name, String, :length => 256, :not_null => true
30
- column :value, Text
31
- column :url_id, Integer, :not_null => true
32
- end
33
- end
34
-
35
- down do
36
- drop_table :ronin_url_query_params
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,39 +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_url_schemes_table) do
26
- up do
27
- create_table :ronin_url_schemes do
28
- column :id, Integer, :serial => true
29
- column :name, String, :not_null => true
30
- end
31
- end
32
-
33
- down do
34
- drop_table :ronin_url_schemes
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,65 +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_url_schemes_table'
21
- require 'ronin/database/migrations/create_url_query_params_table'
22
- require 'ronin/database/migrations/create_addresses_table'
23
- require 'ronin/database/migrations/create_ports_table'
24
- require 'ronin/database/migrations/migrations'
25
-
26
- module Ronin
27
- module Database
28
- module Migrations
29
- migration(
30
- :create_urls_table,
31
- :needs => [
32
- :create_url_schemes_table,
33
- :create_url_query_params_table,
34
- :create_addresses_table,
35
- :create_ports_table
36
- ]
37
- ) do
38
- up do
39
- create_table :ronin_urls do
40
- column :id, Integer, :serial => true
41
- column :scheme_id, Integer, :not_null => true
42
- column :host_name_id, Integer, :not_null => true
43
- column :port_id, Integer
44
- column :path, String
45
- column :fragment, String
46
- column :last_scanned_at, Time
47
- column :created_at, Time, :not_null => true
48
- end
49
-
50
- create_index :ronin_urls, :scheme_id,
51
- :host_name_id,
52
- :port_id,
53
- :path,
54
- :fragment,
55
- :name => :unique_index_ronin_urls,
56
- :unique => true
57
- end
58
-
59
- down do
60
- drop_table :ronin_urls
61
- end
62
- end
63
- end
64
- end
65
- 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_user_names_table) do
26
- up do
27
- create_table :ronin_user_names do
28
- column :id, Integer, :serial => true
29
- column :name, String, :not_null => true
30
- column :created_at, Time, :not_null => true
31
- end
32
-
33
- create_index :ronin_user_names, :name, :unique => true
34
- end
35
-
36
- down do
37
- drop_table :ronin_user_names
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_vendors_table) do
26
- up do
27
- create_table :ronin_vendors do
28
- column :id, Integer, :serial => true
29
- column :name, String, :not_null => true
30
- end
31
-
32
- create_index :ronin_vendors, :name, :unique => true
33
- end
34
-
35
- down do
36
- drop_table :ronin_vendors
37
- end
38
- end
39
- end
40
- end
41
- end