Skip to content

Service to check availability of domains from a heavy domain list.

Notifications You must be signed in to change notification settings

antondc/rust-domain-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script to find domain combinations

Script to find free domains from a txt file.

Main dependencies

  • PostgreSQL
  • Tokio

Install and run

Add .env file with data for the database as well as the absolute project path:

DATABASE_NAME=[database_name]
DATABASE_USER=[database_user]
DATABASE_PASSWORD=[database_password]
PROJECT_PATH=[/absolute/project/path/domain_analyzer/]

Tip: use Posgresql super user to allow importing files with copy.

Create tables on DB

create table if not exists "domains" ("id" serial, "domain" text);
create index dd on domains(domain);

Execute

cargo run [OPTIONS]

Options:

  • setup: cargo run setup, stores the data in the database.create_combinations.
  • create_combinations: cargo run create_combinations, creates work combinations, expensive.

Prepare files

If you have a large source file —ICANN .txt file for .com domains is over 24GB—, split it by lines. This will result in several smaller text files. Save the resulting files into icann/ folder:

split -l 20000000 ./com.txt ./icann/

After saving the files, erform cargo run setup: the raw data off each file will be cleaned, saved into the database and removed from icann/ folder.

cargo run setup

When all files are loaded, it is recommended to ensure that ./src/source_files/domains_available.txt is empty.

rm ./src/source_files/domains_available.txt
touch ./src/source_files/domains_available.txt

Obtain available domain names

Provide list of desired words at:

Execute with or without options

cargo build
cargo run [OPTIONS]

Results for available domain names will be stored on ./src/source_files/domains_available.txt

About

Service to check availability of domains from a heavy domain list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages