{"id":13826682,"url":"https://github.com/Threezh1/JSFinder","last_synced_at":"2025-07-09T01:31:02.743Z","repository":{"id":38361657,"uuid":"191165284","full_name":"Threezh1/JSFinder","owner":"Threezh1","description":"JSFinder is a tool for quickly extracting URLs and subdomains from JS files on a website.","archived":false,"fork":false,"pushed_at":"2021-11-24T07:11:04.000Z","size":13,"stargazers_count":2629,"open_issues_count":17,"forks_count":404,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-05T03:51:39.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Threezh1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-10T12:37:48.000Z","updated_at":"2024-11-04T03:05:33.000Z","dependencies_parsed_at":"2022-07-12T17:27:45.810Z","dependency_job_id":null,"html_url":"https://github.com/Threezh1/JSFinder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threezh1%2FJSFinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threezh1%2FJSFinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threezh1%2FJSFinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threezh1%2FJSFinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Threezh1","download_url":"https://codeload.github.com/Threezh1/JSFinder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"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":[],"created_at":"2024-08-04T09:01:42.505Z","updated_at":"2024-11-20T05:30:59.002Z","avatar_url":"https://github.com/Threezh1.png","language":"Python","readme":"# JSFinder\n\nJSFinder is a tool for quickly extracting URLs and subdomains from JS files on a website.\n\nJSFinder是一款用作快速在网站的js文件中提取URL，子域名的工具。\n\n提取URL的正则部分使用的是[LinkFinder](https://github.com/GerbenJavado/LinkFinder) \n\nJSFinder获取URL和子域名的方式：\n\n![image](https://i.loli.net/2020/05/24/R2fImgNZHPkvhEj.png)\n\nBlog: https://threezh1.com/\n\n## 更新说明\n\n- 增加油猴脚本用于在浏览器上访问页面时获取域名与接口，具体可见：https://github.com/Threezh1/Deconstruct/tree/main/DevTools_JSFinder\n\n## 用法\n\n- **简单爬取**\n\n```\npython JSFinder.py -u http://www.mi.com\n```\n\n这个命令会爬取 http://www.mi.com 这单个页面的所有的js链接，并在其中发现url和子域名\n\n返回示例：\n\n```\nurl:http://www.mi.com                                         \nFind 50 URL:                                                  \nhttp://api-order.test.mi.com                                  \nhttp://api.order.mi.com                                       \nhttp://userid.xiaomi.com/userId                               \nhttp://order.mi.com/site/login?redirectUrl=                                                   \n...已省略                            \n                                                              \nFind 26 Subdomain:                                            \napi-order.test.mi.com                                         \napi.order.mi.com                                              \nuserid.xiaomi.com                                             \norder.mi.com                                                                                              \n...已省略\n\n```\n\n- **深度爬取**\n\n```\npython JSFinder.py -u http://www.mi.com -d\n```\n\n深入一层页面爬取JS，时间会消耗的更长。\n\n建议使用-ou 和 -os来指定保存URL和子域名的文件名。 例如：\n\n```\npython JSFinder.py -u http://www.mi.com -d -ou mi_url.txt -os mi_subdomain.txt\n```\n\n- **批量指定URL/指定JS**\n\n指定URL：\n\n```\npython JSFinder.py -f text.txt\n```\n\n指定JS：\n\n```\npython JSFinder.py -f text.txt -j\n```\n\n可以用brupsuite爬取网站后提取出URL或者JS链接，保存到txt文件中，一行一个。\n\n指定URL或JS就不需要加深度爬取，单个页面即可。\n\n- **其他**\n\n-c 指定cookie来爬取页面 例：\n\n```\npython JSFinder.py -u http://www.mi.com -c \"session=xxx\"\n```\n\n-ou 指定文件名保存URL链接 例：\n\n```\npython JSFinder.py -u http://www.mi.com -ou mi_url.txt\n```\n\n-os 指定文件名保存子域名 例：\n\n```\npython JSFinder.py -u http://www.mi.com -os mi_subdomain.txt\n```\n\n- **注意**\n\nurl 不用加引号\n\nurl 需要http:// 或 https://\n\n指定JS文件爬取时，返回的URL为相对URL\n\n指定URL文件爬取时，返回的相对URL都会以指定的第一个链接的域名作为其域名来转化为绝对URL。\n\n- **截图**\n\n实测简单爬取：\n\n```\npython3 JSFinder.py -u https://www.jd.com/\n```\n\nURL:\n\n![02.jpg](https://i.loli.net/2020/05/24/aROFI5fC3UyK8EP.jpg)\n\n![03.jpg](https://i.loli.net/2020/05/24/rXC4Bba7oMw8AHW.jpg)\n\nSubdomain:\n\n![01.jpg](https://i.loli.net/2020/05/24/69WvDmy7al4hQfd.jpg)\n\n实测深度爬取：\n\n```\npython3 JSFinder.py -u https://www.jd.com/ -d -ou jd_url.txt -os jd_domain.txt\n```\n\n![05.jpg](https://i.loli.net/2020/05/24/dhxTQnaW4ef9Vzu.jpg)\n\n![06.jpg](https://i.loli.net/2020/05/24/NAX9PnLaW6melVk.jpg)\n\n实际测试：\n```\nhttp://www.oppo.com\nURL:4426 个\n子域名：24 个\n\nhttp://www.mi.com\nURL:1043 个\n子域名：111 个\n\nhttp://www.jd.com\nURL:3627 个\n子域名：306 个\n```\n","funding_links":[],"categories":["Python","Python (1887)","扫描器、资产收集、子域名","信息搜集"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThreezh1%2FJSFinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThreezh1%2FJSFinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThreezh1%2FJSFinder/lists"}