Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit 3db1f80

Browse files
authored
Merge pull request #24 from phyushin/Issue21
Fix load path
2 parents 11a404e + 8310561 commit 3db1f80

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# How to contribute
2+
Contributions are always welcome, however, to keep things consistent, please review the following guidelines.
3+
4+
## Update unit tests
5+
If you change a core piece of functionality (i.e. in ```lib/wpxf/*```) then ensure the corresponding unit tests in the ```spec``` folder are updated.
6+
7+
For more information on writing unit tests with RSpec, see https://relishapp.com/rspec
8+
9+
## Ensure RuboCop approves
10+
Unless there's good reason, there should be no [RuboCop](https://github.com/bbatsov/rubocop) warnings for any code you submit a pull request for. There have been changes to the [RuboCop](https://github.com/bbatsov/rubocop) configuration for this project to disable some rules and to increase the boundaries of some (such as line lengths), so when testing your files, ensure you're doing so using the ```.rubocop.yml``` found in the root directory.
11+
12+
## Provide instructions for testing new exploits and auxiliary modules
13+
If you're sending a pull request for a new auxiliary or exploit module, provide some basic information on how to test it. This should include:
14+
15+
- If the module targets a plugin or theme, provide a link to the vulnerable plugin / theme
16+
- If the module targets a specific version of WordPress, be clear which version or range it targets
17+
- Provide links to reference material if available (e.g. WPVulnDB link)
18+
19+
## Target the development branch
20+
When opening a pull request, compare with the ```development``` branch, rather than ```master```. The master branch is aimed at being equal to the latest stable release; meaning all staged changes need to go into the ```development``` branch.

env.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
wpxfbase = __FILE__
2+
23
while File.symlink?(wpxfbase)
34
wpxfbase = File.expand_path(File.readlink(wpxfbase), File.dirname(wpxfbase))
45
end
56

67
app_path = File.expand_path(File.join(File.dirname(wpxfbase)))
7-
$LOAD_PATH.unshift(app_path, 'lib')
8-
$LOAD_PATH.unshift(app_path, 'modules')
8+
9+
$LOAD_PATH.unshift(File.join(app_path, 'lib'))
10+
$LOAD_PATH.unshift(File.join(app_path, 'modules'))
911

1012
require 'colorize'
1113
require 'date'
@@ -20,7 +22,7 @@
2022
require 'wpxf/utility/text'
2123
require 'wpxf/utility/reference_inflater'
2224

23-
require 'github_updater'
25+
require_relative 'github_updater'
2426

2527
module Wpxf
2628
def self.data_directory=(val)

lib/cli/console.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'readline'
22

33
require 'modules'
4-
require_all 'payloads'
54
require 'cli/auto_complete'
65
require 'cli/context'
76
require 'cli/modules'

modules/modules.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ def self.payload_list
4646
end
4747
end
4848

49-
require_all 'modules/auxiliary'
50-
require_all 'modules/exploits'
49+
require_rel 'auxiliary'
50+
require_rel 'exploits'
51+
require_rel '../payloads'

0 commit comments

Comments
 (0)