Skip to content

Hx-Corp/urlshort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— URLShort β€” Advanced URL Shortener & Parameter Generator

Go Version License: MIT Platform

URLShort is a powerful and intelligent tool written in Go to split, shorten, and fuzz URLs for automation, testing, and security purposes.
Built with ❀️ by Neeraj Sah (Team HyperGod-X) to help you automate recon, parameter manipulation, and payload injection β€” quickly and effectively.


πŸ™‹β€β™‚οΈ Who Is It For?

  • πŸ§‘β€πŸ’» Web Developers β€” Analyze and test URL behavior.
  • 🐞 Bug Bounty Hunters β€” Generate fuzzable URL vectors fast.
  • πŸ›‘ Security Professionals β€” Inject payloads into endpoints for XSS/IDOR testing.
  • πŸ§ͺ QA Engineers β€” Automate URL manipulation for test coverage.
  • 🧰 Red Teamers & πŸ”· Blue Teamers / Recon Experts β€” Enhance endpoint discovery and testing.

🧠 Why Use It?

  • βœ… Generate recursive URL variations
  • βœ… Append payloads from CLI or file
  • βœ… Target both query strings and path segments
  • βœ… Deduplicate, output to file, and integrate in scripts
  • βœ… Ideal for recon, fuzzing, XSS testing, path traversal, etc.

🌟 Features

πŸ”Ή Feature βœ… Status
Split URLs by =, &, /, etc. βœ”οΈ
Recursive URL prefix generation βœ”οΈ
Append payloads (-a or -F) βœ”οΈ
Remove duplicates with -D βœ”οΈ
Input/output file support βœ”οΈ
Quiet mode for automation βœ”οΈ
Cross-platform support βœ”οΈ
Beautiful banner & color output βœ”οΈ

⚑️ Installation

βœ… Option 1: Global Install via Go (Recommended)

go install github.com/Hx-Corp/urlshort@latest

⚠️ Ensure your $GOPATH/bin is in your system PATH:

export PATH="$PATH:$(go env GOPATH)/bin"

Then use it globally:

urlshort -f urls.txt [options]

βš™οΈ Option 2: Manual Global Setup (via setup.go)

go build -o urlshort
go run setup.go
OS Installs To
Linux /usr/local/bin/hxscanner
macOS /usr/local/bin/hxscanner
Termux $HOME/.termux/bin/hxscanner
Windows Start Menu as hxscanner.exe

πŸ›‘οΈ Requires root/sudo privileges on Unix/macOS.


πŸš€ Usage

urlshort -f <input-file> [options]

πŸ”§ Command-line Flags

Flag Description
-f Input file with URLs (required)
-o Output file to save results
-x Delimiters for splitting (e.g., "=&") (default: =)
-p Enable splitting on path segments (/)
-a Append a string to each URL variation
-F File of strings to append (overrides -a)
-D Remove duplicate URLs
-Q Quiet mode (suppress output, show only final messages)
-h Display help message

πŸ§ͺ Example Use Case

urlshort -f urls.txt -o out.txt -x "=&" -p -F payloads.txt -D
  • Splits URLs by =, &, /
  • Appends payloads from payloads.txt
  • Deduplicates results
  • Writes final output to out.txt

πŸ“ Sample Files

urls.txt

https://example.com/page?user=admin&pass=1234
https://site.com/login.php?auth=token

payloads.txt

<script>alert(1)</script>
%27-- OR 1=1
../

πŸ“€ Sample Output

https://example.com/
https://example.com/page?
https://example.com/page?user=
https://example.com/page?user=admin&
https://example.com/page?user=admin&pass=
https://example.com/page?user=admin&pass=1234<script>alert(1)</script>
https://site.com/
https://site.com/login.php?
https://site.com/login.php?auth=
https://site.com/login.php?auth=token%27-- OR 1=1
...

🧠 How It Works (Internals)

  1. Input Reading

    • Loads all non-empty lines from the file specified by -f.
  2. Splitting Logic

    • Uses delimiters from -x to split URL query strings.
    • Adds / splitting if -p is enabled.
  3. Variation Generation

    • Recursively builds prefix variations of URLs ending at each delimiter.
  4. Appending

    • Combines each variation with payloads using -a or -F.
  5. Deduplication

    • Optional: -D removes repeated entries using a map.
  6. Output

    • Writes to file with -o or prints to console (unless -Q is used).

πŸ›  Development

Clone & Build

git clone https://github.com/nxneeraj/urlshort
cd urlshort
go build -o urlshort
./urlshort -h

πŸ“‚ Project Structure

urlshort/
β”œβ”€β”€ main.go       # Main logic & CLI interface
β”œβ”€β”€ setup.go          # Optional global installer script
β”œβ”€β”€ README.md         # Full documentation

πŸ“œ License

MIT License

Copyright (c) 2025 HyperGod-X

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.

🀝 Contributing

Contributions are warmly welcome! Here’s how you can help:

  • Report bugs or edge cases via GitHub Issues
  • Suggest new features or CLI improvements
  • Submit PRs to enhance logic, UX, or compatibility
  • Share use cases, templates, and examples

πŸ“¬ Contact


⭐ Support This Project

If this tool helped you:

  • ⭐ Star this repo
  • πŸš€ Share it with fellow hackers
  • 🧠 Mention it in your toolkit, blog, or course
  • πŸ” Fork and make it even better!

Build faster. Test smarter. Hack ethically.
With πŸ’₯ from Team HyperGod-X πŸ‘Ύ

Keep Moving Forward

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages