مقدمة لتكنولوجيا allatori
Allatori هو java obfuscator ، الذي ينتمي إلى الجيل الثاني من محبي ، بحيث يمكنه حماية حقوق الملكية الفكرية الخاصة بك في جميع الجوانب. لدى Allatori أساليب الحماية التالية: تسمية التشويش ، وتدفق الدفق ، وتصحيح معلومات التصحيح ، وتكنولوجيا السلسلة ، وتكنولوجيا العلامات المائية. هذا المحور مجاني للمشاريع التعليمية وغير التجارية. يتم دعم تنسيقات ملفات الحرب والجرة وتسمح بإضافة تواريخ صالحة للتطبيقات التي تحتاج إلى تعبئة التعليمات البرمجية. هناك مشاريع تحتاج إلى حماية الكود. الحل الأساسي هو تعديل الكود. بعد فك تجميع الملف المعبأ ، يمكنك رؤية التأثير. بالإضافة إلى ذلك ، سيكون حجم الحقائب المصنوعة من Allatori أصغر قليلاً.
مقدمة المشروع
مشروع Maven عادي للغاية ، والفرق هو إضافة حزمة جرة من allatori في دليل الجذر.
لنلقي نظرة على ملف pom.xml:
<project xmlns = "http://maven.apache.org/pom/4.0.0" http://maven.apache.org/xsd/maven-4.0.0.xsd "> <Dodeversion> 4.0.0 </modelversion> <roupiD> com.lovnx </rougiD> <StifactId> الارتباك </artifactid> <roughid> org.springframework.boot </groupId> <StifactId> Spring-boot-maven-plugin </attifactid> </sultiin> <!-allatori plugin start-> <clupin> <roupiD> org.apache.maven.plugins </groupid> <soph> 2.6 </version> <evelopmentions> <evelop> <id> نسخ ومرشح allatori-config </id> <fish> الحزمة </phase> <irods> <dirod> copy-resources </wale> </expantory> <confiration> <swern> <sudne> allatori.xml </sudal> </sult> <filtering> true </biltering> </srotects> </srossection> </isplicuration> </evelopment> </exjustions> </plugin> <clupin> <broupId> org.codehaus.mojo </groupid> <terafactid> <evisions> <evelop> <id> Run-allatori </fid> <phase> package </phase> <fare> <irod> <irod> exec </siro> </execution> </execution> </execution> </evention> </executions> <uction> </evelopment> execution> java </evelopment> <densitions> <quession> -xms12m </ <Icsument> -jar </sicture> <Imbument> $ {indizeir} /lib/allatori.jar </simpument> <pINDIMINE> $ {inlderir} /target/allatori.xml </iscument> </endressions> </configuration> </plugin> <roupl> junit </rougiD> <StifactId> junit </stifactid> <scope> اختبار </scope> </reperence> <!-نهاية الاختبار-> <!-SPRINGBOOT startup-> <redence> <redency> <roupencid> org.springframework.boot </groupid> </sependencies> <Arnal> <roupiD> org.springframework.boot </groupId> <StifactId> Spring-Boot-Starter-Parent </stifactid> <sored> 1.5.8.release </version> </paret> </project> </project> باستخدام Maven to Package Plug-in ، يقوم Spring Boot بإنشاء تكوين Allatori أعلاه أيضًا. ما هو أكثر أهمية في تكوين Allatori هو:
<Iccumn> $ {inludiR} /lib/allatori.jar </siction> <Icsument> $ {inludir} /target/Allatori.xml </siction> حدد مسار ملف alllatori.jar من Allatori. إذا كان مشروعك مشروع POM ، فيمكنك وضع دليل LIB في المشروع الأصل ، ثم يحتاج مشروع الطفل فقط:
<CINDUME> ../ lib/allatori.jar </ispument>
افعل ذلك.
ملف allatori.xml مهم جدًا أيضًا ، ألق نظرة على محتوياته:
<figne> <prope> <jar in = "inbusion-0.0.1-snapshot.jar" out = "conbusion-0.0.1-snapshot-obfuscated.jar"/> </pected> <keth-names> <class access = "protected+" value = "log.xml"/> </fixment>
وهذا هو ، التكوين المحدد من allatori obfuscator. هنا يمكنك تكوين الكثير من المعلومات والاستراتيجيات المختلفة ، ويمكنك أيضًا تحديد الفئات التي لا تزعجها. يمكن الحصول على طرق محددة مختلفة في الوثائق في المرفق في نهاية المقالة.
ما يجب شرحه هنا هو:
<pection> <jar in = "inbusion-0.0.1-snapshot.jar" out = "conbusion-0.0.1-snapshot-obfuscated.jar"/> </pected>
الارتباك -0.0.1-snapshot.jar عبارة عن حزمة غير مملوءة بعد الحزمة ، في حين أن الارتباك-0.0.1-snapshot-obfuscated.jar عبارة عن حزمة محفوظة ، وهو ما نحتاجه.
خطوات التغليف
1. مشروع تنظيف Maven.
2. انسخ ملف allatori.xml أسفل الموارد إلى الدليل المستهدف.
3. قم بتثبيت مشروع Maven ، وبعد رؤية المعلومات التالية ، فهذا يعني أنه ناجح:
############################################################################################################# ############################################################################################################# النسخة التجريبية! ## ليس للاستخدام التجاري! ### ## إصدار العرض التوضيحي يضيف System.out's ## ويمنح اسم "allatori_demo" ## إلى بعض الحقول والأساليب. ## ## ## obfuscation by allatori obfuscator v6.4 demo ## ## http://www.allatori.com ## ## طلب ## طلب ## طلب ## طلب
4. المشروع الناجح:
يشير السهم إلى الحزمة التي نحتاجها ، وقد تم إحباط رمز هذه الحزمة.
عرض التأثير
نحن هنا نستخدم أداة فك الإلغاء لعرض الحزم المحببة. أستخدم برنامج JD-GUI ، وهو صغير وعملي.
قبل testapplication.java opfuscation:
استيراد org.springframework.boot.springapplication ؛ استيراد org.springframework.boot.autoconfigure.springbootapplication ؛ springbootapplicationpublicationplication testapplication {public static void main (string) }} بعد testapplication.java مفعمة بالحيوية:
استيراد java.io.printstream ؛ استيراد org.springframework.boot.springapplication ؛ استيراد org.springframework.boot.autoconfigure.springbootapplication ؛ springbootapplicationpublication publication {public static allatixdemo (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 ؛ ي-؛ ؟ [TMP45_44] = ((char) (A.Charat (TMP45_44) ^ i)) ؛ int tmp66_63 = (j--) ؛ ؟ } إرجاع سلسلة جديدة (؟) ؛ } الفراغ الثابت العام الرئيسي (سلسلة [] أ) { System.out.println("/n####################################################################################################### ## طلب ##################################################################### ## طلب ##################################################################### ## طلب ##################################################################### allatori obfuscator v6.4 Demo #/n # #/n #http://www.allatori.com #/n # #/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 ("/test") اختبار السلسلة العامة () {888888888888888 "؛ }} بعد testController.java مفعمة بالحيوية:
استيراد org.springframework.web.bind.annotation.getMapping ؛ استيراد org.springframework.web.bind.annotation.restController ؛ restControllerPublic class testController {getMapping ({"/test"}) allatorixDemo ("*]*]*]*]*]*]*]*]*") ؛ } السلسلة الثابتة العامة 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 ؛ ي-؛ ؟ int tmp72_69 = (j--) ؛ ؟ [TMP72_69] = ((char) (A.Charat (TMP72_69) ^ K)) ؛ } إرجاع سلسلة جديدة (؟) ؛ }} هاهاها ، ماذا عن ذلك ، ألا تفهم؟ وتستمر حزمة التشويش كالمعتاد دون أي مشاكل.
--------》 رمز المصدر وعنوان المستند "-------
ما سبق هو كل محتوى هذه المقالة. آمل أن يكون ذلك مفيدًا لتعلم الجميع وآمل أن يدعم الجميع wulin.com أكثر.