Skip to content

Commit

Permalink
Fix UDP scan json output
Browse files Browse the repository at this point in the history
  • Loading branch information
v-byte-cpu committed Mar 27, 2021
1 parent 3960e9e commit b9b1bfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ cat arp.cache | ./sx udp --json -p 53 192.168.0.171
sample output:

```
{"scan":"udp","ip":"192.168.0.171","icmp":{"Type":3,"Code":3}}
{"scan":"udp","ip":"192.168.0.171","icmp":{"type":3,"code":3}}
```

In this case we find out that host sent ICMP reply packet with **Destination Unreachable** type and **Port Unreachable** code (typical response for a closed port according to the rfc1122).
Expand Down
4 changes: 2 additions & 2 deletions pkg/scan/icmp/icmp.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package icmp

type Response struct {
Type uint8
Code uint8
Type uint8 `json:"type"`
Code uint8 `json:"code"`
}
8 changes: 4 additions & 4 deletions pkg/scan/udp/result_easyjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9b1bfa

Please sign in to comment.