GithubHelp home page GithubHelp logo

axmlparserpy's Introduction

axmlparserpy: Android XML parser in Python

axmlparserpy can be used to parse Android binary XML files into plaintext XML.

axmlparserpy was originally created by Anthony Desnos and was extracted from the Androguard project.

Contributors

License

GPL

axmlparserpy's People

Contributors

antitree avatar dariuszaniszewski avatar johanlorenzo avatar kanzure avatar kzjeef avatar pee avatar rossja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

axmlparserpy's Issues

Re-Add APK Processing Ability

Due to how integrated the androidmanifest.xml file is with the rest of the APK, it makes sense to put APK processing back into this project. This is most likely already implemented in androguard's apk.py but will need to be updated.

Steps to complete:

  1. review androguard's apk processing
  2. decide whether to process entire apk or specific files related to the manifest file

[originally reported by pee]

('getApkPackageInfo Error. ', ValueError('chr() arg not in range(256)',))

when i run this command

ap = apk.APK(filename)

it show error like this.
('getApkPackageInfo Error. ', ValueError('chr() arg not in range(256)',))

i found the problems.

in this file. stringblock.py

def getRaw(self, idx):
    print("YYYYYYYYYYYYYYYYYYYYYYYYYYYY getRaw %s \n" % idx)
    if idx < 0 or self.m_stringOffsets == [] or idx >= len(self.m_stringOffsets):
        return None

    offset = self.m_stringOffsets[ idx ].get_value()
    length = self.getShort(self.m_strings, offset)

    data = ""
    print "length = ", length
    while length > 0:
        offset += 2
        # Unicode character
        print "self.getShort = ", self.getShort(self.m_strings, offset)
        data += chr(self.getShort(self.m_strings, offset))

        # FIXME
        if data[-1] == "&":
            data = data[:-1]

        length -= 1

    return data

can not resolve unicode.

Out of memory

I don't know why, but it crashes when I run it. The version I am using is 0.0.4, the python version is 2.7.
Below is my code

  with open(xmlPath, 'rb') as f:
                ap = axmlprinter.AXMLPrinter(f.read())
                dom = xml.dom.minidom.parseString(ap.getBuff()).toxml()
                print dom

Resolve resource strings

Right now, resource strings are not resolved to the resource.asc file. AXMLPrinter and other's don't do this either but it would be nice to have this option. aapt and apktool have already implemented simliar functionality.

Example:'<manifest android:versionCode="300" android:versionName="@7F040001"'

import error in python 3.5

Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import axmlparserpy.apk as apk
Traceback (most recent call last):
File "", line 1, in
File "E:\Python35\lib\site-packages\axmlparserpy\apk.py", line 21, in
from axmlprinter import AXMLPrinter
ImportError: No module named 'axmlprinter'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.