Skip to content

Commit

Permalink
Make Python 3.6 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadnassiri committed Jan 19, 2018
1 parent cb53dd7 commit 2420b8c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions axmlparserpy/apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Androguard. If not, see <http://www.gnu.org/licenses/>.

import bytecode
from . import bytecode

from axmlprinter import AXMLPrinter
from bytecode import SV

import zipfile, StringIO
from .axmlprinter import AXMLPrinter
from .bytecode import SV
import io
import zipfile
from struct import pack, unpack
from xml.dom import minidom

Expand Down Expand Up @@ -61,7 +61,7 @@ def __init__(self, filename, raw=False):
if ZIPMODULE == 0:
self.zip = ChilkatZip(self.__raw)
else:
self.zip = zipfile.ZipFile(StringIO.StringIO(self.__raw))
self.zip = zipfile.ZipFile(io.BytesIO(self.__raw))

# CHECK if there is only one embedded file
#self._reload_apk()
Expand Down Expand Up @@ -252,7 +252,8 @@ def get_permissions(self):
Return permissions
"""
return self.permissions
permissions = property(get_permissions)
#permissions = property(get_permissions)


def get_min_sdk_version(self):
"""
Expand All @@ -276,10 +277,10 @@ def get_libraries(self):
libraries = property(get_libraries)

def show(self):
print("FILES: ", self.get_files_types())
print(("FILES: ", self.get_files_types()))

print("ACTIVITIES: ", self.get_activities())
print("SERVICES: ", self.get_services())
print("RECEIVERS: ", self.get_receivers())
print("PROVIDERS: ", self.get_providers())
print(("ACTIVITIES: ", self.get_activities()))
print(("SERVICES: ", self.get_services()))
print(("RECEIVERS: ", self.get_receivers()))
print(("PROVIDERS: ", self.get_providers()))

0 comments on commit 2420b8c

Please sign in to comment.