jsrs

Crates.iojsrs
lib.rsjsrs
version0.1.0
created_at2025-07-27 20:40:30.957576+00
updated_at2025-07-27 20:40:30.957576+00
descriptionJSRS is a fast and flexible command-line tool for scanning JavaScript files
homepagehttps://github.com/emirakkutlu/jsrs
repositoryhttps://github.com/emirakkutlu/jsrs
max_upload_size
id1770410
size65,141
(emirakkutlu)

documentation

https://github.com/emirakkutlu/jsrs

README

JSRS

JSRS is a fast and flexible command-line tool for scanning JavaScript files.

Features

  • Path Extraction: Extract file paths from JavaScript files
  • Version Brute-forcing: Test different version numbers for JavaScript files
  • URL Comparison: Compare two JavaScript URLs for differences
  • HTML Reports: Generate detailed HTML reports

Installation

From Source

git clone https://github.com/emirakkutlu/jsrs
cd jsrs
cargo build --release

From crates.io

cargo install jsrs

Usage

Recursive Mode

Extract and test paths found in JavaScript files:

jsrs --url "https://example.com/script.js" --recursive --output report.html

Version Force Mode

Brute-force version numbers:

JavaScript files served publicly might have their versions as a parameter. Different JavaScript file versions might expose different information that's still in use. JSRS can be used to brute force the versions of those JavaScript files easily.

An example JavaScript file might look like, https://example.com/script1.js?ver=4.1.2 where in this example major is 4 minor is 1 and patch is 2. Since the version parameter might differ, the parameter must be added after --version-force.

jsrs --url "https://example.com/script.js?ver=4.1.2" --version-force ver --major "1,5" --minor "0,1" --patch "0,2" --output report.html

You can define the range you want to brute force after major, minor and patch parameters. "1,5" will brute force the relevant version path from 1 to 5.

Above command will brute force the versions of the JavaScript file as {1.5}.{0.1}.{0,2}

Compare Mode

Compare two URLs:

jsrs --url "https://example.com/script1.js" --url2 "https://example.com/script2.js" --compare --output diff.html
jsrs --url "https://example.com/script1.js?ver=1.3.1" --url2 "https://example.com/script1.js?ver=1.2.5" --compare --output diff.html

Arguments

  • --url: Target URL (required)
  • --recursive: Enable recursive path extraction mode
  • --compare: Enable URL comparison mode
  • --version-force: Enable version brute-forcing mode
  • --url2: Second URL for compare mode
  • --output: HTML report output file
  • --cookie: Custom cookies
  • --major, --minor, --patch: Version ranges for brute-forcing

License

MIT License

Copyright (c) 2024 JSRS Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Commit count: 0

cargo fmt