-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.frm
1758 lines (1666 loc) · 55.2 KB
/
Form1.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "DyEncryptor6.0"
ClientHeight = 8970
ClientLeft = 45
ClientTop = 645
ClientWidth = 11310
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
OLEDropMode = 1 'Manual
ScaleHeight = 8970
ScaleWidth = 11310
StartUpPosition = 2 '屏幕中心
Begin VB.Timer TimerGUI
Interval = 1800
Left = 9120
Top = 5040
End
Begin VB.HScrollBar HScroll1
Height = 255
Left = 120
Max = 255
MousePointer = 1 'Arrow
TabIndex = 38
Top = 6120
Value = 255
Width = 2055
End
Begin VB.Timer TimerTemprt
Enabled = 0 'False
Interval = 15
Left = 8160
Top = 5040
End
Begin VB.CommandButton Command10
Caption = "..."
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 8160
TabIndex = 37
Top = 6480
Width = 375
End
Begin VB.CommandButton Command9
Caption = "显示字符"
BeginProperty Font
Name = "微软雅黑"
Size = 7.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 2760
TabIndex = 36
Top = 3960
Width = 840
End
Begin VB.CommandButton Command8
Caption = "显示字符"
BeginProperty Font
Name = "微软雅黑"
Size = 7.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 2760
TabIndex = 35
Top = 2880
Width = 840
End
Begin VB.CommandButton Command6
Caption = "属性"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 9840
TabIndex = 33
Top = 2040
Width = 975
End
Begin VB.CommandButton Command6_2
Caption = "Command6"
Height = 495
Left = 10080
TabIndex = 32
Top = 3960
Visible = 0 'False
Width = 615
End
Begin VB.Timer Timer4
Interval = 10
Left = 8640
Top = 5040
End
Begin DyEncryptor.MorphTextBox Text1
Height = 375
Left = 480
TabIndex = 29
Top = 3240
Width = 3135
_ExtentX = 5530
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultColor1 = 8421504
DefaultColor2 = 16777215
FocusColor2 = 16777152
PasswordChar = "*"
End
Begin VB.TextBox Text4
Height = 1935
Left = 2400
Locked = -1 'True
MultiLine = -1 'True
OLEDropMode = 1 'Manual
ScrollBars = 3 'Both
TabIndex = 8
ToolTipText = "加密系统运行日志"
Top = 6960
Width = 8775
End
Begin VB.CommandButton Command5
Caption = "历史记录"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 2760
TabIndex = 25
Top = 1200
Width = 1215
End
Begin VB.CheckBox Check2
Caption = "生成EXE解密文件"
Height = 300
Left = 120
TabIndex = 27
ToolTipText = "生成EXE解密文件"
Top = 6960
Width = 2415
End
Begin VB.CheckBox Check1
Caption = "完成后关机"
Height = 300
Left = 120
TabIndex = 24
ToolTipText = "完成后关闭计算机"
Top = 7320
Width = 2415
End
Begin VB.CommandButton Command4
Caption = "设置"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 120
TabIndex = 22
ToolTipText = "导出日志到输出目录"
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "导出日志"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 1440
TabIndex = 18
ToolTipText = "导出日志到输出目录"
Top = 1200
Width = 1215
End
Begin VB.Frame Frame2
Height = 615
Left = 2400
TabIndex = 15
ToolTipText = "输出目录选择"
Top = 5760
Width = 3015
Begin VB.OptionButton Option4
Caption = "自定义"
Height = 300
Left = 1680
TabIndex = 17
Top = 240
Width = 1215
End
Begin VB.OptionButton Option3
Caption = "源目录"
Height = 300
Left = 240
TabIndex = 16
Top = 240
Value = -1 'True
Width = 1335
End
End
Begin VB.TextBox Text5
Enabled = 0 'False
Height = 345
IMEMode = 3 'DISABLE
Left = 3600
TabIndex = 14
Top = 6480
Width = 4455
End
Begin VB.Timer Timer3
Interval = 25
Left = 10080
Top = 5040
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 60
Left = 9600
Top = 5040
End
Begin VB.CommandButton Command2
Caption = "一键处理"
BeginProperty Font
Name = "微软雅黑"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 8640
TabIndex = 12
Top = 5880
Width = 2535
End
Begin VB.Frame Frame1
Height = 615
Left = 5640
TabIndex = 9
ToolTipText = "模式选择"
Top = 5760
Width = 2895
Begin VB.OptionButton Option2
Caption = "解密"
Height = 300
Left = 1560
TabIndex = 11
Top = 240
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "加密"
Height = 300
Left = 240
TabIndex = 10
Top = 240
Value = -1 'True
Width = 1215
End
End
Begin VB.CommandButton Command1
Caption = "浏览文件"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 9960
TabIndex = 5
ToolTipText = "浏览以选择文件"
Top = 1200
Width = 1215
End
Begin VB.TextBox Text3
Height = 390
IMEMode = 3 'DISABLE
Left = 4080
OLEDropMode = 1 'Manual
TabIndex = 4
Top = 1200
Width = 5775
End
Begin VB.TextBox Text2m
BeginProperty Font
Name = "微软雅黑"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 4800
PasswordChar = "*"
TabIndex = 3
Top = 4200
Visible = 0 'False
Width = 3135
End
Begin VB.TextBox Text1m
BeginProperty Font
Name = "微软雅黑"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 4920
PasswordChar = "*"
TabIndex = 1
Top = 4800
Visible = 0 'False
Width = 3135
End
Begin DyEncryptor.MorphTextBox Text2
Height = 375
Left = 480
TabIndex = 30
Top = 4320
Width = 3135
_ExtentX = 5530
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultColor1 = 8421504
DefaultColor2 = 16777215
PasswordChar = "*"
End
Begin VB.Label Label15
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "100.0%"
BeginProperty Font
Name = "微软雅黑"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 40
Top = 5820
Width = 1215
End
Begin VB.Label Label14
BackStyle = 0 'Transparent
Caption = "透明度设置:"
BeginProperty Font
Name = "微软雅黑"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 39
Top = 5820
Width = 2055
End
Begin VB.Label Label13
BackStyle = 0 'Transparent
Caption = "加密系统安全键盘已启动防护"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 360
TabIndex = 34
Top = 2160
Width = 3255
End
Begin VB.Label Label12
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "大写键已开启 "
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Left = 360
TabIndex = 31
Top = 5040
Width = 3255
End
Begin VB.Label Label7
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Copyright (C) 2016-2022 DUYU."
BeginProperty Font
Name = "微软雅黑"
Size = 7.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7440
TabIndex = 19
ToolTipText = "单击此处查看版权声明,齐鲁工业大学 软件工程(开发)21-1班 杜宇(202103180009) 保留所有权利。"
Top = 5400
Width = 3255
End
Begin VB.Label Label3
Caption = "Label3"
Height = 375
Left = 9600
TabIndex = 28
Top = 4440
Visible = 0 'False
Width = 735
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "version"
BeginProperty Font
Name = "微软雅黑"
Size = 6.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 26
ToolTipText = "单击此处查看版权声明,齐鲁工业大学 软件工程(开发)21-1班 杜宇(202103180009) 保留所有权利。"
Top = 8640
Width = 2415
End
Begin VB.Label Label10
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "销毁源文件"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 120
TabIndex = 23
Top = 6480
Width = 2055
End
Begin VB.Image Image1
Height = 1095
Left = 0
Picture = "Form1.frx":C84A
Stretch = -1 'True
Top = 0
Width = 11295
End
Begin VB.Label Label9
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "您可以单击“浏览文件”按钮,也可以拖放文件到此处"
BeginProperty Font
Name = "微软雅黑"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 5640
OLEDropMode = 1 'Manual
TabIndex = 21
ToolTipText = "拖放文件到此处"
Top = 3360
Width = 4215
End
Begin VB.Shape Shape1
BorderStyle = 5 'Dash-Dot-Dot
Height = 3735
Left = 4200
Shape = 4 'Rounded Rectangle
Top = 1920
Width = 6855
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "111"
BeginProperty Font
Name = "Consolas"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 20
ToolTipText = "当前时间"
Top = 8280
Width = 3135
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "输出目录:"
Height = 495
Left = 2400
TabIndex = 13
Top = 6480
Width = 1215
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "00:00:00"
Height = 375
Left = 1320
TabIndex = 7
Top = 7680
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "已用时间:"
Height = 375
Left = 120
TabIndex = 6
Top = 7680
Width = 1455
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "确认密码:"
Height = 375
Left = 480
TabIndex = 2
Top = 3960
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "设置密码:"
Height = 375
Left = 480
TabIndex = 0
Top = 2880
Width = 1695
End
Begin VB.Image Image2
Height = 3780
Left = 120
Picture = "Form1.frx":1813C
Stretch = -1 'True
Top = 1920
Width = 3855
End
Begin VB.Menu file
Caption = "文件(F)"
Begin VB.Menu addf
Caption = "添加文件(A)"
Shortcut = ^A
End
Begin VB.Menu dest
Caption = "销毁文件(D)"
Shortcut = ^D
End
End
Begin VB.Menu setting
Caption = "设置(S)"
Begin VB.Menu setcenter
Caption = "设置中心(C)"
Shortcut = ^C
End
Begin VB.Menu wincol
Caption = "窗体颜色设置(W)"
Shortcut = ^W
End
End
Begin VB.Menu about
Caption = "关于(A)"
End
Begin VB.Menu quit
Caption = "退出(Q)"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Copyright (c) 2016-2022 DUYU. 杜宇保留所有权利。
'All Rights Reserved.
'2016-04-05. version:1.0.
'2018-10-13. version:1.0_Plus.
'2019-06-02. version:2.0.
'2020-02-26. version:3.0.
'2020-03-26. version:4.0.
'2021-08-29. version:5.0.
'2021-09-17. version:5.0_Plus.
'2021-10-28. version:6.0.
'2022-01-01. version:6.0_Plus.
'2016-2018 山东省济南实验初级中学(泉景校区)- 计算机社团小组 No.04
'2018-2020 济南市历城第二中学 - 信息学奥赛训练队 No.5522007 No.5531028
'2020-2022 齐鲁工业大学 - ICPC-ACM集训队 , 橙果工作室 No.202103180009
'Form1.frm
'气泡提示效果下载自http://www.codefans.net,在此声明。
'
'说明:DyEnc6.0没有更新涉及文件附属数据的内容,故加密文件的文件头仍然采用Version=5
'窗体透明
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
' 引用 CMultiToolTips 类
Dim TT As New CMultiToolTips
Private dlg As CCommonDialog
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long '判断键盘大写键是否开启
Const VK_CAPITAL = &H14
Function CapitalStatus() As Boolean '判断键盘大写键是否开启
Dim tKeyboardMap(255) As Byte
Dim bResult As Long
bResult = GetKeyboardState(tKeyboardMap(0))
If tKeyboardMap(VK_CAPITAL) And 1 = 1 Then CapitalStatus = True
End Function
Private Function Modd(a1 As Double, a2 As Double) As Double
Modd = a1 - a2 * Fix(a1 / a2)
End Function
Private Function GetFileName(FileAllName As String) As String
Dim a As String
a = FileAllName
For b = 1 To Len(a)
If Mid(a, b, 1) = "\" Then
C = b
End If
Next b
GetFileName = Right(a, Len(a) - C)
End Function
Private Function GetFilePath(FileAllName As String) As String
Dim a As String, b As Integer, C As Integer
a = FileAllName
For b = 1 To Len(a)
If Mid(a, b, 1) = "\" Then
C = b
End If
Next b
GetFilePath = Left(a, C - 1)
End Function
Private Function GetEncWord(OriWord As String) As String
Dim sT(0 To 100) As String, ia As Integer
Dim xpaa As String, jzz As Integer, izz As Integer
For ia = 1 To 94
sT(ia) = Chr(ia + 31)
Next
sT(95) = Chr(1)
sT(96) = Chr(2)
sT(97) = Chr(3)
sT(98) = Chr(4)
sT(99) = Chr(5)
sT(100) = Chr(6)
sT(0) = Chr(7)
For izz = 1 To Len(OriWord)
For jzz = 1 To 95
If sT(jzz) = Mid(OriWord, izz, 1) Then
Exit For
End If
Next jzz
Next izz
Dim sopz As String, stwz As String, az As Integer, bz As Integer, RAz As Integer, cz As String, dz As Integer, ez As String
For az = 1 To Len(OriWord)
For bz = 1 To 94
If sT(bz) = Mid(OriWord, az, 1) Then
Randomize
RAz = CInt(4.1 - 3 * Rnd)
sopz = sopz + sT(bz + RAz)
stwz = stwz + sT(RAz)
End If
Next bz
Next az
ez = CInt(9 - 9 * Rnd)
For dz = 1 To ez
Randomize
cz = cz + sT(CInt(90 - 89 * Rnd))
Next dz
xpaa = stwz + StrReverse(sopz) + cz + ez
GetEncWord = xpaa
End Function
Private Function UnEncWord(EncWord As String) As String
Dim sT(0 To 100) As String, ia As Long
Dim s As String, pas As String
Dim av As String, bpv As String, cpv As String, iav As Long, dv As Long, bmv As String, cmv As String, ev As Long, fv As Long
Dim a As String, bp As String, CP As String, d As Long, bm As String, cm As String, e As Long, f As Long
pas = EncWord
For ia = 1 To 94
sT(ia) = Chr(ia + 31)
Next
sT(95) = Chr(1)
sT(96) = Chr(2)
sT(97) = Chr(3)
sT(98) = Chr(4)
sT(99) = Chr(5)
sT(100) = Chr(6)
sT(0) = Chr(7)
av = Left(pas, Len(pas) - 1 - Val(Right(pas, 1)))
bpv = StrReverse(Right(av, Len(av) / 2))
cpv = Left(av, Len(av) \ 2)
For dv = 1 To Len(av) \ 2
For ev = 1 To 4
If sT(ev) = Mid(cpv, dv, 1) Then
For fv = 1 To 95
If sT(fv) = Mid(bpv, dv, 1) Then
bmv = bmv + sT(fv - ev)
Exit For
End If
Next
End If
Next
Next
UnEncWord = bmv
End Function
Private Sub about_Click()
Form2.Show
End Sub
Private Sub addf_Click()
Command1_Click
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
MsgB ("声明:该功能正处于试验阶段,对于部分操作系统和机型可能不适用。生成自解密EXE的过程涉及数据压缩,WinRar提供技术支持(Copyright (c) 1993-2019 Alexander Roshal)")
End If
End Sub
Private Sub Command1_Click()
Dim OFN As OPENFILENAME
Dim rtn As String, fp As String, xnk As String
If Dir(selP, vbDirectory) <> "" Then
xnk = selP
Else
xnk = App.Path
End If
OFN.lStructSize = Len(OFN)
OFN.hwndOwner = Me.hwnd
OFN.hInstance = App.hInstance
OFN.lpstrFilter = "所有文件(*.*)"
OFN.lpstrFile = Space(254)
OFN.nMaxFile = 255
OFN.lpstrFileTitle = Space(254)
OFN.nMaxFileTitle = 255
OFN.lpstrInitialDir = xnk
OFN.lpstrTitle = "请选择被处理的文件 - DyEncryptor"
OFN.Flags = 6148
rtn = GetOpenFileName(OFN)
If rtn >= 1 Then
Text3.Text = OFN.lpstrFile
Open App.Path & "\DyEncGUI5.0.config" For Output As #10
Print #10, GetFilePath(Text3.Text)
Close #10
End If
End Sub
Private Sub Command10_Click()
If Option4.Value = False Then
MsgB ("请首先选择自定义输出目录模式,再修改输出目录。" & vbCrLf & "您设置的自定义输出目录为:" & Text5.Text)
Exit Sub
End If
Set sh = CreateObject("Shell.Application")
Set fd = sh.BrowseForFolder(Me.hwnd, "DyEncryptor" & App.Major & "." & App.Minor & " - 请选择输出目录", 0)
'Me.hWnd是“选择文件夹”对话框的父窗口句柄,不关闭对话框不能返回父窗口。改为0没这个效果。
'第三个参数0改为512不显示“新建文件夹”按钮
If TypeName(fd) = "Folder3" Then Text5.Text = fd.Self.Path
End Sub
Private Sub Command2_Click()
starttime = Now
Timer2.Enabled = True
DoEvents
Text4.Text = Text4.Text & "[" & Format(Hour(Now), "00") & ":" & Format(Minute(Now), "00") & ":" & Format(Second(Now), "00") & "] 定位文件:" & Text3.Text & vbCrLf
On Error Resume Next
If Dir(Text3.Text) = "" Then
MsgB ("您选择的文件不存在。")
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command2.SetFocus
Exit Sub
End If
DoEvents
If Text3.Text = "" Then
MsgB ("请选择文件。")
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command1_Click
Command2.SetFocus
Exit Sub
End If
DoEvents
Dim judge1 As Boolean
If Option4.Value = True Then
Text4.Text = Text4.Text & "[" & Format(Hour(Now), "00") & ":" & Format(Minute(Now), "00") & ":" & Format(Second(Now), "00") & "] 定位输出目录:" & Text5.Text & vbCrLf
OutputDir = Text5.Text
If Dir(Text5.Text, vbDirectory) = "" Or Text5.Text = "" Then
judge1 = False
Else
judge1 = True
End If
Else
Text4.Text = Text4.Text & "[" & Format(Hour(Now), "00") & ":" & Format(Minute(Now), "00") & ":" & Format(Second(Now), "00") & "] 定位输出目录:" & GetFilePath(Text3.Text) & vbCrLf
OutputDir = GetFilePath(Text3.Text)
If Dir(GetFilePath(Text3.Text), vbDirectory) = "" Then
judge1 = False
Else
judge1 = True
End If
End If
If judge1 = False Then
MsgB ("您输入的目录路径不存在。")
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command2.SetFocus
Exit Sub
End If
DoEvents
Text4.Text = Text4.Text & "[" & Format(Hour(Now), "00") & ":" & Format(Minute(Now), "00") & ":" & Format(Second(Now), "00") & "] 检查运行环境"
If exitproc("Dy_EncCore.exe") = True Then
Text4.Text = Text4.Text & ":异常" & vbCrLf
MsgB ("加密核心组件正在运行,请将其关闭。")
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command2.SetFocus
Exit Sub
End If
DoEvents
If Text1.Text = "" Then
Text4.Text = Text4.Text & ":异常" & vbCrLf
MsgB ("请输入密码。")
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command2.SetFocus
Exit Sub
End If
DoEvents
If Option1.Value = True Then
If Text1.Text <> Text2.Text Then
Text4.Text = Text4.Text & ":异常" & vbCrLf
MsgB ("您设置的密码与确认密码不一致,请重新输入。")
Text2.Text = ""
Timer2.Enabled = False
Text4.Text = ""
Label5.Caption = "00:00:00"
Command2.SetFocus
Exit Sub
End If
End If
DoEvents