Giter VIP home page Giter VIP logo

Comments (6)

amsharma44 avatar amsharma44 commented on May 18, 2024 2

Hi @shroudedcode

Please take a look at different result on Windows with same apk file.

apk-mitm Windows vs Linux

There are two issues with current apk-mitm running in Windows.

  1. Glob pattern only support posix path i.e forward-slashes which is different from Windows path conventions, therefore it won't be able to find any .smali files in the directory.

const smaliFiles = await globby(path.join(directoryPath, 'smali*/**/*.smali'))

  1. METHOD_PATTERNS is derived from regex which matches Linux's new line character LF but if you decode an apk on Windows, it will have CRLF as new line character so the regex won't be able to find the match of method signatures.

CC @Surendrajat

from apklab.

shroudedcode avatar shroudedcode commented on May 18, 2024 1

apk-mitm maintainer here! 👋 I saw you starred my repository and found APKLab through that. I haven't tried it yet, but it looks very promising and I will definitely give it a try in my next Android reverse engineering effort. If you need me to make any changes (like adding an option to path APKs that have already been decoded into a directory, etc.), don't hesitate to let me know! 😃

from apklab.

Surendrajat avatar Surendrajat commented on May 18, 2024

Hi @shroudedcode. Thanks for the cool project. I found it through GH recommendations :)

Man, I'd have loved to see that option in apk-mitm but with a little discussion(thinking of not bothering you right away ;), we agreed to ship all the patching logic from apk-mitm in APKLab itself(and an extended LICENSE file too), and as you can see my friend @amsharma44 has already started work to port it over to APKLab in this branch. Hope that's okay.

However, we hit a roadblock on windows with posix path being ignored and LF in regex not working with CRLF. Is that something only we are facing? or apk-mitm has the same issue? Once we fix it we are planning to open a PR in apk-mitm as well.

from apklab.

shroudedcode avatar shroudedcode commented on May 18, 2024

we agreed to ship all the patching logic from apk-mitm in APKLab itself(and an extended LICENSE file too), [...]. Hope that's okay

That's fine with me! Maybe you could also add some credit to the top of the mitm-tools.ts file. This is less about licensing and more about making it easier for people source-diving to see the where that code originally came from:

// MITM patching code adapted from:
// https://github.com/shroudedcode/apk-mitm

However, we hit a roadblock on windows with posix path being ignored and LF in regex not working with CRLF.

Can you clarify in which cases these two things become an issue? Which paths are being ignored and which regex patterns are affected by this?

from apklab.

Surendrajat avatar Surendrajat commented on May 18, 2024

Maybe you could also add add some credit to the top of the mitm-tools.ts file.

Even though I'm planning to link it in the description and credit section in README, this is also a good idea.

Can you clarify in which cases these two things become an issue? ...

It's when we tested new branch out on windows it detects all related smali files but can't replace the function content. See if fd9dc9b makes some sense to you.

CC @amsharma44

from apklab.

shroudedcode avatar shroudedcode commented on May 18, 2024

Thanks for the explanation, @amsharma44! I've opened an issue on the apk-mitm repo about this.

from apklab.

Related Issues (20)

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.