GithubHelp home page GithubHelp logo

dexterity's Introduction

dexterity

Description

dexterity is a C library intended for manipulation and analysis of DEX files. It has python bindings for all basic DEX structures and most of the manipulation functions.

WARNING: This library is still in it's early stages of development, use at your own risk!

Examples

Mirror

The following example parses a DEX file using the built-in parser and then writes a new DEX file from the parsed structures in memory.

#!/usr/bin/python

from dx.dex import Dex

dex = Dex("classes.dex")
dex.save("mirror.dex")
Add String

The following example parses a DEX file, add a string to it, creates a new DEX file with the modifications and fix the signature and checksum of the new file.

#!/usr/bin/python

from dx.dex import Dex
from dx.hash import update_signature
from dx.hash import update_checksum

dex = Dex("classes.dex")
dex.add_string("Hello World")
dex.save("hello.dex")

update_signature("hello.dex")
update_checksum("hello.dex")

For more examples of other usages of the library, check the examples folder.

License

dexterity is released under BSD 3-clause license. Please check LICENSE for more details.

Support

For questions and/or suggestions, join #droidsec on Freenode.

dexterity's People

Contributors

josephredfern avatar rchiossi avatar strazzere 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  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  avatar  avatar  avatar  avatar  avatar  avatar

dexterity's Issues

Documentation on libdexterity.so

I know it's been a while since this project has been touched but while it's being a side result of the code: Is it possible to get something like a usage example or API documentation on libdexterity?

I was looking for a Dex-Parser in C and it was the closest I got, but I am having a hard time trying to use the lib for a project.

Thanks in advance!

Make Error OSX

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
12.2.1 Darwin Kernel Version 12.2.1:

When I try run make on my OSX box I get the following errors:

$ make
make -C lib
gcc -fPIC -std=gnu99 -g -c bytestream.c
bytestream.c:2:20: error: malloc.h: No such file or directory
bytestream.c: In function ‘bsalloc’:
bytestream.c:16: warning: implicit declaration of function ‘printf’
bytestream.c:16: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:27: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
bytestream.c:27: error: (Each undeclared identifier is reported only once
bytestream.c:27: error: for each function it appears in.)
bytestream.c:31: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c: In function ‘bsmap’:
bytestream.c:46: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:52: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:60: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:76: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c: In function ‘bssave’:
bytestream.c:250: error: ‘FILE’ undeclared (first use in this function)
bytestream.c:250: error: ‘f’ undeclared (first use in this function)
bytestream.c:250: warning: implicit declaration of function ‘fopen’
bytestream.c:254: warning: implicit declaration of function ‘fwrite’
bytestream.c:254: warning: incompatible implicit declaration of built-in function ‘fwrite’
bytestream.c:256: warning: implicit declaration of function ‘fflush’
bytestream.c:257: warning: implicit declaration of function ‘fclose’
make[1]: *** [bytestream] Error 1
make: *** [build_lib] Error 2

Improve const-correctness

I suggest to add the key word "const" to the type specifiers for parameters like "filename" (functions "bsmap" and "dx_build").
Would you like to apply the advices from an article to more places in your source files?

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.