diff --git a/misc/easy_unpack/flag.txt b/misc/easy_unpack/flag.txt new file mode 100644 index 0000000..825199c --- /dev/null +++ b/misc/easy_unpack/flag.txt @@ -0,0 +1 @@ +flag{1234565} \ No newline at end of file diff --git a/misc/easy_unpack/pack.ps1 b/misc/easy_unpack/pack.ps1 new file mode 100644 index 0000000..ee8f832 --- /dev/null +++ b/misc/easy_unpack/pack.ps1 @@ -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 + diff --git a/misc/easy_unpack/pack.sh b/misc/easy_unpack/pack.sh new file mode 100644 index 0000000..26403e8 --- /dev/null +++ b/misc/easy_unpack/pack.sh @@ -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 diff --git a/misc/easy_unpack/unpack.zip b/misc/easy_unpack/unpack.zip new file mode 100644 index 0000000..e3197f0 Binary files /dev/null and b/misc/easy_unpack/unpack.zip differ