Skip to content

Commit

Permalink
update: scan single srv record function
Browse files Browse the repository at this point in the history
  • Loading branch information
Esonhugh committed Mar 21, 2024
1 parent caf3a2b commit 20154d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ func ScanSubnet(subnet *net.IPNet) (records []define.Record) {
return
}

func ScanSingleSvcForPorts(records define.Record) define.Record {
cname, srv, err := pkg.SRVRecord(records.SvcDomain)
if err != nil {
log.Debugf("SRVRecord for %v,failed: %v", records.SvcDomain, err)
return records
}
for _, s := range srv {
log.Infof("SRVRecord: %v --> %v:%v", records.SvcDomain, s.Target, s.Port)
}
records.SetSrvRecord(cname, srv)
return records
}

func ScanSvcForPorts(records []define.Record) []define.Record {
for i, r := range records {
cname, srv, err := pkg.SRVRecord(r.SvcDomain)
Expand Down

0 comments on commit 20154d8

Please sign in to comment.