Skip to content

Commit 15e287c

Browse files
committed
fix: zip crack
1 parent 9f9226c commit 15e287c

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

cmd/wutils/zip/crack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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\npassword\n" +
34+
"test\n123456\npassword\n" +
3535
"admin\n12345678\n")
3636
if err := os.WriteFile(path, defaultContent, 0644); err != nil {
3737
return "", fmt.Errorf("failed to create password file: %w", err)

pkg/zip/crack_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff 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"},

0 commit comments

Comments
 (0)