Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ipv4cat service to help inspect breakouts #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GOAT-FARM3R
Copy link
Member

No description provided.

@@ -52,6 +54,7 @@ type service struct {
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