diff options
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 2 | ||||
| -rwxr-xr-x | php-malware-finder/utils/generate_whitelist.py | 2 | ||||
| -rwxr-xr-x | php-malware-finder/utils/mass_whitelist.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index b3ce7b7..ab1d6fb 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -15,7 +15,7 @@ fi | |||
| 15 | 15 | ||
| 16 | if [ ! -f "$CONFIG_PATH" ] | 16 | if [ ! -f "$CONFIG_PATH" ] |
| 17 | then | 17 | then |
| 18 | CONFIG_PATH='./php.yar' | 18 | CONFIG_PATH="$(dirname "$0")/php.yar" |
| 19 | fi | 19 | fi |
| 20 | 20 | ||
| 21 | needle_in_haystack() { | 21 | needle_in_haystack() { |
diff --git a/php-malware-finder/utils/generate_whitelist.py b/php-malware-finder/utils/generate_whitelist.py index 231eb1f..e2aa6dc 100755 --- a/php-malware-finder/utils/generate_whitelist.py +++ b/php-malware-finder/utils/generate_whitelist.py | |||
| @@ -19,7 +19,7 @@ if not os.path.isdir(sys.argv[2]): | |||
| 19 | print('%s is not a folder !' % sys.argv[2]) | 19 | print('%s is not a folder !' % sys.argv[2]) |
| 20 | sys.exit(1) | 20 | sys.exit(1) |
| 21 | 21 | ||
| 22 | rules = yara.compile('../php.yar', includes=True, error_on_warning=True) | 22 | rules = yara.compile(sys.path[0]+'/../php.yar', includes=True, error_on_warning=True) |
| 23 | 23 | ||
| 24 | output_list = list() | 24 | output_list = list() |
| 25 | 25 | ||
diff --git a/php-malware-finder/utils/mass_whitelist.py b/php-malware-finder/utils/mass_whitelist.py index ef7e39d..c2cf131 100755 --- a/php-malware-finder/utils/mass_whitelist.py +++ b/php-malware-finder/utils/mass_whitelist.py | |||
| @@ -39,7 +39,7 @@ Examples: | |||
| 39 | class Opts: | 39 | class Opts: |
| 40 | DEFAULT_MIN = 0 | 40 | DEFAULT_MIN = 0 |
| 41 | DEFAULT_MAX = 99 | 41 | DEFAULT_MAX = 99 |
| 42 | YARA_RULES = yara.compile('../php.yar', includes=True, error_on_warning=True) | 42 | YARA_RULES = yara.compile(sys.path[0]+'/../php.yar', includes=True, error_on_warning=True) |
| 43 | 43 | ||
| 44 | @classmethod | 44 | @classmethod |
| 45 | def to_str(cls): | 45 | def to_str(cls): |
