Skip to content

Commit

Permalink
Switched to using require_relative for loading local files (closes #87
Browse files Browse the repository at this point in the history
).
  • Loading branch information
postmodern committed Aug 6, 2024
1 parent 18a9ec5 commit 405b249
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 55 deletions.
3 changes: 2 additions & 1 deletion lib/ronin/vulns/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/version'
require 'ronin/core/cli/help/banner'

require 'command_kit/commands'
require 'command_kit/commands/auto_load'
require 'command_kit/options/version'

require_relative 'version'

module Ronin
module Vulns
#
Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/vulns/cli/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/root'
require 'ronin/core/cli/command'

require_relative '../root'

module Ronin
module Vulns
class CLI
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/command_injection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/command_injection'
require_relative '../web_vuln_command'
require_relative '../../command_injection'

module Ronin
module Vulns
Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/vulns/cli/commands/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/root'
require 'ronin/core/cli/completion_command'

require_relative '../../root'

module Ronin
module Vulns
class CLI
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/command'
require 'ronin/vulns/cli/ruby_shell'
require_relative '../command'
require_relative '../ruby_shell'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/lfi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/lfi'
require_relative '../web_vuln_command'
require_relative '../../lfi'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/open_redirect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/open_redirect'
require_relative '../web_vuln_command'
require_relative '../../open_redirect'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/reflected_xss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/reflected_xss'
require_relative '../web_vuln_command'
require_relative '../../reflected_xss'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/rfi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/rfi'
require_relative '../web_vuln_command'
require_relative '../../rfi'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/url_scanner'
require_relative '../web_vuln_command'
require_relative '../../url_scanner'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/sqli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/sqli'
require_relative '../web_vuln_command'
require_relative '../../sqli'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/cli/commands/ssti.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/web_vuln_command'
require 'ronin/vulns/ssti'
require_relative '../web_vuln_command'
require_relative '../../ssti'

module Ronin
module Vulns
Expand Down
5 changes: 3 additions & 2 deletions lib/ronin/vulns/cli/importable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/importer'
require 'ronin/vulns/cli/printing'
require_relative 'printing'
require_relative '../importer'

require 'ronin/db/cli/database_options'
require 'ronin/db/cli/printing'

Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/vulns/cli/web_vuln_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/cli/command'
require 'ronin/vulns/cli/importable'
require 'ronin/vulns/cli/printing'
require_relative 'command'
require_relative 'importable'
require_relative 'printing'

require 'ronin/support/network/http/cookie'
require 'ronin/support/network/http/user_agents'
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/command_injection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative 'web_vuln'

require 'time'

Expand Down
5 changes: 3 additions & 2 deletions lib/ronin/vulns/lfi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require 'ronin/vulns/lfi/test_file'
require_relative 'web_vuln'
require_relative 'lfi/test_file'

require 'ronin/support/text/patterns'
require 'ronin/support/crypto'
require 'ronin/support/compression'

require 'uri/query_params'
require 'base64'

Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/lfi/test_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative '../web_vuln'

module Ronin
module Vulns
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/open_redirect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative 'web_vuln'

require 'chars'
require 'cgi'
Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/vulns/reflected_xss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require 'ronin/vulns/reflected_xss/test_string'
require 'ronin/vulns/reflected_xss/context'
require_relative 'web_vuln'
require_relative 'reflected_xss/test_string'
require_relative 'reflected_xss/context'

require 'set'

Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/reflected_xss/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative '../web_vuln'

module Ronin
module Vulns
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/reflected_xss/test_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative '../web_vuln'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/rfi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require 'ronin/vulns/version'
require_relative 'web_vuln'
require_relative 'version'

require 'ronin/support/network/http'
require 'uri/query_params'
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/sqli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require 'ronin/vulns/sqli/error_pattern'
require_relative 'web_vuln'
require_relative 'sqli/error_pattern'

require 'time'

Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/sqli/error_pattern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative '../web_vuln'

module Ronin
module Vulns
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/vulns/ssti.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require 'ronin/vulns/ssti/test_expression'
require_relative 'web_vuln'
require_relative 'ssti/test_expression'

module Ronin
module Vulns
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/vulns/ssti/test_expression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/web_vuln'
require_relative '../web_vuln'

module Ronin
module Vulns
Expand Down
14 changes: 7 additions & 7 deletions lib/ronin/vulns/url_scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/lfi'
require 'ronin/vulns/rfi'
require 'ronin/vulns/sqli'
require 'ronin/vulns/ssti'
require 'ronin/vulns/reflected_xss'
require 'ronin/vulns/open_redirect'
require 'ronin/vulns/command_injection'
require_relative 'lfi'
require_relative 'rfi'
require_relative 'sqli'
require_relative 'ssti'
require_relative 'reflected_xss'
require_relative 'open_redirect'
require_relative 'command_injection'

module Ronin
module Vulns
Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/vulns/web_vuln.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/vuln'
require 'ronin/vulns/web_vuln/http_request'
require 'ronin/support/network/http'
require_relative 'vuln'
require_relative 'web_vuln/http_request'

require 'ronin/support/network/http'
require 'chars'

module Ronin
Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/vulns/web_vuln/http_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/vulns/vuln'
require_relative '../vuln'

require 'ronin/support/network/http/cookie'
require 'ronin/support/network/http/user_agents'

Expand Down

0 comments on commit 405b249

Please sign in to comment.