Skip to content

Commit

Permalink
Remove numpy dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
U039b committed Mar 20, 2021
1 parent 26475a9 commit 8158226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions apkleaks/apkleaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import json
import logging.config
import mimetypes
import numpy
import os
import re
import shutil
Expand Down Expand Up @@ -96,10 +95,6 @@ def decompile(self):
comm = "%s" % (" ".join(quote(arg) for arg in args))
os.system(comm)

def unique(self, list):
x = numpy.array(list)
return (numpy.unique(x))

def finder(self, pattern, path):
matcher = re.compile(pattern)
found = []
Expand All @@ -113,7 +108,7 @@ def finder(self, pattern, path):
mo = matcher.search(line)
if mo:
found.append(mo.group())
return self.unique(found)
return list(set(found))

def extract(self, name, matches):
if len(matches):
Expand All @@ -127,7 +122,7 @@ def extract(self, name, matches):
print(stdout)
self.fileout.write("%s" % (stdout + "\n" if self.json == False else ""))
self.fileout.write("%s" % ("\n" if self.json == False else ""))
self.outJSON["results"].append({"name": name, "matches": matches.tolist()})
self.outJSON["results"].append({"name": name, "matches": matches})
self.scanned = True

def scanning(self):
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
numpy>=1.20.1
pyaxmlparser>=0.3.24

0 comments on commit 8158226

Please sign in to comment.