Giter VIP home page Giter VIP logo

Comments (6)

qssq1 avatar qssq1 commented on May 24, 2024

我的意思就是扫描java源码字符串转换为byte数据 抽取到c层的源码data.c,在编译的时候有效,真正的源码并没有破坏,我需要知道具体gradle源码才能做,大不了hook java方法,拦截file读取拷贝副本,但是我不知道应该在什么时候拦截。

from stringfog.

qssq1 avatar qssq1 commented on May 24, 2024

再说说java的字符串加密
目前开源的有:
直接反编译为smali然后进行字符串加密(用处不广泛)
通过asm 字节码操作class进行字符串加密(出错率低,稳定)
我开发的有:
基于源代码的加密和解密(不解密破坏了源代码自己看起来都累):
我这个只要封装的好,除了能对java外也能对其他语言进行加密。

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

基于源码做加密解密,在日常开发的时候不友好,一般都是在编译的时候对字节码做处理,可以利用gradle插件的Transform做拦截处理,像java的混淆也是这么做的。把java的字符串抽到c层,技术上应该是可行的,主要难点就是自动生成c层的jni代码,然后编译进打包文件里面

from stringfog.

qssq1 avatar qssq1 commented on May 24, 2024

嗯,混淆貌似也是用的asm把,感觉都不是基于源码,不过基于源码的优势也是有的,嘿嘿,只要产生一个源码副本让编译器去编译,就是友好了,这样其实也不叫破坏源码了。

所以大致思路就是利用gradle拦截编译源码过程,然后执行加密源码产生副本,让gradle去编译这个副本就行。 这样可以同时把c和java一起编译。

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

我认为处理源码比处理字节码要难,后者有asm可以非常方便地处理

from stringfog.

qssq1 avatar qssq1 commented on May 24, 2024

但是我确实已经弄好了

from stringfog.

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.