Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for improvements #1

Closed
LostLogic opened this issue Nov 15, 2017 · 1 comment
Closed

Suggestions for improvements #1

LostLogic opened this issue Nov 15, 2017 · 1 comment

Comments

@LostLogic
Copy link

LostLogic commented Nov 15, 2017

Not very knowledgeable with Git, so I figured I'd post some suggestions for improvements.

Do a test-file on the dlls to allow for 2012 and 2016 cross compatability (Tested OK with 2016)

# Check if SCOM 2016 is installed if(Test-Path "C:\Program Files\Microsoft System Center 2016") { [System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\Microsoft.Mom.Sdk.SecureStorageManager.dll") | Out-Null [System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\Microsoft.EnterpriseManagement.DataAccessLayer.dll") | Out-Null } elseif(Test-Path "C:\Program Files\Microsoft System Center 2012 R2") { [System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\Microsoft.Mom.Sdk.SecureStorageManager.dll") | Out-Null [System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\Microsoft.EnterpriseManagement.DataAccessLayer.dll") | Out-Null } else { Write-Host "[!] Unable to find installation directory of SCOM 2012 R2 or 2016" return }

Change the SQL command to include Domain for multi domain environments:
$sqlCommand = "SELECT UserName, Data, Domain FROM dbo.CredentialManagerSecureStorage;"

Add a block after $passw decryption to clean up password output:
# Cleans up the spaces in the password $truePass = "" for($j = 0; $j -lt $passw.Length; $j++) { if($j % 2 -eq 0) { $truePass += $passw[$j] } }

Then, finally: Change the printing of the username password.

if($domain -notlike "") { Write-Host "[+] $domain\$user : $truePass" } else { Write-Host "[+] $user : $truePass" }

rxwx added a commit that referenced this issue Feb 11, 2018
Fixes issue #1, adding suggested version detection, domain extraction and password cleanup. Thanks @LostLogic !
@rxwx
Copy link
Contributor

rxwx commented Feb 11, 2018

Thanks very much for the improvement suggestions! Sorry it took me so long to get them implemented.

@rxwx rxwx closed this as completed Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants