模块分拆
This commit is contained in:
parent
337140a26e
commit
65dcfefc05
@ -4,7 +4,7 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/python_lib" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 2.7" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="gencoding" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7" project-jdk-type="Python SDK" />
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="gencoding" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="gencoding" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -21,19 +21,15 @@ import pickle
|
||||
# sub_10F20 308 反编译代码有字符串,但是这个特征提取里没有字符串 constant,可能是间接引用的,不识别。看了下所有函数的特征,几乎都没有字符串常量,可能都是写在别的地方然后引用的。
|
||||
# sub_166C4 393
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main_op(file_path, jsonl_file):
|
||||
done_index = 0
|
||||
file_name_list = os.listdir('../A2C/')
|
||||
res_file = "../sample.jsonl"
|
||||
sample_file = open(res_file, mode='a')
|
||||
file_name_list = os.listdir(file_path)
|
||||
sample_file = open(jsonl_file, mode='a')
|
||||
for file_name in file_name_list:
|
||||
print file_name
|
||||
file_path = '../A2C/' + file_name
|
||||
testpath = '../store/' + file_name + '.ida'
|
||||
if os.path.exists(testpath) and os.path.splitext(file_path)[-1].lower() == '.exe':
|
||||
fr = open(testpath, 'r')
|
||||
file_path_temp = file_path + file_name
|
||||
if os.path.exists(file_path_temp) :
|
||||
fr = open(file_path_temp, 'r')
|
||||
data1 = pickle.load(fr) # 一个二进制文件的acfgs
|
||||
# funtion num
|
||||
function_number = len(data1.raw_graph_list)
|
||||
@ -109,3 +105,8 @@ if __name__ == '__main__':
|
||||
print "删除文件" + file_path
|
||||
os.remove(file_path)
|
||||
sample_file.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
file_path = "../train_malware_result/"
|
||||
jsonl_path = "../jsonl_res/malware_result.jsonl"
|
||||
main_op(file_path, jsonl_path)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import itertools
|
||||
import sys
|
||||
|
||||
sys.path.insert(1, 'C:/Python27/Lib/site-packages')
|
||||
|
||||
import networkx as nx
|
||||
# import numpy as np
|
||||
from subprocess import Popen, PIPE
|
||||
|
Loading…
Reference in New Issue
Block a user