diff --git a/pom.xml b/pom.xml index 9c060040a..f5e539202 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ 1.8 + 1.0.7 @@ -65,6 +66,10 @@ 0.10.5 runtime + + io.github.pixee + java-security-toolkit + @@ -75,5 +80,13 @@ - + + + + io.github.pixee + java-security-toolkit + ${versions.java-security-toolkit} + + + diff --git a/src/main/java/com/scalesec/vulnado/LinkLister.java b/src/main/java/com/scalesec/vulnado/LinkLister.java index a59ebeb24..27afc0ddb 100644 --- a/src/main/java/com/scalesec/vulnado/LinkLister.java +++ b/src/main/java/com/scalesec/vulnado/LinkLister.java @@ -1,5 +1,7 @@ package com.scalesec.vulnado; +import io.github.pixee.security.HostValidator; +import io.github.pixee.security.Urls; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -23,7 +25,7 @@ public static List getLinks(String url) throws IOException { public static List getLinksV2(String url) throws BadRequest { try { - URL aUrl= new URL(url); + URL aUrl= Urls.create(url, Urls.HTTP_PROTOCOLS, HostValidator.DENY_COMMON_INFRASTRUCTURE_TARGETS); String host = aUrl.getHost(); System.out.println(host); if (host.startsWith("172.") || host.startsWith("192.168") || host.startsWith("10.")){