{"id":14638115,"url":"https://github.com/richardschwabe/JSFinder2","last_synced_at":"2025-09-07T06:32:27.270Z","repository":{"id":195904154,"uuid":"693664374","full_name":"richardschwabe/JSFinder2","owner":"richardschwabe","description":"Find subdomains and urls in Javascript files","archived":false,"fork":false,"pushed_at":"2023-09-20T15:59:15.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T23:04:37.775Z","etag":null,"topics":["bug-bounty","bug-bounty-hunting","bug-bounty-tools","information-security","javascript-security","js","osint","penetration-testing","penetration-testing-tools","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richardschwabe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-19T13:22:28.000Z","updated_at":"2024-08-05T09:54:47.000Z","dependencies_parsed_at":"2023-09-20T04:12:13.564Z","dependency_job_id":"a095b25c-c3e1-41fd-8bd8-1a89a672fa1c","html_url":"https://github.com/richardschwabe/JSFinder2","commit_stats":null,"previous_names":["richardschwabe/jsfinder2"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschwabe%2FJSFinder2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschwabe%2FJSFinder2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschwabe%2FJSFinder2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardschwabe%2FJSFinder2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardschwabe","download_url":"https://codeload.github.com/richardschwabe/JSFinder2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232183063,"owners_count":18484727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug-bounty","bug-bounty-hunting","bug-bounty-tools","information-security","javascript-security","js","osint","penetration-testing","penetration-testing-tools","python3"],"created_at":"2024-09-10T02:01:43.294Z","updated_at":"2025-01-02T10:31:31.823Z","avatar_url":"https://github.com/richardschwabe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eJSFinder2\u003c/h1\u003e\n    \u003cp\u003eFind subdomains and urls in js files\u003c/p\u003e\n\n![GitLab last commit](https://img.shields.io/gitlab/last-commit/richardschwabe/JSFinder2)\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n\n\u003c/div\u003e\n\n\u003ch1\u003eTable of Contents\u003c/h1\u003e\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Deep check of url](#deep-check-of-url)\n  - [Check urls from file](#check-urls-from-file)\n  - [Custom User-Agent and Cookies](#custom-user-agent-and-cookies)\n  - [Verbose output](#verbose-output)\n  - [Results location](#results-location)\n- [Todo](#todo)\n- [License](#license)\n- [Contributing](#contributing)\n\n# Introduction\n\nRewrite \u0026 loosely based on [JSFinder](https://github.com/Threezh1/JSFinder/blob/master/JSFinder.py).\n\nThis allows bug bounty hunters to find references, that you might not otherwise find in SSL cert scraping or similar.\n\nAllows to recursively check for subdomains \u0026 urls in JS files. i.e.\n\nOpen `a.js` finds references to `hub.foo.bar`, opens `hub.foo.bar` and finds `b.js`, checks `b.js` and finds `zoo.foo.bar`, goes to `zoo.foo.bar` etc...\n\nShould be used together with other tools in automation. Though be aware, there might be a lot of false positives URLs. The tool uses regex, which is orginally from [LinkFinder](https://github.com/GerbenJavado/LinkFinder/blob/095bb6218faca9e00169357f663feba0a84202a5/linkfinder.py#L29). (Though [issue 59](https://github.com/GerbenJavado/LinkFinder/issues/59) has been applied.)\n\nFurthermore, a couple of domains are blacklisted, such as:\n\n```python\n    \"twitter.com\",\n    \"youtube.com\",\n    \"pinterest.com\",\n    \"facebook.com\",\n    \"w3.org\",\n    \"vimeo.com\",\n    \"redditstatic.com\",\n    \"reddit.com\",\n    \"schema.org\",\n    \"unpkg.com\",\n    \"gitter.im\",\n    \"cookielaw.org\",\n```\n\nFurthermore if any of the following words appear in the url, they will not be saved:\n\n```python\n\"jquery\",\n\"node_modules\"\n```\n\nYou won't find any of these in the urls.\n\n# Installation\n\nPreferred via pipx\n\n```\npipx install JSFinder2\n```\n\nor a simple pip command\n\n```\npip install JSFinder2\n```\n\nThe pip page is: https://pypi.org/project/JSFinder2/\n\n# Usage\n\n```\npython -m jsfinder2 -h\nusage: jsfinder2 [-h] [-v] [--debug] [--deep] [-os [OUTPUT_FILE_SUBDOMAINS]] [-ou [OUTPUT_FILE_URLS]] [-c [COOKIE]] [-ua [USER_AGENT]] [-u [REMOTE_JS_FILE_URL] | -f [LOCAL_URL_LIST_FILE]]\n\nExamples:\n            jsfinder2 -u https://www.example.com/js/main.js\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --verbose         increase output verbosity (\u003e INFO)\n  --debug               sets output to very verbose\n  --deep                sets to crawl very deep\n  -os [OUTPUT_FILE_SUBDOMAINS], --output-sub [OUTPUT_FILE_SUBDOMAINS]\n                        Specify the output file otherwise subdomains.txt is used in ~/jsfinder2\n  -ou [OUTPUT_FILE_URLS], --output-url [OUTPUT_FILE_URLS]\n                        Specify the output file otherwise urls.txt is used in ~/jsfinder2\n  -c [COOKIE], --cookie [COOKIE]\n                        Optional Cookie\n  -ua [USER_AGENT], --user-agent [USER_AGENT]\n                        Optional custom User-Agent\n  -u [REMOTE_JS_FILE_URL], --url [REMOTE_JS_FILE_URL]\n                        Specify the url to a JS file\n  -f [LOCAL_URL_LIST_FILE], --file [LOCAL_URL_LIST_FILE]\n                        Specify a local file with URLs\n\n```\n\n## Deep check of url\n\nFollows subdomains and looks for script tags\n\n```\njsfinder2 --deep -u https://www.tesla.com/\n```\n\n## Check urls from file\n\n```\njsfinder2 -f myurls.txt\n```\n\n## Custom User-Agent and Cookies\n\nTo specify the user agent and/or cookie use\n`-ua` for the User Agent and `-c` for the Cookie.\n\n## Verbose output\n\nYou can use `--debug` to show more developer infos and `-v` for more console output (this might be a lot, as all urls and subdomains are shown!)\n\n## Results location\n\nBy default all findings are stored in the home directory of the user in the domains folder i.e.:\n\n```bash\n# Linux\ncat ~/jsfinder2/tesla.com/urls.txt\ncat ~/jsfinder2/tesla.com/subdomains.txt\n\n# Windows\ntype C:\\Users\\\u003cUSERNAME\u003e\\jsfinder2\\tesla.com\\urls.txt\ntype C:\\Users\\\u003cUSERNAME\u003e\\jsfinder2\\tesla.com\\subdomains.txt\n```\n\nYou can adjust the file location via `-os` for subdomains and `-ou` for urls.\n\n# Todo\n\n- [x] create a subfolder for each domain\n- [x] add option to load urls from file\n- [ ] support flag that url is a js file\n- [ ] crawl subdomains for more js files\n- [ ] threading ?\n- [ ] json output file ?\n\n# License\n\n[MIT](LICENSE)\n\n# Contributing\n\nFeel free to open an issue with any feedback, a PR or similar.\n\nIt would also help to star the project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschwabe%2FJSFinder2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardschwabe%2FJSFinder2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardschwabe%2FJSFinder2/lists"}