created forked version of scan.py
This commit is contained in:
7
scan.py
7
scan.py
@@ -300,7 +300,7 @@ def is_hacked(filename):
|
||||
if filename[0] != '/':
|
||||
filename = os.getcwd() + '/' + filename
|
||||
|
||||
return {'filename': filename[0:200],
|
||||
return {'filename': filename.encode('utf-8'),
|
||||
'score': total_score,
|
||||
'mtime': os.stat(filename).st_mtime,
|
||||
'ctime': os.stat(filename).st_ctime,
|
||||
@@ -611,7 +611,7 @@ def is_hacked(filename):
|
||||
if cleanup_available and line_num == 1:
|
||||
cleanup_available = False
|
||||
|
||||
return {'filename': filename[0:200],
|
||||
return {'filename': filename,
|
||||
'score': total_score,
|
||||
'mtime': os.stat(filename).st_mtime,
|
||||
'ctime': os.stat(filename).st_ctime,
|
||||
@@ -636,8 +636,7 @@ if __name__ == '__main__':
|
||||
import yaml
|
||||
SERIALIZER = 'yaml'
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
import json
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Check directory or file for PHP malwares.')
|
||||
parser.add_argument('directory_file',
|
||||
|
||||
Reference in New Issue
Block a user