Skip to content

Conversation

GOAT-FARM3R
Copy link
Member

No description provided.

var services = map[string]service{
"letmeout": service{url: "go-out.letmeoutofyour.net", match: "w00tw00t"},
"allports": service{url: "allports.exposed", match: "<p>Open Port</p>"},
"ipv4cat": service{url: "ipv4.cat", match: ""},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets extract TCP services to their own type.

return // if the first one errored already, don't continue
}

message, _ := bufio.NewReader(conn).ReadString('\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets check the error here in case we never reach the \n.


addr := net.ParseIP(strings.TrimSuffix(message, "\n"))

if addr.To4() != nil && addr.To16() != nil && !*invertPtr {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To16() may be enough for v4 && v6 checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants