forked from ucam-cl-dtg/LibID
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObfprofileapps_ctrl.py
More file actions
36 lines (21 loc) · 811 Bytes
/
Obfprofileapps_ctrl.py
File metadata and controls
36 lines (21 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# coding=utf-8
import os
import time
appPath = "/home/zhanxian/workspace/LibID/data/obfuscate_each/ctrl/"
appList = os.listdir(appPath)
profilePath = "/home/zhanxian/workspace/LibID/obfuscation/tech/ctrl/"
for app in appList:
eachAppPath = os.path.join(appPath,app)
startTime=time.time()
appname = app.split(".apk")[0]
eachProfilePath = os.path.join(profilePath,appname+".json")
if os.path.exists(eachProfilePath):
continue
cmd = "python {0} profile -f {1} -o {2}".format("/home/zhanxian/workspace/LibID/LibID.py",eachAppPath,"./tech/ctrl/")
os.system(cmd)
endtime=time.time()
elapse=endtime-startTime
cmd = "echo {0},{1}>>{2}".format(app,elapse,"Techctrl_oriappProfileTime.csv")
os.system(cmd)
print "all work is done!"