Giter Club home page Giter Club logo

Comments (2)

Mzack9999 avatar Mzack9999 commented on June 16, 2024

All the values are already accessible in HostResult (each port carries info about the protocol and tls). Are you mostly interested in the CDN info?

from naabu.

aringo-bf avatar aringo-bf commented on June 16, 2024

Yes, it was originally about the CDN value but it's also about ease of usability.

The results are returned in a - concacted string for some unknown to me reason so that leaves a lot to be desired. To easily access the properties of the port or if it's TLS you have to as far as I know make some stupid function like below.

                var port, protocol int, var tls bool
		// fix hard to work with return values 
                 formattedString := fmt.Sprintf("%d-%d-%v", elem.Port, elem.Protocol, elem.TLS)
		_, err := fmt.Sscanf(formattedString, "%d-%d-%v", &port, &protocol, &tls)

Why not just return the result struct ?

Ended up just calling CDN check directly to access those values.

from naabu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.