SuperCATDevelopers / SuperCAT

The purpose of SuperCAT is to provide an all-in-one tool to inventory and audit offline computers without making any changes the baseline of the target machine. It is intended to run from a re-writable CD/DVD.
Other
1 stars 2 forks source link

Script cleanup and UX improvements #38

Closed lordneeko closed 3 years ago

lordneeko commented 3 years ago

Cleaned up scripts based on Lint Made some UX improvements to both the config setup. The user will now be prompted if the config file already exists.

The user can now enter a custom system name while running SuperCAT.

Other UX changes. Also includes #37 merged in

github-actions[bot] commented 3 years ago

PSScriptAnalyzer results:

Errors: [0], Warnings: [3], Information: [1]

``` RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 41 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 111 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 112 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidTrailingWhitespace Severity : Information ScriptName : export-offline-registry.ps1 Line : 8 Message : Line has trailing whitespace ```

github-actions[bot] commented 3 years ago

PSScriptAnalyzer results:

Errors: [0], Warnings: [3], Information: [1]

``` RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 45 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 115 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidUsingWMICmdlet Severity : Warning ScriptName : SuperCAT.ps1 Line : 116 Message : File 'SuperCAT.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. RuleName : PSAvoidTrailingWhitespace Severity : Information ScriptName : export-offline-registry.ps1 Line : 8 Message : Line has trailing whitespace ```

lordneeko commented 3 years ago

@VWong99 Please take a chance to look over these changes I made and make sure I didn't miss anything. Mostly cleanup and UX improvements.

lordneeko commented 3 years ago

Changes to SuperCAT.ps1 now properly reflect current file structure, with some other minor changes.

A separate discussion may be needed on whether the current file structure is correct when seen from removable media, as setup-powershell.ps1 and /tests would not be needed.

Yeah, so I made some realizations that the "Create Release" function isn't as automated as I had hoped. We'll have to package them and then create the "release"