Comments (6)
我的意思就是扫描java源码字符串转换为byte数据 抽取到c层的源码data.c,在编译的时候有效,真正的源码并没有破坏,我需要知道具体gradle源码才能做,大不了hook java方法,拦截file读取拷贝副本,但是我不知道应该在什么时候拦截。
from stringfog.
再说说java的字符串加密
目前开源的有:
直接反编译为smali然后进行字符串加密(用处不广泛)
通过asm 字节码操作class进行字符串加密(出错率低,稳定)
我开发的有:
基于源代码的加密和解密(不解密破坏了源代码自己看起来都累):
我这个只要封装的好,除了能对java外也能对其他语言进行加密。
from stringfog.
基于源码做加密解密,在日常开发的时候不友好,一般都是在编译的时候对字节码做处理,可以利用gradle插件的Transform做拦截处理,像java的混淆也是这么做的。把java的字符串抽到c层,技术上应该是可行的,主要难点就是自动生成c层的jni代码,然后编译进打包文件里面
from stringfog.
嗯,混淆貌似也是用的asm把,感觉都不是基于源码,不过基于源码的优势也是有的,嘿嘿,只要产生一个源码副本让编译器去编译,就是友好了,这样其实也不叫破坏源码了。
所以大致思路就是利用gradle拦截编译源码过程,然后执行加密源码产生副本,让gradle去编译这个副本就行。 这样可以同时把c和java一起编译。
from stringfog.
我认为处理源码比处理字节码要难,后者有asm可以非常方便地处理
from stringfog.
但是我确实已经弄好了
from stringfog.
Related Issues (20)
- 报错:> Unexpected scopes found in folder ‘app/build/intermediates/transforms/stringFog/gp/release' . Required: EXTERNAL_LIBRARIES, SUB_PROJECTS. Found: EXTERNAL_LIBRARIES, PROJECT, SUB_PROJECTS
- 个别情况下, string 看起来不会被fog,字面量?编译器优化将常量直接带入? HOT 3
- java8应该使用哪个版本的StringFog HOT 1
- 不太会用,报错了,烦请大哥指点一下 HOT 5
- Plugin Gradle release please HOT 1
- Unable to resolve applicationID HOT 3
- StringFogExtension报错 HOT 1
- java.lang.NoClassDefFoundError: Failed resolution of: Lcom/github/megatronking/stringfog/xor/StringFogImpl; HOT 3
- id 'stringfog' 以后就报错,版本是4.0.1 HOT 2
- 'ObjectOutputStream.putFields' is not supported by the Gradle configuration cache HOT 1
- 5.0.0 build.gradle8.0遇到的报错 HOT 12
- What about key safety HOT 1
- libEncryptorP.so 在哪个仓库呢 HOT 1
- 你好,请问还不支持aab的吗? HOT 3
- Cannot invoke "java.io.BufferedWriter.newLine()" because "this.mWriter" is null这个报错如何解决 HOT 5
- java.lang.NoClassDefFoundError: Failed resolution of: Lxx/xxx/xxxxx/StringFog; HOT 4
- enable为false,为什么会有如下生成,这个生成导致编译速度很慢? HOT 4
- Gradle 8.0.2 StringFog 5.0 几个问题解决方法,和一个疑似BUG HOT 2
- 关于BuildConfig没有加密的问题,应该怎么处理 HOT 1
- aspectjx 冲突加密不生效
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stringfog.