Skip to content

Commit 5a4e7cc

Browse files
committed
refactor: remove GoSpider dependency and related integration logic
1 parent 09e50f3 commit 5a4e7cc

2 files changed

Lines changed: 1 addition & 29 deletions

File tree

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RUN git clone --depth 1 https://github.com/trufflesecurity/trufflehog.git /tmp/t
1818
go build -o /go/bin/trufflehog . && \
1919
cd /app && \
2020
rm -rf /tmp/trufflehog && \
21-
go install -v github.com/jaeles-project/gospider@latest && \
2221
go install -v github.com/d3mondev/puredns/v2@latest
2322

2423
# Build AutoAR main CLI and entrypoint

internal/scanner/urls/urls.go

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"sync"
1414
"time"
1515

16-
"github.com/h0tak88r/AutoAR/internal/scanner/gospider"
1716
jsfindertool "github.com/h0tak88r/AutoAR/internal/tools/jsfinder"
1817
urlfindertool "github.com/h0tak88r/AutoAR/internal/tools/urlfinder"
1918
"github.com/h0tak88r/AutoAR/internal/scanner/livehosts"
@@ -144,33 +143,7 @@ func CollectURLs(domain string, threads int, skipSubdomainEnum bool) (*Result, e
144143
_ = utils.WriteLines(allFile, allURLs)
145144
}
146145

147-
// 2b) GoSpider spidering against live hosts (up to 50 to stay within timeout)
148-
if fi, err2 := os.Stat(liveFile); err2 == nil && fi.Size() > 0 {
149-
spiderHosts, _ := readLines(liveFile)
150-
if len(spiderHosts) > 50 {
151-
spiderHosts = spiderHosts[:50]
152-
}
153-
logger.GetLogger().Infof("[INFO] GoSpider spidering %d live hosts for %s", len(spiderHosts), domain)
154-
spiderResult, spiderErr := gospider.Run(gospider.Options{
155-
Sites: spiderHosts,
156-
Depth: 2,
157-
Concurrent: 5,
158-
Threads: 5,
159-
Timeout: 10,
160-
Robots: true,
161-
JS: true,
162-
})
163-
if spiderErr != nil {
164-
logger.GetLogger().Infof("[WARN] GoSpider failed for %s: %v", domain, spiderErr)
165-
} else if len(spiderResult.URLs) > 0 {
166-
logger.GetLogger().Infof("[OK] GoSpider: Found %d URLs", len(spiderResult.URLs))
167-
existingURLs2, _ := readLines(allFile)
168-
merged := uniqueStrings(append(existingURLs2, spiderResult.URLs...))
169-
_ = utils.WriteLines(allFile, merged)
170-
}
171-
}
172-
173-
// 2c) Katana crawling — fast JS-aware crawler for deeper endpoint discovery
146+
// 2b) Katana crawling — fast JS-aware crawler for deeper endpoint discovery
174147
if fi, err2 := os.Stat(liveFile); err2 == nil && fi.Size() > 0 {
175148
kataURLs := runKatana(liveFile, domain)
176149
if len(kataURLs) > 0 {

0 commit comments

Comments
 (0)