完成
This commit is contained in:
1
misc/easy_unpack/flag.txt
Normal file
1
misc/easy_unpack/flag.txt
Normal file
@@ -0,0 +1 @@
|
||||
flag{1234565}
|
18
misc/easy_unpack/pack.ps1
Normal file
18
misc/easy_unpack/pack.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
# 使用 7z 将 flag.txt 压缩到 unpack.zip
|
||||
& '7z' a -tzip unpack.zip flag.txt | Out-Null
|
||||
|
||||
$start = 1
|
||||
$end = 10000
|
||||
|
||||
# 循环压缩 10000 次
|
||||
for ($i = $start; $i -le $end; $i++) {
|
||||
& '7z' a -tzip pack.zip unpack.zip | Out-Null
|
||||
Move-Item -Path pack.zip -Destination unpack.zip -Force | Out-Null
|
||||
|
||||
$percentComplete = ($i / $end) * 100
|
||||
Write-Progress -PercentComplete $percentComplete -Status "Compressing" -Activity "$i of $end iterations complete"
|
||||
}
|
||||
|
||||
# 结束后清除进度条
|
||||
Write-Progress -Status "Compressing" -Activity "All iterations complete" -Completed
|
||||
|
9
misc/easy_unpack/pack.sh
Normal file
9
misc/easy_unpack/pack.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/zsh
|
||||
|
||||
7z a -tzip unpack.zip flag.txt
|
||||
start=1
|
||||
end=10000
|
||||
for ((i = start; i <= end; i++)); do
|
||||
7z a -tzip pack.zip unpack.zip
|
||||
mv pack.zip unpack.zip
|
||||
done
|
BIN
misc/easy_unpack/unpack.zip
Normal file
BIN
misc/easy_unpack/unpack.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user