Skip to content

hitman is a command-line tool written in Rust that extracts IPv4, IPv6 addresses, and fully qualified domain names (FQDNs) from a text file.

License

Notifications You must be signed in to change notification settings

gbiagomba/Hitman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alt tag

Hitman

GitHub Tip Me via PayPal

hitman is a command-line tool written in Rust that extracts IPv4, IPv6 addresses, and fully qualified domain names (FQDNs) from a text file. It uses the clap crate for command-line argument parsing and the ripgrep crate for efficient regular expression searching.

Features

  • Extract IPv4 addresses
  • Extract IPv6 addresses
  • Extract FQDNs
  • Input via file or standard input
  • Output to screen or file
  • Quiet mode for suppressing stdout output when writing to a file

Installation

  1. Ensure you have Rust and Cargo installed. If not, install them from here.
  2. Clone the repository:
    git clone https://github.com/yourusername/hitman.git
    cd hitman
  3. Build the project:
    cargo build --release

Usage

Basic Usage

You can use hitman by providing a text file as input or by piping text via standard input.

From a File

cargo run -- --file sample.txt

From Standard Input

cat sample.txt | cargo run

Output to a File

To save the extracted results to a file:

cargo run -- --file sample.txt --out output.txt

Quiet Mode

To suppress output to the screen when saving results to a file, use the -q flag:

cargo run -- --file sample.txt --out output.txt -q

Command-Line Options

  • -f, --file <FILE>: Specify the input file to read.
  • -o, --out <FILE>: Specify the output file to write results.
  • -q, --quiet: Quiet mode, no output to stdout.

Example

# Extract from a file and display on screen
cargo run -- --file sample.txt

# Extract from a file and save to output.txt
cargo run -- --file sample.txt --out output.txt

# Extract from standard input and display on screen
cat sample.txt | cargo run

# Extract from standard input and save to output.txt quietly
cat sample.txt | cargo run -- --out output.txt -q

License

This project is licensed under the GPL-3.0 license. See the LICENSE file for details.

About

hitman is a command-line tool written in Rust that extracts IPv4, IPv6 addresses, and fully qualified domain names (FQDNs) from a text file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published