Clank is a command-line tool written in Go that generates all possible combinations of phone numbers based on a pattern where some digits are unknown. It's particularly useful for generating number sequences when you remember only part of a phone number.
- Generate all possible combinations for partial phone numbers
- Support for any number of unknown digits using 'x' as placeholders
- Simple command-line interface
- Input validation
- Flexible input methods (with or without flags)
- Go 1.16 or higher
- Clone the repository:
git clone https://github.com/yourusername/clank.git
cd clank
- Build the project:
go build
This will create an executable named clank
(or clank.exe
on Windows).
You can run Clank in two ways (note: on Unix-like systems and Windows PowerShell, use ./clank
instead of just clank
):
- Using the
-n
flag for pattern:
./clank -n 918115605xxx
- Direct pattern input:
./clank 918115605xxx
- Move the executable to a directory in your PATH:
sudo mv clank /usr/local/bin/
OR create a symbolic link:
sudo ln -s $(pwd)/clank /usr/local/bin/clank
- Create a directory for your executables (if you haven't already):
mkdir C:\bin
- Move the clank.exe to this directory:
move clank.exe C:\bin
- Add to PATH:
- Right-click on 'This PC' or 'My Computer'
- Click 'Properties'
- Click 'Advanced system settings'
- Click 'Environment Variables'
- Under 'System Variables', find and select 'Path'
- Click 'Edit'
- Click 'New'
- Add 'C:\bin'
- Click 'OK' on all windows
After adding to PATH, restart your terminal/command prompt. You can then run clank
from any directory without using ./
.
-n
: Specify the phone number pattern-h
: Show help message and usage information
- Use numbers (0-9) for known digits
- Use 'x' or 'X' as placeholders for unknown digits
- The number of placeholders is unlimited (but be aware that more placeholders will generate more combinations)
- Show help message:
clank -h
- Generate combinations for a number with three unknown digits:
clank -n 918115605xxx
- Generate combinations for a number with two unknown digits:
clank 9181156xx99
clank/
├── main.go # Main source code
├── go.mod # Go module file
└── README.md # Documentation
- Written in Go
- Dependencies:
- Standard Go libraries:
flag
for command-line argument parsingfmt
for I/Ostrings
for string manipulationos
for system operationsnet/http
for Truecaller API requeststime
for rate limiting
- Standard Go libraries:
- Truecaller API integration for number lookup
- Large numbers of placeholders (e.g., more than 6-7) may generate a very large number of combinations
- Processing time increases exponentially with the number of placeholders
- Memory usage scales with the number of combinations generated
- Truecaller API rate limits may apply
- Truecaller lookup requires internet connectivity
Planned features for future releases:
- Progress bar for large combinations
- Output formatting options
- Country code validation
- Interactive mode
- Save results to file
- Integration with phone number lookup services
- Support for other search patterns
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for efficient phone number pattern matching
- Thanks to the Go community for the excellent standard library
atrey.dev
This tool is intended for legitimate use cases only. Please ensure you comply with all applicable laws and regulations regarding phone number lookup and privacy when using this tool.