https://github.com/iustin24/rextract
CLI tool that extracts a regex pattern from a list of urls ( Rust )
https://github.com/iustin24/rextract
Last synced: 8 months ago
JSON representation
CLI tool that extracts a regex pattern from a list of urls ( Rust )
- Host: GitHub
- URL: https://github.com/iustin24/rextract
- Owner: iustin24
- Created: 2022-08-30T16:08:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-14T14:52:08.000Z (about 3 years ago)
- Last Synced: 2024-11-06T05:40:50.322Z (about 1 year ago)
- Language: Rust
- Size: 42 KB
- Stars: 59
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- osint_stuff_tool_collection - REXTRACT
README
# rextract
CLI tool that extracts a regex pattern from a list of urls.
The tool is written in Rust and supports PCRE.
## Installation
### Step 1:
Visit https://rustup.rs/ and follow the instructions to get started with rust and cargo.
### Step 2:
```
> cargo install --git https://github.com/iustin24/rextract
```
## Usage
The tool takes a list of urls from stdin and extracts the regex supplied as an argument.
### Extract HTML Title ( using lookarounds ):
```
> cat urls.txt
https://www.google.com/
https://youst.in/
> cat urls.txt | rextract '(?im)(?<=).*(?=)'
Google
Youstin
```
### Extract UUIDs
```
> cat urls.txt
https://www.uuidtools.com/docs
> cat urls.txt | rextract '[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}'
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
```