ronin 1.1.0.rc3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,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_organizations_table'
21
- require 'ronin/database/migrations/migrations'
22
-
23
- module Ronin
24
- module Database
25
- module Migrations
26
- migration(
27
- :create_addresses_table,
28
- :needs => :create_organizations_table
29
- ) do
30
- up do
31
- create_table :ronin_addresses do
32
- column :id, Integer, :serial => true
33
- column :type, String, :not_null => true
34
- column :version, Integer
35
- column :address, String, :length => 256, :not_null => true
36
- column :organization_id, Integer
37
- column :created_at, Time, :not_null => true
38
- end
39
-
40
- create_index :ronin_addresses, :address, :unique => true
41
- end
42
-
43
- down do
44
- drop_table :ronin_addresses
45
- end
46
- end
47
- end
48
- end
49
- 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_arches_table) do
26
- up do
27
- create_table :ronin_arches do
28
- column :id, Integer, :serial => true
29
- column :name, String, :not_null => true
30
- column :endian, String, :not_null => true
31
- column :address_length, Integer, :not_null => true
32
- end
33
-
34
- create_index :ronin_arches, :name, :unique => true
35
- end
36
-
37
- down do
38
- drop_table :ronin_arches
39
- end
40
- end
41
- end
42
- end
43
- 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/migrations'
21
-
22
- module Ronin
23
- module Database
24
- module Migrations
25
- migration(:create_authors_table) do
26
- up do
27
- create_table :ronin_authors do
28
- column :id, Integer, :serial => true
29
- column :name, String
30
- column :organization, String
31
- column :pgp_signature, String
32
- column :email, String
33
- column :site, String
34
- column :biography, Text
35
- end
36
-
37
- create_index :ronin_authors, :name
38
- end
39
-
40
- down do
41
- drop_table :ronin_authors
42
- end
43
- end
44
- end
45
- end
46
- 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_campaigns_table) do
26
- up do
27
- create_table :ronin_campaigns 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
32
- end
33
-
34
- create_index :ronin_campaigns, :name, :unique => true
35
- end
36
-
37
- down do
38
- drop_table :ronin_campaigns
39
- end
40
- end
41
- end
42
- end
43
- 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_countries_table) do
26
- up do
27
- create_table :ronin_countries do
28
- column :id, Integer, :serial => true
29
- column :name, String, :not_null => true
30
- column :code, String, :length => 2, :not_null => true
31
- end
32
-
33
- create_index :ronin_countries, :name, :unique => true
34
- create_index :ronin_countries, :code, :unique => true
35
- end
36
-
37
- down do
38
- drop_table :ronin_countries
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,64 +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_user_names_table'
21
- require 'ronin/database/migrations/create_passwords_table'
22
- require 'ronin/database/migrations/create_open_ports_table'
23
- require 'ronin/database/migrations/create_urls_table'
24
- require 'ronin/database/migrations/create_proxies_table'
25
- require 'ronin/database/migrations/migrations'
26
-
27
- module Ronin
28
- module Database
29
- module Migrations
30
- migration(
31
- :create_credentials_table,
32
- :needs => [
33
- :create_user_names_table,
34
- :create_passwords_table,
35
- :create_open_ports_table,
36
- :create_urls_table,
37
- :create_proxies_table
38
- ]
39
- ) do
40
- up do
41
- create_table :ronin_credentials do
42
- column :id, Serial
43
- column :user_name_id, Integer, :not_null => true
44
- column :password_id, Integer, :not_null => true
45
-
46
- column :open_port_id, Integer
47
- column :email_address_id, Integer
48
- column :url_id, Integer
49
- end
50
-
51
- create_index :ronin_credentials,
52
- :user_name_id, :password_id,
53
- :open_port_id, :email_address_id, :url_id,
54
- :name => :unique_index_ronin_credentials,
55
- :unique => true
56
- end
57
-
58
- down do
59
- drop_table :ronin_credentials
60
- end
61
- end
62
- end
63
- end
64
- end
@@ -1,50 +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_user_names_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_email_addresses_table,
29
- :needs => [:create_user_names_table, :create_addresses_table]
30
- ) do
31
- up do
32
- create_table :ronin_email_addresses do
33
- column :id, Serial
34
- column :user_name_id, Integer, :not_null => true
35
- column :host_name_id, Integer, :not_null => true
36
- column :created_at, Time, :not_null => true
37
- end
38
-
39
- create_index :ronin_email_addresses, :user_name_id, :host_name_id,
40
- :name => :unique_index_ronin_email_addresses,
41
- :unique => true
42
- end
43
-
44
- down do
45
- drop_table :ronin_email_addresses
46
- end
47
- end
48
- end
49
- end
50
- end
@@ -1,50 +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_host_name_ip_addresses_table,
28
- :needs => :create_addresses_table
29
- ) do
30
- up do
31
- create_table :ronin_host_name_ip_addresses do
32
- column :id, Serial
33
- column :host_name_id, Integer, :not_null => true
34
- column :ip_address_id, Integer, :not_null => true
35
- column :created_at, Time, :not_null => true
36
- end
37
-
38
- create_index :ronin_host_name_ip_addresses,
39
- :host_name_id, :ip_address_id,
40
- :name => :unique_index_ronin_host_name_ip_addresses,
41
- :unique => true
42
- end
43
-
44
- down do
45
- drop_table :ronin_host_name_ip_addresses
46
- end
47
- end
48
- end
49
- end
50
- end
@@ -1,50 +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_ip_address_mac_addresses_table,
28
- :needs => :create_addresses_table
29
- ) do
30
- up do
31
- create_table :ronin_ip_address_mac_addresses do
32
- column :id, Serial
33
- column :ip_address_id, Integer, :not_null => true
34
- column :mac_address_id, Integer, :not_null => true
35
- column :created_at, Time, :not_null => true
36
- end
37
-
38
- create_index :ronin_ip_address_mac_addresses,
39
- :ip_address_id, :mac_address_id,
40
- :name => :unique_index_ronin_ip_address_mac_addresses,
41
- :unique => true
42
- end
43
-
44
- down do
45
- drop_table :ronin_ip_address_mac_addresses
46
- end
47
- end
48
- end
49
- end
50
- end