Example Usage
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"github.com/003random/getJS/extractor"
)
func main() {
baseURL, err := url.Parse("https://google.com")
if (err != nil) {
log.Fatalf("Error parsing base URL: %v", err)
}
resp, err := extractor.FetchResponse(baseURL.String(), "GET", http.Header{})
if (err != nil) {
log.Fatalf("Error fetching response: %v", err)
}
defer resp.Body.Close()
// Custom extraction points (optional).
extractionPoints := map[string][]string{
"script": {"src", "data-src"},
"a": {"href"},
}
sources, err := extractor.ExtractSources(resp.Body, extractionPoints)
if (err != nil) {
log.Fatalf("Error extracting sources: %v", err)
}
// Filtering and extending extracted sources.
filtered, err := extractor.Filter(sources, extractor.WithComplete(baseURL), extractor.WithResolve())
if (err != nil) {
log.Fatalf("Error filtering sources: %v", err)
}
for source := range filtered {
fmt.Println(source.String())
}
}
See also
365
Free
BlueTeam, RedTeam, Bug bounty, CTI, OSINT, Threat Hunting, Network and Web Recon, Discovery, Enumera…
Flipper Zero
Open Source
Portable multi-tool for hardware hacking. Supports Sub-GHz radio, 125kHz RFID, NFC, Infrared, iButto…
darkdump
Open Source
Open Source Intelligence Interface for Deep Web Scraping…
Aquatone
Open Source
Tool for visual inspection of websites across large numbers of hosts. Takes screenshots of web pages…
Shodan
Freemium
Search engine for internet-connected devices. Finds exposed servers, webcams, ICS/SCADA systems, dat…
httpx
Open Source
httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryab…