-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from amidaware:main #2
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
base: main
Are you sure you want to change the base?
Changes from all commits
6e92d0f
9ec99a5
140dcf7
7bc0a80
6e7f6c5
fa458f7
99d4837
bb3eb54
f5557b8
f15fca4
e90de38
ebced20
a3993d2
df8edf5
0f40ca6
f165f78
1822b83
004d652
59d637e
bcaff03
4b6f5b7
9c099cd
3a5efbf
af616ed
11b5926
3920ccf
8bbaf1e
18fecae
c7c7c80
39a0847
0e31d09
f5e4564
70f146b
f01f424
91c1e20
47e227a
f3b71f2
39773e4
6d53ffe
dc41534
6b9d2ae
8c64f8e
0511638
680cdaa
3ed646c
dc840c1
a65ebb7
64543ef
e44197b
df70076
3e02e39
238a182
94a585c
30afc92
5c59fac
16f217f
1c81d90
bc172d6
8129d4a
518b693
d72880b
0f7eca5
098a8c1
eb0076d
94cf346
0986434
5866600
d5e32f7
ffe1f8d
ed4d35f
c227d01
f6cc48b
ee91251
c7d9100
668755c
f957ff2
23dc45b
a367c63
bb1fffd
c6b85d6
90f41b1
b221d1e
f37bdfc
1ce392e
f925800
ff4aa64
7ecf685
4b3f5d5
f86eed0
9b52af8
e758072
398adb0
e621b49
c3d76b6
f7e5fdc
f4bdb1c
cac8387
eaeac5b
1505323
364dcdc
97d9a65
7298085
df58240
d41e4c3
e45551f
3dca8c8
3dae25a
7d6f169
1b10249
8c38b69
0deff80
d354db0
57daacd
0830d29
37c91e1
70cc2e7
3017648
18525f4
9909ca8
ceac534
f4ef928
d9d6f36
b44477b
c213cab
4f67dbc
8cac05c
217db59
4211d4a
469e6f7
ac80392
911f424
3ccb467
111dde7
21cbb05
7f9bcd6
eae28d2
f477e08
d842f70
5c58624
8d80ca3
527c98b
224999d
750a0fb
bf867b7
9f7053b
2924d53
37287b2
1a7ccfe
aa87320
1fcc8c1
2627c79
4c7fb7f
f083141
a43d3bf
7b55679
f790b30
87f1516
d440520
c9456fe
3c3a670
02beccd
7c79608
0da2263
e13b220
4cbe674
6faeb93
47f5d1e
c8d3079
9458206
70643b3
4440f1c
b924781
8506c83
c3a7e79
d0f34c9
ee77fb4
8e14093
03176ff
e2d22b1
9378ed7
382dbce
e96e513
93108ba
68088c6
79b1ebe
cd3670c
f2a03c4
8c23933
4d8acfc
6d5ed4b
7a2d471
8fe47f2
073de76
f7fc17f
076219c
d846804
b276122
68fa0ac
5e45df7
86c761d
d8809ca
626fbe0
51a6dae
47c5a25
bee5c32
0fef93c
d303d9b
2a8cd90
3255198
90758bb
526ffcd
3160e96
b4e4c33
5b87af9
4c5d55e
503c48e
85471d7
302ac23
c41590e
b4f2c53
8840d92
8de8220
7dac6ea
70c806b
f8eaa52
bfb7e05
ee56785
c55280f
1e5cb07
f6e6031
29a1442
13afb93
177500b
c6284e3
3ef446a
39a501c
e1ea212
ff494d7
cff4eda
e11d30d
7e77de8
df54214
442403d
05271fc
b4e128a
a4eb5df
c12759d
1123d79
7b78202
73cf952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,87 +1,83 @@ | ||
| { | ||
| "python.defaultInterpreterPath": "env/bin/python", | ||
| "python.languageServer": "Pylance", | ||
| "python.analysis.extraPaths": [ | ||
| "env" | ||
| ], | ||
| "python.testing.pytestEnabled": true, | ||
| "python.analysis.diagnosticSeverityOverrides": { | ||
| "reportUnusedImport": "error", | ||
| "reportDuplicateImport": "error", | ||
| }, | ||
| "python.analysis.typeCheckingMode": "basic", | ||
| "python.formatting.provider": "black", | ||
| "editor.formatOnSave": true, | ||
| "files.watcherExclude": { | ||
| "files.watcherExclude": { | ||
| "**/.git/objects/**": true, | ||
| "**/.git/subtree-cache/**": true, | ||
| "**/node_modules/": true, | ||
| "/node_modules/**": true, | ||
| "**/env/": true, | ||
| "/env/**": true, | ||
| "**/__pycache__": true, | ||
| "/__pycache__/**": true, | ||
| "**/.cache": true, | ||
| "**/.eggs": true, | ||
| "**/.ipynb_checkpoints": true, | ||
| "**/.mypy_cache": true, | ||
| "**/.pytest_cache": true, | ||
| "**/*.egg-info": true, | ||
| "**/*.feather": true, | ||
| "**/*.parquet*": true, | ||
| "**/*.pyc": true, | ||
| "**/*.zip": true | ||
| }, | ||
| }, | ||
| "cSpell.words": [ | ||
| "ADDC", | ||
| "agentname", | ||
| "Antispyware", | ||
| "Antiviruses", | ||
| "Anynet", | ||
| "apitw", | ||
| "Autorun", | ||
| "bdexe", | ||
| "bdfb", | ||
| "bdurl", | ||
| "Bitdefender", | ||
| "Bitlocker", | ||
| "Bluescreen", | ||
| "BSOD", | ||
| "Clearand", | ||
| "clientname", | ||
| "Cortana", | ||
| "customidtw", | ||
| "Debugmode", | ||
| "DIMM's", | ||
| "Duplicati", | ||
| "ESET", | ||
| "Faststartup", | ||
| "fromaddress", | ||
| "fullname", | ||
| "Hudu", | ||
| "iperf", | ||
| "LAPSID", | ||
| "localadmin", | ||
| "MSITW", | ||
| "netsh", | ||
| "procname", | ||
| "Restartor", | ||
| "Screenconnect", | ||
| "Securepoint", | ||
| "sitename", | ||
| "smtpserver", | ||
| "Sophos", | ||
| "Speedtest", | ||
| "Splashtop", | ||
| "SSID", | ||
| "SUUID", | ||
| "Teamviewer", | ||
| "toaddress", | ||
| "TRMM", | ||
| "urlmsitw", | ||
| "warnwhenovermemsize", | ||
| "Winget" | ||
| ] | ||
| } | ||
| "python.defaultInterpreterPath": "env/bin/python", | ||
| "python.languageServer": "Pylance", | ||
| "python.analysis.extraPaths": ["env"], | ||
| "python.testing.pytestEnabled": true, | ||
| "python.analysis.diagnosticSeverityOverrides": { | ||
| "reportUnusedImport": "error", | ||
| "reportDuplicateImport": "error" | ||
| }, | ||
| "python.analysis.typeCheckingMode": "basic", | ||
| "python.formatting.provider": "black", | ||
| "editor.formatOnSave": true, | ||
| "files.watcherExclude": { | ||
| "**/.git/objects/**": true, | ||
| "**/.git/subtree-cache/**": true, | ||
| "**/node_modules/": true, | ||
| "/node_modules/**": true, | ||
| "**/env/": true, | ||
| "/env/**": true, | ||
| "**/__pycache__": true, | ||
| "/__pycache__/**": true, | ||
| "**/.cache": true, | ||
| "**/.eggs": true, | ||
| "**/.ipynb_checkpoints": true, | ||
| "**/.mypy_cache": true, | ||
| "**/.pytest_cache": true, | ||
| "**/*.egg-info": true, | ||
| "**/*.feather": true, | ||
| "**/*.parquet*": true, | ||
| "**/*.pyc": true, | ||
| "**/*.zip": true | ||
| }, | ||
| "cSpell.words": [ | ||
| "ADDC", | ||
| "agentname", | ||
| "Antispyware", | ||
| "Antiviruses", | ||
| "Anynet", | ||
| "apitw", | ||
| "Autorun", | ||
| "bdexe", | ||
| "bdfb", | ||
| "bdurl", | ||
| "Bitdefender", | ||
| "Bitlocker", | ||
| "Bluescreen", | ||
| "BSOD", | ||
| "Clearand", | ||
| "clientname", | ||
| "Cortana", | ||
| "customidtw", | ||
| "Debugmode", | ||
| "DIMM's", | ||
| "Duplicati", | ||
| "ESET", | ||
| "Faststartup", | ||
| "fromaddress", | ||
| "fullname", | ||
| "Hudu", | ||
| "iperf", | ||
| "LAPSID", | ||
| "localadmin", | ||
| "MSITW", | ||
| "netsh", | ||
| "procname", | ||
| "Restartor", | ||
| "Screenconnect", | ||
| "Securepoint", | ||
| "sitename", | ||
| "smtpserver", | ||
| "Sophos", | ||
| "Speedtest", | ||
| "Splashtop", | ||
| "SSID", | ||
| "SUUID", | ||
| "Teamviewer", | ||
| "toaddress", | ||
| "TRMM", | ||
| "urlmsitw", | ||
| "warnwhenovermemsize", | ||
| "Winget" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,32 +2,43 @@ | |
| .Synopsis | ||
| Bluescreen - Reports bluescreens | ||
| .DESCRIPTION | ||
| This will check for Bluescreen events on your system. If parameter provided, goes back that number of days | ||
| This script checks for Bluescreen events on your system. If a parameter is provided, it goes back that number of days to check. | ||
| .EXAMPLE | ||
| 365 | ||
| .NOTES | ||
| v1 bbrendon 2/2021 | ||
| v1.1 silversword updating with parameters 11/2021 | ||
| v1.1 silversword updating with parameters 11/2021 | ||
| v1.2 dinger1986 Updated for improved filtering and structure 11/2024 | ||
| #> | ||
|
|
||
| # Get the parameter (number of days to go back) | ||
| $DaysBack = $args[0] | ||
|
|
||
| $param1 = $args[0] | ||
| # Set error handling preference | ||
| $ErrorActionPreference = 'SilentlyContinue' | ||
|
|
||
| $ErrorActionPreference = 'silentlycontinue' | ||
| # Determine the time range based on the parameter | ||
| if ($Args.Count -eq 0) { | ||
| $TimeSpan = (Get-Date) - (New-TimeSpan -Day 1) | ||
| } | ||
| else { | ||
| $TimeSpan = (Get-Date) - (New-TimeSpan -Day $param1) | ||
| $StartTime = (Get-Date).AddDays(-1) | ||
| } else { | ||
| $StartTime = (Get-Date).AddDays(-[int]$DaysBack) | ||
| } | ||
|
|
||
| # Retrieve Bluescreen events | ||
| $BlueScreenEvents = Get-WinEvent -FilterHashtable @{ | ||
| LogName = 'Application'; | ||
| ID = 1001; | ||
| ProviderName = 'Windows Error Reporting'; | ||
| Level = 4; | ||
| StartTime = $StartTime | ||
| } | Where-Object { $_.Message -like "*BlueScreen*" } | ||
|
|
||
| if (Get-WinEvent -FilterHashtable @{LogName = 'application'; ID = '1001'; ProviderName = 'Windows Error Reporting'; Level = 4; Data = 'BlueScreen'; StartTime = $TimeSpan }) { | ||
| Write-Output "There has been bluescreen events detected on your system" | ||
| Get-WinEvent -FilterHashtable @{LogName = 'application'; ID = '1001'; ProviderName = 'Windows Error Reporting'; Level = 4; Data = 'BlueScreen'; StartTime = $TimeSpan } | ||
| # Check and output results | ||
| if ($BlueScreenEvents) { | ||
| Write-Output "There have been Bluescreen events detected on your system:" | ||
| $BlueScreenEvents | Format-List TimeCreated, Id, LevelDisplayName, Message | ||
| exit 1 | ||
| } else { | ||
| Write-Output "No bluescreen events detected in the past 24 hours." | ||
| Write-Output "No Bluescreen events detected in the past $((Get-Date) - $StartTime).Days days." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Days calculation outputs object type instead of numberThe string interpolation |
||
| exit 0 | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| rem List apps installed by Chocolatey | ||
|
|
||
| choco list --local-only | ||
| set "chocoExePath=%PROGRAMDATA%\chocolatey\choco.exe" | ||
|
|
||
| "%chocoExePath%" list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing exit in non-customField success path
When antivirus is found and
$customFieldis not specified, the script outputs the antivirus information but never explicitly exits. The script then falls through without an exit code, potentially causing issues with how the calling system interprets the result. The$customFieldpath correctly usesexit 0, but the else branch is missing an exit statement.