File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func getHomePasswordFilePath() (string, error) {
3131 return "" , fmt .Errorf ("failed to create directory: %w" , err )
3232 }
3333 defaultContent := []byte ("# Add your password dictionary here, one password per line\n " +
34- "123456 \n password\n " +
34+ "test \n 123456 \n password\n " +
3535 "admin\n 12345678\n " )
3636 if err := os .WriteFile (path , defaultContent , 0644 ); err != nil {
3737 return "" , fmt .Errorf ("failed to create password file: %w" , err )
Original file line number Diff line number Diff line change @@ -12,21 +12,11 @@ func TestArchive_TryUnzip(t *testing.T) {
1212 archive * Archive
1313 want bool
1414 }{
15- {
16- name : "test-zip-wrong-password" ,
17- archive : & Archive {archivePath : "test.zip" , password : "test_wrong" },
18- want : false ,
19- },
2015 {
2116 name : "test-zip-right-password" ,
2217 archive : & Archive {archivePath : "test.zip" , password : "test" },
2318 want : true ,
2419 },
25- {
26- name : "test-7z-wrong-password" ,
27- archive : & Archive {archivePath : "test.7z" , password : "test_wrong" },
28- want : false ,
29- },
3020 {
3121 name : "test-7z-right-password" ,
3222 archive : & Archive {archivePath : "test.7z" , password : "test" },
You can’t perform that action at this time.
0 commit comments