Skip to content

Commit

Permalink
Update SessionGopher.ps1
Browse files Browse the repository at this point in the history
- Ignores computers with empty names
- Write-Host for ASCII changed to output
  • Loading branch information
Brandon Arvanaghi committed May 8, 2017
1 parent 7dfc89d commit 2d6f713
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SessionGopher.ps1
Expand Up @@ -49,13 +49,13 @@ function Invoke-SessionGopher {
[switch]$AllDomain # Run across all active directory
)

Write-Host '
Write-Output '
o_
/ ". SessionGopher
," _-"
," m m
..+ ) Brandon Arvanaghi
`m..m @arvanaghi | arvanaghi.com
`m..m Twitter: @arvanaghi | arvanaghi.com
'

if ($o) {
Expand Down Expand Up @@ -110,6 +110,7 @@ function Invoke-SessionGopher {
if ($AllDomain) {
# Extract just the name from the System.DirectoryServices.SearchResult object
$RemoteComputer = $RemoteComputer.Properties.name
if (!$RemoteComputer) { Continue }
}

Write-Host -NoNewLine -ForegroundColor "DarkGreen" "[+] "
Expand Down

0 comments on commit 2d6f713

Please sign in to comment.