-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsysintfunct.ps1
More file actions
92 lines (90 loc) · 3.34 KB
/
sysintfunct.ps1
File metadata and controls
92 lines (90 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
function tcpview {
Clear-Host
Write-Output("")
Write-Output("What it does: This application scans the system for open ports and sockets and tells you who the owner is, what made it, and what type it is.")
Write-Output("")
$tcpviewyn = Read-Host -Prompt "Would you like to use the application TCP Viewer from Microsoft's System Internals Suite? [y/n] "
if ($tcpviewyn -eq 'y')
{
$homepath = Get-Location
$whoami = $env:USERNAME
Set-Location C:\Users\$whoami\Desktop\SysinternalsSuite
Write-Output("Starting TCP Viewer...")
}
else
{
sysintmenu
}
}
function rotkit {
Clear-Host
Write-Output("")
Write-Output("What it does: Finds out the size of each Registry and its usage.")
Write-Output("")
$rootyn = Read-Host -Prompt "Would you like to use the application Registry Size Usage Reporter from Microsoft's System Internals Suite? [y/n] "
if ($rootyn -eq 'y')
{
$homepath = Get-Location
$whoami = $env:USERNAME
Set-Location C:\Users\$whoami\Desktop\SysinternalsSuite
Write-Output("Starting Root Kit Revealer...")
./ru.exe HKEY_CLASSES_ROOT
./ru.exe HKEY_CURRENT_USER
./ru.exe HKEY_LOCAL_MACHINE
./ru.exe HKEY_USERS
./ru.exe HKEY_CURRENT_CONFIG
Write-Output("")
Write-Output("")
Write-Output("")
$output = Read-Host -Prompt 'Would you like to have this sent to a file on your desktop? [y/n] '
if ($output -eq 'y')
{
./ru.exe HKEY_CLASSES_ROOT | Out-File C:\Users\$whoami\Desktop\registrysizelog.txt
./ru.exe HKEY_CURRENT_USER | Out-File C:\Users\$whoami\Desktop\registrysizelog.txt
./ru.exe HKEY_LOCAL_MACHINE | Out-File C:\Users\$whoami\Desktop\registrysizelog.txt
./ru.exe HKEY_USERS | Out-File C:\Users\$whoami\Desktop\registrysizelog.txt
./ru.exe HKEY_CURRENT_CONFIG | Out-File C:\Users\$whoami\Desktop\registrysizelog.txt
Write-Output("You can now find the output in a log called registrysizelog.txt on your desktop.")
Start-Sleep -Seconds 4
}
else
{
return
}
Set-Location $homepath
} else {
sysintmenu
}
}
function handle {
Clear-Host
Write-Output("")
Write-Output("What it does: This handy command-line utility will show you what files are open by which processes, and much more.")
Write-Output("")
$handyn = Read-Host -Prompt "Would you like to use the command Handle from Microsoft's System Internals Suite? [y/n] "
if ($handyn -eq 'y')
{
$homepath = Get-Location
$whoami = $env:USERNAME
Set-Location C:\Users\$whoami\Desktop\SysinternalsSuite
Write-Output("Starting Handle...")
./handle.exe
Write-Output("")
Write-Output("")
Write-Output("")
$output = Read-Host -Prompt 'Would you like to have this sent to a file on your desktop? [y/n] '
if ($output -eq 'y')
{
./handle.exe | Out-File C:\Users\$whoami\Desktop\handlelog.txt
Write-Output("You can now find the output in a log called handlelog.txt on your desktop.")
Start-Sleep -Seconds 4
}
else
{
return
}
Set-Location $homepath
} else {
sysintmenu
}
}