Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
io.michaelrocks:paranoid-processor
Advanced tools
String obfuscator for Android applications.
In order to make Paranoid work with your project you have to apply the Paranoid Gradle plugin to the project. Please notice that the Paranoid plugin must be applied after the Android plugin.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.michaelrocks:paranoid-gradle-plugin:0.3.7'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.michaelrocks.paranoid'
Now you can just annotate classes with strings that need to be obfuscated with @Obfuscate
.
After you project compiles every string in annotated classes will be obfuscated.
Paranoid plugin can be configured using paranoid
extension object:
paranoid {
// ...
}
The extension object contains the following properties:
enabled
— boolean
. Allows to disable obfuscation for the project. Default value is true
.cacheable
— boolean
. Allows to enable caching for the transform. Default value is false
.includeSubprojects
— boolean
. Allows to enable obfuscation for subprojects. Default value is false
.obfuscationSeed
- Integer
. A seed that can be used to make obfuscation stable across builds. Default value is null
, which means that the seed
is computed from input files on each build.Let's say you have an Activity
that contains some string you want to be obfuscated.
@Obfuscate
public class MainActivity extends AppCompatActivity {
private static final String QUESTION = "Q: %s";
private static final String ANSWER = "A: %s";
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
final TextView questionTextView = (TextView) findViewById(R.id.questionTextView);
questionTextView.setText(String.format(QUESTION, "Does it work?"));
final TextView answerTextView = (TextView) findViewById(R.id.answerTextView);
answerTextView.setText(String.format(ANSWER, "Sure it does!"));
}
}
The class contains both string constants (QUESTION
and ANSWER
) and string literals.
After compilation this class will be transformed to something like this.
@Obfuscate
public class MainActivity extends AppCompatActivity {
private static final String QUESTION = Deobfuscator.getString(4);
private static final String ANSWER = Deobfuscator.getString(5);
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
final TextView questionTextView = (TextView) findViewById(R.id.questionTextView);
questionTextView.setText(String.format(Deobfuscator.getString(0), Deobfuscator.getString(1)));
final TextView answerTextView = (TextView) findViewById(R.id.answerTextView);
answerTextView.setText(String.format(Deobfuscator.getString(2), Deobfuscator.getString(3)));
}
}
Copyright 2021 Michael Rozumyanskiy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
Unknown package
We found that io.michaelrocks:paranoid-processor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.