MCPcopy Create free account
hub / github.com/code-scan/Goal / GetIp

Method GetIp

Gsensor/Quake.go:93–109  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

91}
92
93func (s *Quake) GetIp(i int) {
94 s.result = Result{}
95 resp := s.send(`ip:"` + s.Domain + `"`)
96 // log.Println(string(resp))
97 Quakeresult := QuakeResult{}
98 json.Unmarshal(resp, &Quakeresult)
99 for _, v := range Quakeresult.Data {
100 host := fmt.Sprintf("%s:%d", v.Domain, v.Port)
101 if v.Domain == "" {
102 host = fmt.Sprintf("%s:%d", v.Ip, v.Port)
103 }
104 if strings.Contains(host, "://") {
105 host = strings.Split(host, "://")[1]
106 }
107 s.result[host] = v.Ip
108 }
109}
110
111func (s *Quake) GetPorts() {
112 s.result = Result{}

Callers 1

GetResultMethod · 0.95

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected