mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-14 10:38:22 +00:00
chg: [yara trackers] add debug
This commit is contained in:
parent
0d06f633e2
commit
0872fb23d3
1 changed files with 4 additions and 0 deletions
|
@ -104,8 +104,12 @@ def is_valid_default_yara_rule(yara_rule):
|
||||||
filename = os.path.join(yara_dir, yara_rule)
|
filename = os.path.join(yara_dir, yara_rule)
|
||||||
filename = os.path.realpath(filename)
|
filename = os.path.realpath(filename)
|
||||||
|
|
||||||
|
print(yara_dir)
|
||||||
|
print(filename)
|
||||||
|
|
||||||
# incorrect filename
|
# incorrect filename
|
||||||
if not os.path.commonprefix([filename, yara_dir]) == yara_dir:
|
if not os.path.commonprefix([filename, yara_dir]) == yara_dir:
|
||||||
|
print('error: file transversal')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
|
|
Loading…
Reference in a new issue