File tree 2 files changed +5
-22
lines changed
2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change 38
38
fmt :
39
39
gofmt -s -w -l .
40
40
41
+ install : $(SOURCES ) $(ALL_SOURCES )
42
+ go install $(BUILD_FLAGS )
43
+
41
44
clean :
42
45
rm -r certgraph build/
43
46
Original file line number Diff line number Diff line change 4
4
"encoding/json"
5
5
"flag"
6
6
"fmt"
7
- "net"
8
- "net/url"
9
7
"os"
10
8
"strings"
11
9
"sync"
@@ -111,7 +109,8 @@ func main() {
111
109
startDomains := make ([]string , 0 , 1 )
112
110
113
111
for _ , domain := range flag .Args () {
114
- d := cleanHostName (strings .ToLower (domain ))
112
+ d := strings .ToLower (domain )
113
+ v ("cleaned" , domain , d )
115
114
if len (d ) > 0 {
116
115
startDomains = append (startDomains , d )
117
116
v ("clean" , d )
@@ -321,22 +320,3 @@ func visitSSL(node *graph.DomainNode) {
321
320
node .VisitedCert = certnode .Fingerprint
322
321
}
323
322
}
324
-
325
- // sanitize the input to accept urls
326
- func cleanHostName (host string ) string {
327
- u , err := url .Parse (host )
328
- if err != nil {
329
- v (err )
330
- return ""
331
- }
332
- host = u .Host
333
-
334
- if strings .Contains (host , ":" ) {
335
- host , _ , err = net .SplitHostPort (host )
336
- if err != nil {
337
- v (err )
338
- return ""
339
- }
340
- }
341
- return host
342
- }
You can’t perform that action at this time.
0 commit comments