-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEncCSVcreator.py
45 lines (30 loc) · 853 Bytes
/
EncCSVcreator.py
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
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 5 16:52:27 2018
@author: gowtham
"""
import os
#import matplotlib.pyplot as plt
cwd = os.getcwd()
dirs = os.listdir(cwd + "/malwareF/ENC")
data_set = open("Encdata.tsv", 'w')
data_set.write("App\t ")
for i in range(548):
data_set.write("P" + str(i+1) + "\t")
data_set.write("Other Permissions\t")
for i in range(73):
data_set.write("F" + str(i+1) + "\t")
data_set.write("Other Features\t Number of created permissions \t")
for i in range(291):
data_set.write("I" + str(i+1) + "\t")
data_set.write("Other Intents \t type \n")
for tsv in dirs:
app_ = "malwareF/ENC/" + tsv
print(tsv)
data = open(app_, 'r')
data_set.write(str(tsv[:-8]) + "\t ")
data_set.write(data.read())
data_set.write('0 \n')
data.close()
data_set.close()