????????????? ?????? ZIP
Contents
[
Hide
Show
]??????? ??????
?????? ?????? ?????? �????????�, ?.?. ??. ??????? ????????? ?????????? ?????, ??????? ??????. Aspose.zip API ????????? ??? ?????? ? ?????? ??????????????? ????????, ????? ?????????????? ?????. ? ???? ?????? ????????????, ??? ??????? ?????? ??????????? ?????? ? ????????????? AES.
????????????????? ?????? ??????
????????, ??? ?????? ?????????? ? ???????? “T0p $ ecret”, ?? ???????? ??????? ??????????? ?????????? ????? ? ??? ?????. ????, ?? ????? ??????? ????? ??????, ??? ???:
1String Template = "t0p $ ecret {0} {1}";???????? ?????? ??????
???? ??????? ??? ????????????
1Archiveloadoptions Options = new ArchiveLodoptions ();
2Options.SetDecryptionPassword (??????);
3?????????? (????? a = ????? ????? ("encrypted.zip", ?????)))
4 A.ExtractTodirectory (".");????? ?????? ???? ?? ?????
??? ??? ????????? ? ????????????? ?????? ???? ?? ??????. ???? ????????? ?????? ???????? ?????????? ?????? ? ???????.
1String Template = "t0p $ ecret {0} {1}";
2??? (char c = 'a'; c <'z'; c ++)
3{
4 ?????????? ?????????? = false;
5 ??? (int i = 10; i <99; i ++)
6 {
7 String password = messageFormat.format (??????, c, i);
8 Archiveloadoptions Options = new ArchiveLodoptions ();
9 Options.SetDecryptionPassword (??????);
10 ?????????? (????? a = new Archive ("encrypted.zip", Options)) {
11 A.ExtractTodirectory (".");
12 ????????? = true;
13 }
14 ???? (InvalidDataException e)
15 {
16 ????????? = false;
17 }
18
19 if (correct)
20 {
21 System.out.println("Proper password: " + password);
22 break;
23 }
24 }
25
26 if (correct)
27 break;
28}