Skip to content

Commit

Permalink
More error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Nov 5, 2024
1 parent f9dd354 commit 063bd8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,11 @@ func main() {
}

// Did we catch something?
res := response.Entries[0].Attributes[0].ByteValues[0]
if len(res) > 2 && res[0] == 0x17 && res[1] == 00 {
outputqueue <- username
if len(response.Entries) > 0 && len(response.Entries[0].Attributes) > 0 && len(response.Entries[0].Attributes[0].ByteValues) > 0 {
res := response.Entries[0].Attributes[0].ByteValues[0]
if len(res) > 2 && res[0] == 0x17 && res[1] == 00 {
outputqueue <- username
}
}

// Should we start a new connection to avoid detection
Expand Down

0 comments on commit 063bd8d

Please sign in to comment.