Skip to content

Commit

Permalink
feat(zipcrack): zip 支持大文件
Browse files Browse the repository at this point in the history
  • Loading branch information
naocanmonster committed Dec 28, 2023
1 parent 32e5484 commit 45e424d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/zipcrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const Hash: React.FC = () => {
(event: React.MouseEvent<HTMLElement>) => {
if (cnt() / 1000 / 1000 / 1000 > 100) {
message('计算量太大了,别破解了,没啥希望');
} else if (data.byteLength > 1024 * 50) {
message('暂时还不支持破解超过 50 KB 的压缩包');
//} else if (data.byteLength > 1024 * 50) {
// message('暂时还不支持破解超过 50 KB 的压缩包');
} else {
setIng(true);
setTimeout(() => {
Expand All @@ -121,8 +121,8 @@ const Hash: React.FC = () => {
[
maxLength,
alphabet.split('').sort().join(''),
new Uint8Array(data),
data.byteLength,
new Uint8Array(data, 0, 50 * 1024),
Math.min(data.byteLength, 50 * 1024),
]
);
if (p) {
Expand Down

0 comments on commit 45e424d

Please sign in to comment.