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