Allatori 난독 화 기술 소개
Allatori는 Java Obfuscator로 2 세대 Oppuscator에 속하므로 모든 측면에서 지적 재산권을 보호 할 수 있습니다. Allatori는 다음과 같은 보호 방법을 가지고 있습니다. 명명 난독 화, 스트림 난독 화, 디버그 정보 난독 화, 현악 난독 화 및 워터 마킹 기술이 있습니다. 이 Oppuscator는 교육 및 비상업적 프로젝트에 무료입니다. 전쟁 및 JAR 파일 형식은 지원되며 코드를 난독 화 해야하는 응용 프로그램에 유효한 날짜를 추가 할 수 있습니다. 코드를 보호 해야하는 프로젝트가 있습니다. 보다 기본적인 해결책은 코드를 난독 화하는 것입니다. 패키지 파일을 디 컴파일 한 후 효과를 볼 수 있습니다. 또한 Allatori로 만든 가방의 크기는 조금 더 작습니다.
프로젝트 소개
매우 일반적인 Maven 프로젝트 인 차이점은 Root 디렉토리에 Allatori의 JAR 패키지를 추가하는 것입니다.
pom.xml 파일을 살펴 보겠습니다.
<project xmlns = "http://maven.apache.org/pom/4.0.0"xmlns : xsi = "http://www.w3.org/2001/xmlschema-instance"xsi : schemalocation = "http://maven.apache.org/pom/0.0.0.0 http://maven.apache.org/xsd/maven-4.0.xsd "> <modelversion> 4.0.0 </modelversion> <groupid> com.lovnx </groupid> <artifactid> confusion </artifactid> <0.1-snapshot> <packing> </packing> </packing> </version> <groupid> org.springframework.boot </groupid> <artifactid> spring-boot-maven-plugin </artifactid> </artifactid> </artifactid> </plugin> <!-Allatori 플러그인 start-> <flugin> <groupid> org.apache.maven.plugins </groupid> maven-resourcess-resourcess-ppactid. <버전> 2.6 </version> <executions> <executions> <id> Copy-and-Filter-Allatori-Config </id> <case> 패키지 </phase> <Goal> <Goal> Copy-Resources </Goal> </Goals> <outputDirectory> $ {기반}/target <Resources> <outputDirectory> <outputDirectory> <directory> $ {basedir}/allatori </directory> <contact> <clander> allatori.xml </include> </conture> </include> </filtering> </resources> </configuration> </execution> </executions> </plugin> <flugin> <groupid> org.codeha.mojo.mojo.mojo.mojo.mojo.mojo.mojo.mojo.mojo. <Artifactid> exec-maven-plugin </artifactid> <version> 1.2.1 </version> <executions> <executions> <executions> <executions> <id> run-allatori </id> <case> </phase> <goving> exec </gual> </goals> </execution> <arguce> </execure> </execution> <Argument> -xms128m </argument> <argument> -xmx512m </argument> <argument> -jar </argument> <argument> $ {basedir} /lib/allatori.jar </argument> <argument> $ {basidir} /target/allatori.xml </argupent> </argureation> Allatori 플러그인 엔드-> </plugins> </build> <pectionies> <!-테스트 시작-> <pectionency> <groupId> junit </groupId> <artifactid> junit </artifactid> <Scope> 테스트 </scope> <!-테스트 엔드-> <!-종속성> <groupid> org.springframework.boot </groupid> <artifactid> Spring-boot-starter-web </artifactid> </fectionement> </fectionements> <부모> <groupid> org.springframework.boot </groupid> <trifactid> spring-bboot-starter-parent </artifactid> <version> </부모> </project> Maven을 사용하여 패키지 플러그인을 사용하여 Spring Boot는 Allatori 구성이 위에서 설명되어 있습니다. Allatori 구성에서 더 중요한 것은 다음과 같습니다.
<argument> $ {basedir} /lib/allatori.jar </argument> <argument> $ {basedir} /target/allatori.xml </argument> Allatori의 AllLatori.jar 파일 경로를 지정하십시오. 프로젝트가 POM 프로젝트 인 경우 LIB 디렉토리를 학부모 프로젝트에 배치 할 수 있으며 Child 프로젝트는 다음과 같습니다.
<Argument> ../ lib/allatori.jar </argument>
그냥 해요.
Allatori.xml 파일도 매우 중요합니다. 그 내용을 살펴보십시오.
<config> <input> <jar in = "confusion-0.0.1-snapshot.jar"out = "confusion-0.0.1-snapshot-obfuscated.jar"/> </input> <keep-names> <class access = "protected+"> <protected+"/> <propear access ="protected+"/</keep </class>" 값 = "log.xml"/> </config>
즉, Allatori oppuscator의 특정 구성입니다. 여기서는 많은 정보와 다양한 전략을 구성 할 수 있으며 오염되지 않은 클래스를 지정할 수도 있습니다. 기사 끝의 첨부 파일의 문서에서 다양한 특정 방법을 얻을 수 있습니다.
여기에 설명해야 할 것은 다음과 같습니다.
<입력> <jar in = "confusion-0.0.1-snapshot.jar"out = "confusion-0.0.1-snapshot-obfuscated.jar"/> </input>
Confusion-0.0.1-SnapShot.jar는 패키지 후에 반류되지 않은 패키지이며 Confusion-0.0.1-SNAPSHOT-ABFPUSCATED.JAR은 우리에게 필요한 난독 화 된 패키지입니다.
포장 단계
1. 청정 Maven 프로젝트.
2. 리소스 아래의 Allatori.xml 파일을 대상 디렉토리로 복사하십시오.
3. Maven 프로젝트를 설치하고 다음 정보를 본 후에는 다음과 같은 정보를 의미합니다.
############################################################################################################### ############################################################################################################### 데모 버전! ## 상업용 사용이 아닙니다! ### ## Demo 버전은 System.out의 ##을 추가하고 일부 필드 및 메소드에 'Allatori_demo'이름 ##을 제공합니다. ## ## ## Allatori oppuscator v6.4 Demo ## ## http://www.allatori.com ##의 난독 ############################################################################################################################################################################################################################OUYYULYDI)입니다. ############################################################################################################################################################################################################################OUYYULYDI)입니다. ############################################################################################################################################################################################################################OUYYULYDI)입니다. #######################################################################################################################################################################################################################################################OUYYULYDI)입니다.
4. 성공적인 프로젝트 :
화살표는 필요한 패키지를 가리키고이 패키지의 코드가 난독 화되었습니다.
효과보기
여기서는 소환 도구를 사용하여 난독 화 된 패키지를보십시오. 작고 실용적인 JD-GUI 소프트웨어를 사용합니다.
테스트 됨 전에 Java 난독 화 :
import org.springframework.boot.springApplication; import org.springframework.boot.autoconfigure.springbootApplication; @springbootApplicationPublic 클래스 테스트 application {public static void main (string [] args) {springApplication.run (tespapplass, args); }} TestApplication.java가 난독 화 된 후 :
import java.io.printstream; import org.springframework.springApplication; import org.springframework.boot.autoconfigure.springbootApplication; @springbootapplicationpublic class class revelatorplication {string a) {int tmp4_ 3 = 4; int tmp7_6 = 1; int tmp21_18 = a.length (); int tmp25_24 = 1; TMP25_24; int J; int? = TMP25_24; int k = tmp21_18; int tmp35_31 = (j = new char [tmp21_18] -1); TMP35_31; int i = 5 << 4 ^ (0x2 ^ 0x5); (TMP4_3 << TMP4_3 ^ TMP7_6 << TMP7_6); if (tmp35_31> = 0) {int tmp45_44 = j; J--; ? [tmp45_44] = ((char) (a.charat (tmp45_44) ^ i); int tmp66_63 = (j-); ? [tmp66_63] = ((char) (a.charat (tmp66_63) ^ k); } 새 문자열을 반환합니다 (?); } public static void main (String [] a) { System.out.println("/n####################################################################################################### ###################################################### ##########################################################################YOUNYDO############################################# ###################################################### ##############################################################################YOUNYDO#################################################### ###################################################### ##########################################################################YOUNYDO############################################# ###################################################### ##############################################################################YOUNYDO#################################################### ###################################################### ##########################################################################YOUNYDO############################################# ###################################################### ##############################################################################YOUNYDO#################################################### Allatori Obfuscator v6.4 데모 #/n # #/n #http://www.allatori.com #/n # ###################################################################################################################################### ########################### ###############################################################YOUMOULOULY1; SpringApplication.run (TestApplication.class, a); }} TestController.java가 혼란스러워하기 전에 :
import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RestController;@RestControllerpublic class TestController { @GetMapping("/test") public String test(){ return "888888888888888"; }} TestController.java가 난독 화 된 후 :
org.springframework.web.bind.annotation.getmapping; import org.springframework.web.bind.annotation.restController; @RestControllerPublic 클래스 TestController {@getMapping ({ "/tast"}) public string test () {reto allatorixdemo ( "*]*]*]*]*]*]*]*]*"); } public static string allatorixdemo (문자열 a) {int tmp27_24 = a.length (); int tmp31_30 = 1; TMP31_30; int J; int? = TMP31_30; int k = tmp27_24; int tmp41_37 = (j = new char [tmp27_24] -1); TMP41_37; int i = (0x3 ^ 0x5) << 4 ^ 0x5; (2 << 3 ^ 0x2); if (tmp41_37> = 0) {int tmp51_50 = j; J--; ? [tmp51_50] = ((char) (a.charat (tmp51_50) ^ i); int tmp72_69 = (j-); ? [tmp72_69] = ((char) (a.charat (tmp72_69) ^ k); } 새 문자열을 반환합니다 (?); }} 하하하, 어때, 이해가 안 돼요? 난독 화 패키지는 아무런 문제없이 평소와 같이 실행됩니다.
--------》 GitHub 소스 코드 및 문서 주소 "-------
위는이 기사의 모든 내용입니다. 모든 사람의 학습에 도움이되기를 바랍니다. 모든 사람이 wulin.com을 더 지원하기를 바랍니다.