lc / subjs Goto Github PK
View Code? Open in Web Editor NEWFetches javascript file from a list of URLS or subdomains.
License: MIT License
Fetches javascript file from a list of URLS or subdomains.
License: MIT License
It'd be great if a user has the ability to specify cookies for the host. Some js files are available only for authenticated users.
Hi,
I have been trying this out on Windows and I cant seem to make it work.
subjs.exe -h
will display the help content correctly
but when i try subjs.exe -i url.txt
it doesnt work. Nothing happens. This is what I see on my terminal.
Path\to\subjs>subjs.exe -i urls.txt
Path\to\subjs>
Go is installed. Version go1.16.2 windows/amd64
Is there anything else that needs to be done?
Hi,
If target.com has a js file specified as <script src="/script.js"> then subjs outputs that as:
https://target.com//script.js The extra forward slash is not recognized by the target.com's backend server and if we visit https://target.com//script.js it gives a 404.
I hope you'll have a look at this minor issue.
A nice addition would be to see if a source map is available at script.js.map
to be used with https://github.com/denandz/sourcemapper
Getting error when running subjs against URL's list
Using it like this -> subjs -i urlslist.txt
OUTPUT-
github.com/lc/subjs/runner/subjs.(*SubJS).fetch(0xc000048c50, 0xc0000680c0, 0xc000068120)
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:91 +0x1b1
github.com/lc/subjs/runner/subjs.(*SubJS).Run.func1(0xc000048c50, 0xc0000680c0, 0xc000068120, 0xc000018350)
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:55 +0x3f
created by github.com/lc/subjs/runner/subjs.(*SubJS).Run
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:54 +0x118
goroutine 7 [select]:
net/http.(*persistConn).roundTrip(0xc0bfd099e0, 0xc0bff25d40, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:2425 +0x770
net/http.(*Transport).roundTrip(0xc00009e280, 0xc0bff9eb00, 0xc0bff25d10, 0xc0bff6a43c, 0xc0bff6a430)
/usr/local/go/src/net/http/transport.go:535 +0x9af
net/http.(*Transport).RoundTrip(0xc00009e280, 0xc0bff9eb00, 0xc00009e280, 0xbfa500c65f0f2a03, 0xa10f5a35c)
/usr/local/go/src/net/http/roundtrip.go:17 +0x35
net/http.send(0xc0bff9ea00, 0x795aa0, 0xc00009e280, 0xbfa500c65f0f2a03, 0xa10f5a35c, 0x98bbc0, 0xc0bfab59c8, 0xbfa500c65f0f2a03, 0x1, 0x0)
/usr/local/go/src/net/http/client.go:250 +0x443
net/http.(*Client).send(0xc000012f30, 0xc0bff9ea00, 0xbfa500c65f0f2a03, 0xa10f5a35c, 0x98bbc0, 0xc0bfab59c8, 0x0, 0x1, 0x71f1c0)
/usr/local/go/src/net/http/client.go:174 +0xfa
net/http.(*Client).do(0xc000012f30, 0xc0bff9ea00, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:641 +0x3ce
net/http.(*Client).Do(...)
/usr/local/go/src/net/http/client.go:509
github.com/lc/subjs/runner/subjs.(*SubJS).fetch(0xc000048c50, 0xc0000680c0, 0xc000068120)
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:91 +0x1b1
github.com/lc/subjs/runner/subjs.(*SubJS).Run.func1(0xc000048c50, 0xc0000680c0, 0xc000068120, 0xc000018350)
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:55 +0x3f
created by github.com/lc/subjs/runner/subjs.(*SubJS).Run
/root/go/src/github.com/lc/subjs/runner/subjs/runner.go:54 +0x118
Todo: add concurrency whenever I'm not busy hacking. Shouldn't be difficult.
Hi,
I recently had a case where the js file was referenced as
I hope you'll have a look at this soon.
Best Regards,
Why is called subjs if it extracts URLs ?!
Great tool 👍👍.
However it would be great to implement waybackurls to look for forgotten js endpoints for a domain and pass to linkfinder.
i have a file with 10k unique domain names.
root@kali:~# go get -u github.com/lc/subjs
gocode/src/github.com/lc/subjs/subjs.go:62: u.Hostname undefined (type *url.URL has no field or method Hostname)
thank you
Not extracting all js urls
put /js/ regex also
The output contains duplicate javascript files (although that can be piped into sort -u, but it's an extra overhead). I'll try to create a PR fixing this when I get some time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.