All Projects → lizhangqu → Retrace

lizhangqu / Retrace

基于mapping.txt文件,根据原始class名或方法名获取混淆后的class名或方法名,根据混淆后的class名或方法名获取原始class名或方法名,堆栈还原等

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Retrace

Mapserver
Source code of the MapServer project. Please submit pull requests to the 'main' branch.
Stars: ✭ 693 (+1590.24%)
Mutual labels:  mapping
Joctomap
Java/Android wrapper for Octomap: an octree-based mapping library
Stars: ✭ 11 (-73.17%)
Mutual labels:  mapping
Lordfast
Sensitive and Fast Alignment Search Tool for Long Read sequencing Data.
Stars: ✭ 35 (-14.63%)
Mutual labels:  mapping
Sentry Ruby
Sentry SDK for Ruby
Stars: ✭ 724 (+1665.85%)
Mutual labels:  stacktrace
Mappinggenerator
🔄 "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Stars: ✭ 831 (+1926.83%)
Mutual labels:  mapping
Aclu
Code for Hawaii + ACLU app to show public access rights
Stars: ✭ 20 (-51.22%)
Mutual labels:  mapping
Rxjava2debug
RxJava 2.x extension to provide meaningful Stack Traces
Stars: ✭ 673 (+1541.46%)
Mutual labels:  stacktrace
Intro spatialr
Introduction to GIS and mapping in R with the sf package
Stars: ✭ 39 (-4.88%)
Mutual labels:  mapping
Anakin
This Node module maps all application's dependencies and centralizes everything, at only one place
Stars: ✭ 8 (-80.49%)
Mutual labels:  mapping
Geemap
A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium
Stars: ✭ 959 (+2239.02%)
Mutual labels:  mapping
Kimera Vio
Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
Stars: ✭ 741 (+1707.32%)
Mutual labels:  mapping
Bidict
The bidirectional mapping library for Python.
Stars: ✭ 779 (+1800%)
Mutual labels:  mapping
Arcgis Python Api
Documentation and samples for ArcGIS API for Python
Stars: ✭ 954 (+2226.83%)
Mutual labels:  mapping
Visual slam related research
视觉(语义) SLAM 相关研究跟踪
Stars: ✭ 708 (+1626.83%)
Mutual labels:  mapping
Igo2
Assemblage (IGO2) / Open GIS Infrastructure 2.0
Stars: ✭ 36 (-12.2%)
Mutual labels:  mapping
Leaflet Dvf
Leaflet Data Visualization Framework
Stars: ✭ 678 (+1553.66%)
Mutual labels:  mapping
Kakajson
Fast conversion between JSON and model in Swift.
Stars: ✭ 867 (+2014.63%)
Mutual labels:  mapping
Octomapplanner
ArduPilot Gazebo SITL 3D mapping and planning
Stars: ✭ 37 (-9.76%)
Mutual labels:  mapping
Svg World Map
🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).
Stars: ✭ 38 (-7.32%)
Mutual labels:  mapping
Mobility Explorer
Understand transportation networks around the world using Transitland open data and Valhalla routing engine APIs
Stars: ✭ 31 (-24.39%)
Mutual labels:  mapping

retrace

Maven

<dependency>
	<groupId>io.github.lizhangqu</groupId>
	<artifactId>retrace</artifactId>
	<version>1.0.2</version>
</dependency>

Gradle

implementation 'io.github.lizhangqu:retrace:1.0.2'

Sample

根据原始class名或方法名获取混淆后的class名或方法名

Retrace retrace = Retrace.createRetrace(mappingFile, true);
ClassMapping retraceClass = retrace.getClassMapping("com.google.common.base.CharMatcher$1");
String originalName = retraceClass.getOriginalName();
String obfuscatedName = retraceClass.getObfuscatedName();


Collection<MethodMapping> methods = retraceClass.getMethods("join");
for (MethodMapping methodMapping : methods) {
    String originalMethodName = methodMapping.getOriginalName();
    String obfuscatedMethodName = methodMapping.getObfuscatedName();
    String methodReturn = methodMapping.getReturn();
    String methodArgs = methodMapping.getArgs();
    String methodRange = methodMapping.getRange();
}

根据混淆后的class名或方法名获取原始class名或方法名

Retrace retrace = Retrace.createRetrace(mappingFile, false);
ClassMapping retraceClass = retrace.getClassMapping("a.a.a.b.n");
String obfuscatedName = retraceClass.getObfuscatedName();
String originalName = retraceClass.getOriginalName();


Collection<MethodMapping> methods = retraceClass.getMethods("a");
for (MethodMapping methodMapping : methods) {
    String obfuscatedMethodName = methodMapping.getObfuscatedName();
    String originalMethodName = methodMapping.getOriginalName();
    String methodReturn = methodMapping.getReturn();
    String methodArgs = methodMapping.getArgs();
    String methodRange = methodMapping.getRange();
}

堆栈还原

Retrace retrace = Retrace.createRetrace(mappingFile, false);
String originalStacktrace = retrace.stackTrace(
        "java.lang.RuntimeException: some text\n" +
                "\tat a.a.a.b.av.b(SourceFile:103)\n" +
                "\tat b.a.a.e.a(SourceFile:62)\n" +
                "\tat b.a.a.d.a(SourceFile:105)\n" +
                "Caused by: java.lang.IllegalArgumentException: some text 2\n" +
                "\tat b.a.a.c.a(SourceFile:40)\n" +
                "\tat some.unknown.method(SourceFile:76)\n" +
                "\tat some.unknown.method2(UnknownSource)\n" +
                "\tat b.a.a.a.a(UnknownSource)\n" +
                "Caused by: java.lang.NullPointerException\n" +
                "\tat b.a.a.b.toString(SourceFile:45)\n" +
                "\t... 2 more");

Thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].