รู้เบื้องต้นเกี่ยวกับเทคโนโลยีการทำให้งงงวยของ Allatori
Allatori เป็น Java obfuscator ซึ่งเป็นของเครื่อง obfuscator รุ่นที่สองดังนั้นจึงสามารถปกป้องสิทธิ์ในทรัพย์สินทางปัญญาของคุณในทุกด้าน Allatori มีวิธีการป้องกันดังต่อไปนี้: การตั้งชื่อการทำให้งงงวย, การทำให้งงงวยสตรีม, ข้อมูลการดีบักการทำให้งงงวย, การทำให้งงงวยของสตริงและเทคโนโลยีลายน้ำ เครื่องหม่ำนี้ฟรีสำหรับโครงการทางการศึกษาและไม่ใช่เชิงพาณิชย์ รองรับรูปแบบไฟล์สงครามและ jar และอนุญาตให้เพิ่มวันที่ที่ถูกต้องลงในแอปพลิเคชันที่จำเป็นต้องใช้รหัสที่ทำให้งงงวย มีโครงการที่จำเป็นต้องปกป้องรหัส โซลูชันพื้นฐานมากขึ้นคือการทำให้งงงวยรหัส หลังจากถอดรหัสไฟล์ที่บรรจุแล้วคุณจะเห็นเอฟเฟกต์ นอกจากนี้ขนาดของถุงที่ทำด้วย Allatori จะเล็กลงเล็กน้อย
การแนะนำโครงการ
โครงการ Maven ธรรมดามากความแตกต่างคือการเพิ่มแพ็คเกจ JAR ของ Allatori ในไดเรกทอรีราก
ลองดูที่ไฟล์ pom.xml:
<Project xmlns = "http://maven.apache.org/pom/4.0.0" xmlns: xsi = "http://www.w3.org/2001/xmlschema-instance" xsi: schemalocation = "http:/MANCMMMMMMMMMMMMMMMMMMMMMMMMMMBM http://maven.apache.org/xsd/maven-4.0.0.xsd "> <moderversion> 4.0.0 </modelversion> <moderversion> <moderversion> <roupid> com.lovnx </groupid> <RoupID> org.springframework.boot </groupId> <ratifactid> Spring-Boot-Maven-Plugin </artifactid> </plugin> <!-ปลั๊กอิน Allatori เริ่มต้น-> <plugin> <Sersion> 2.6 </SEXIONS> <Cenections> <EXECUTION> <ID> COPY-and Filter-Allatori-Config </id> <deppe> แพคเกจ </เฟส> <source> <source> การคัดลอก-แหล่งข้อมูล </goal> </เป้าหมาย> <การกำหนดค่า> <Sirectory> $ {Affaseir}/Allatori </Directory> <cond include> <cult> allatori.xml </indouch> </cold> <dilter> </filtering> </resources> </sursesore> <ArtIfactId> exec-maven-plugin </artifactid> <persion> 1.2.1 </เวอร์ชัน> <cenections> <cuition> <id> Run-Allatori </id> <pare> แพคเกจ </เฟส> <goals> <oals> Exec </goal> <gural> -xms128m </argal> <gural> -xmx512m </argal> <gurg> -jar </อาร์กิวเมนต์> <garter> $ {asflemasedir} /lib/allatori.jar </argver> <gurrication> $ {Afflemair} /target/allatori.xml </plugins> </uffer> <cendencies> <!-เริ่มต้นทดสอบ-> <การพึ่งพา> <roupId> Junit </groupId> <ratifactid> Junit </artifactid> <pope> ทดสอบ </cope> <ArtIfactId> Spring-Boot-Starter-WEB </artifactId> </การพึ่งพาอาศัย> </การพึ่งพา> <carent> <roupId> org.springframework.boot </groupid> การใช้ maven เพื่อแพ็คเกจปลั๊กอินสปริงบูตสร้างการกำหนดค่า Allatori ก็อธิบายไว้ข้างต้น สิ่งที่สำคัญกว่าในการกำหนดค่า Allatori คือ:
<gurter> $ {Afflementir} /lib/allatori.jar </argal> <gurrict> $ {achedir} /target/allatori.xml </rigmal> ระบุเส้นทางไฟล์ alllatori.jar ของ Allatori หากโครงการของคุณเป็นโครงการ POM คุณสามารถวางไดเรกทอรี LIB ในโครงการหลักและจากนั้นโครงการเด็กต้องการเท่านั้น:
<gurrict> ../ lib/allatori.jar </igration>
แค่ทำ
ไฟล์ allatori.xml ก็มีความสำคัญมากลองดูเนื้อหาของมัน:
<config> <put> <jar in = "confusion-0.0.1-snapshot.jar" out = "confusion-0.0.1-snapshot- bfuscated.jar"/> </input> <keep-names> <class access = "protected+"> <การเข้าถึงฟิลด์ = value = "log.xml"/> </config>
นั่นคือการกำหนดค่าเฉพาะของเครื่อง obfuscator Allatori ที่นี่คุณสามารถกำหนดค่าข้อมูลจำนวนมากและกลยุทธ์ต่าง ๆ และคุณยังสามารถระบุคลาสที่ไม่สับสน วิธีการเฉพาะต่าง ๆ สามารถรับได้ในเอกสารประกอบในเอกสารแนบในตอนท้ายของบทความ
สิ่งที่ต้องอธิบายที่นี่คือ:
<put> <jar in = "confusion-0.0.1-snapshot.jar" out = "confusion-0.0.1-snapshot- bufuscated.jar"/> </pront>
confusion-0.0.1-snapshot.jar เป็นแพ็คเกจที่ไม่มีการสร้างความสับสนหลังจากแพ็คเกจในขณะที่ confusion-0.0.1-snapshot- bfuscated.jar เป็นแพ็คเกจที่ทำให้งงงวยซึ่งเป็นสิ่งที่เราต้องการ
ขั้นตอนบรรจุภัณฑ์
1. ทำความสะอาดโครงการ Maven
2. คัดลอกไฟล์ allatori.xml ด้านล่างทรัพยากรไปยังไดเรกทอรีเป้าหมาย
3. ติดตั้งโครงการ Maven และหลังจากได้เห็นข้อมูลต่อไปนี้หมายความว่ามันประสบความสำเร็จ:
- - เวอร์ชันสาธิต! ## ไม่ใช่เพื่อการใช้งานเชิงพาณิชย์! ### ## เวอร์ชันตัวอย่างเพิ่ม System.out ## และให้ชื่อ 'Allatori_Demo' ## ไปยังบางฟิลด์และวิธีการบางอย่าง ## ## ## การทำให้งงงวยโดย Allatori obfuscator v6.4 การสาธิต ## ## http://www.allatori.com ## - - - -
4. โครงการที่ประสบความสำเร็จ:
ลูกศรชี้ไปที่แพ็คเกจที่เราต้องการและรหัสของแพ็คเกจนี้ได้รับการทำให้งง
มุมมองเอฟเฟกต์
ที่นี่เราใช้เครื่องมือ decompilation เพื่อดูแพ็คเกจที่สับสน ฉันใช้ซอฟต์แวร์ JD-GUI ซึ่งมีขนาดเล็กและใช้งานได้จริง
ก่อนการทดสอบการทำให้งงงวย Java:
นำเข้า org.springframework.boot.springapplication; นำเข้า org.springframework.boot.autoconfigure.springbootapplication; @springbootaplapplicationplication การทดสอบระดับ -
หลังจากการทดสอบ. java ทำให้งง:
นำเข้า java.io.printstream; นำเข้า org.springframework.boot.springapplication นำเข้า org.springframework.boot.autoconfigure.springbootapplication; @springbootaplicplication 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 = 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] = ((ถ่าน) (A.Charat (TMP45_44) ^ i)); int tmp66_63 = (j--); ? [TMP66_63] = ((ถ่าน) (A.Charat (TMP66_63) ^ K)); } ส่งคืนสตริงใหม่ (?); } โมฆะคงที่สาธารณะหลัก (สตริง [] a) { System.out.println ("/n ######################################################################################################################## ตัวอย่างยอมรับ - - - - - - Allatori obfuscator v6.4 การสาธิต #/n # #/n #http://www.allatori.com #/n # #/n ##################################################################################### springapplication.run (testapplication.class, a); - ก่อนที่ testcontroller.java จะสับสน:
นำเข้า org.springframework.web.bind.annotation.getMapping; นำเข้า org.springframework.web.bind.annotation.restcontroller; @restcontrollerpublic Class TestController {@getMapping ("/ทดสอบ" - หลังจาก testcontroller.java ทำให้งง:
นำเข้า org.springframework.web.bind.annotation.getMapping; นำเข้า org.springframework.web.bind.annotation.restcontroller; @restcontrollerpublic คลาสทดสอบ {returtcontroller AllatorixDemo ("*]*]*]*]*]*]*]*]*]*"); } สตริงคงที่ public String AllatorixDemo (String 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 = ถ่านใหม่ [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] = ((ถ่าน) (A.Charat (TMP51_50) ^ i)); int tmp72_69 = (j--); ? [TMP72_69] = ((ถ่าน) (A.Charat (TMP72_69) ^ K)); } ส่งคืนสตริงใหม่ (?); - ฮ่าฮ่าฮ่าคุณไม่เข้าใจเหรอ? และแพ็คเกจการทำให้งงงวยทำงานตามปกติโดยไม่มีปัญหาใด ๆ
--------》 ซอร์สโค้ด GitHub และที่อยู่เอกสาร "-------
ข้างต้นเป็นเนื้อหาทั้งหมดของบทความนี้ ฉันหวังว่ามันจะเป็นประโยชน์ต่อการเรียนรู้ของทุกคนและฉันหวังว่าทุกคนจะสนับสนุน wulin.com มากขึ้น