mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-08 22:10:14 +01:00
Improved some scripts
This commit is contained in:
parent
2db0e4f347
commit
0ffef56c95
@ -7,10 +7,13 @@
|
|||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
param([string]$File)
|
param([string]$File)
|
||||||
|
if ($File -eq "" ) {
|
||||||
|
$File = read-host "Enter file: "
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Result = get-filehash $File -algorithm MD5
|
$Result = get-filehash $File -algorithm MD5
|
||||||
write-host $Result.Hash
|
write-host "✔️ MD5 hash is" $Result.Hash
|
||||||
exit 0
|
exit 0
|
||||||
} catch { Write-Error $Error[0] }
|
} catch { Write-Error $Error[0] }
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
param([string]$File)
|
param([string]$File)
|
||||||
|
if ($File -eq "" ) {
|
||||||
|
$File = read-host "Enter file: "
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Result = get-filehash $File -algorithm SHA1
|
$Result = get-filehash $File -algorithm SHA1
|
||||||
write-host $Result.Hash
|
write-host "✔️ SHA1 hash is" $Result.Hash
|
||||||
exit 0
|
exit 0
|
||||||
} catch { Write-Error $Error[0] }
|
} catch { Write-Error $Error[0] }
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
param([string]$File)
|
param([string]$File)
|
||||||
|
if ($File -eq "" ) {
|
||||||
|
$File = read-host "Enter file: "
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Result = get-filehash $File -algorithm SHA256
|
$Result = get-filehash $File -algorithm SHA256
|
||||||
write-host $Result.Hash
|
write-host "✔️ SHA256 hash is" $Result.Hash
|
||||||
exit 0
|
exit 0
|
||||||
} catch { Write-Error $Error[0] }
|
} catch { Write-Error $Error[0] }
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -7,9 +7,13 @@
|
|||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
param([string]$URL)
|
param([string]$URL)
|
||||||
|
if ($URL -eq "" ) {
|
||||||
|
$URL = read-host "Enter URL to download: "
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $URL --directory-prefix . --no-verbose
|
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $URL --directory-prefix . --no-verbose
|
||||||
|
write-host "✔️ Done."
|
||||||
exit 0
|
exit 0
|
||||||
} catch { Write-Error $Error[0] }
|
} catch { Write-Error $Error[0] }
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user