A rust-based version of the popular dnsgen python utility

Related tags

Utilities ripgen
Overview

ripgen

A rust-based version of the popular dnsgen python utility.

ripgen is split into two main parts:

  • ripgen: A CLI utility that calls into ripgen_lib and uses dnsgen's transforms.
  • ripgen_lib: A library that allows you to create high performance permutations of domain names.

How to Install!

Installation of ripgen is very simple - follow the steps below.

Step 1 - rustup.rs

Visit https://rustup.rs/ and follow the instructions to get started with rust and cargo.

Step 2 - cargo install

Run cargo install ripgen

How to Use - ripgen

ripgen optionally takes a domain file, a wordlist file, and a minimum word length argument.

If no domain file is listed, domains are expected through stdin making it easy to pipe into from other tools.

e.g.

$ echo "www1.google.com" | ripgen

One deviation from dnsgen's behavior is that if no wordlist is specified then no wordlist items are included automatically. To compare ripgen and dnsgen appropriately you should make sure to specify a wordlist.

How to use - ripgen_lib

ripgen_lib exposes a RipGenManager struct that takes in three components:

  • an iterator for domain names
  • an iterator for wordlist entries
  • a function that converts &&str into bool for the purposes of filtering wordlist entries

After creating a RipGenManager, transforms can be added on with transform and chain_transform. These transforms require a function definition (closure or otherwise) be passed in that can take the &DomainComponent and WordListIterator types and return an Iterator .

Look at the non-default dnsgen transform implementations for examples on how these are implemented typically.

Comments
  • Missing Combinations

    Missing Combinations

    Hi @d0nutptr Here I create a new issue regarding missing combinations, missed in ripgen

    domain one-two.three.four-five.example.com

    word apple

    Combinations missed by ripgen

    apple-two.three.four-five.example.com
    five-two.three.four-five.example.com
    four-five-two.three.four-five.example.com
    four-two.three.four-five.example.com
    one-apple.three.four-five.example.com
    one-five.three.four-five.example.com
    one-four-five.three.four-five.example.com
    one-four.three.four-five.example.com
    one-one.three.four-five.example.com
    one-three.three.four-five.example.com
    three-two.three.four-five.example.com
    two-two.three.four-five.example.com
    

    Can you please check.

    Thank you.

    bug 
    opened by jaikishantulswani 6
  • Generating Out of Scope

    Generating Out of Scope

    Hi @d0nutptr thank you for this tool, here I am not able to figure out that why it is generating permutations which is out of scope like it is generating permutations on domain which is not supplied, Interesting.... for example:

    wordlist exampe

    domainlist exampecenter.exampe.com

    so as per the above, it should have to create permutations for domain exampe.com but it is also genrating permutations for domain exampecenter.com which is not even in the domain list

    ripgen -d domainlist -w wordlist

    exampecentercenter.exampecenter.com exampe.exampe.com exampecenter.exampe.exampe.com exampe.exampecenter.exampe.com exampecenter.exampecenter.exampe.com exampecenter.exampecenter.exampe.com exampeexampecenter.exampe.com exampecenterexampe.exampe.com exampe-exampecenter.exampe.com exampecenter-exampe.exampe.com exampecenterexampecenter.exampe.com exampecenterexampecenter.exampe.com exampecenter-exampecenter.exampe.com exampecenter-exampecenter.exampe.com

    Can you please check this.

    Thank you.

    bug 
    opened by jaikishantulswani 4
  • Bug fix with format!()

    Bug fix with format!()

    Fix the following build errors:

    error: there is no argument named `replaced_subdomain`
      --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen_lib-0.1.4/src/dnsgen/swap.rs:25:30
       |
    25 |                     format!("{replaced_subdomain}.{root_string}")
       |                              ^^^^^^^^^^^^^^^^^^^^
    
    error: there is no argument named `root_string`
      --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen_lib-0.1.4/src/dnsgen/swap.rs:25:51
       |
    25 |                     format!("{replaced_subdomain}.{root_string}")
    
    opened by yassineaboukir 3
  • DomainMissingRoot error on some valid domains.

    DomainMissingRoot error on some valid domains.

    kenjoe41@testbox:~/test$ echo "googleapis.com" | ripgen -w words.txt
    thread 'main' panicked at 'Failed to create Ripgen iterator: DomainMissingRoot', /home/kenjoe41/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen-0.1.3/src/main.rs:25:7
    stack backtrace:
       0: rust_begin_unwind
                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
       1: core::panicking::panic_fmt
                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
       2: core::result::unwrap_failed
                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/result.rs:1613:5
       3: ripgen::main
    

    Changed ^^ domain to googleapiz.com and it worked just fine. So it's not like it is resolving it or contains any special chars. Any reason this is happening?

    bug 
    opened by kenjoe41 3
  • Installation error

    Installation error

    error: there is no argument named `replaced_subdomain`
      --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen_lib-0.1.4/src/dnsgen/swap.rs:25:30
       |
    25 |                     format!("{replaced_subdomain}.{root_string}")
       |                              ^^^^^^^^^^^^^^^^^^^^
    
    error: there is no argument named `root_string`
      --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen_lib-0.1.4/src/dnsgen/swap.rs:25:51
       |
    25 |                     format!("{replaced_subdomain}.{root_string}")
       |                                                   ^^^^^^^^^^^^^
    
    error: could not compile `ripgen_lib` due to 2 previous errors
    warning: build failed, waiting for other jobs to finish...
    
    opened by nithissh200 2
  • Docs: Update readme instructions for building ripgen on alpine

    Docs: Update readme instructions for building ripgen on alpine

    Ran into troubleshooting problems installing ripgen on alpine (commonly used in docker builds). Realized it requires build-base package. Pull request reflects this requirement in docs for clarity and guiding future user installations.

    opened by CodyCline 1
  • Update Cargo.toml

    Update Cargo.toml

    Mentioning "0" would mean cargo would pick the latest dependency which is versioned "0.*" which would include versions incompatible with the one that this crate was written with and may break your create.

    opened by Dylan-DPC 1
  • error parsing domains with certain special characters,  ('_' . '-'), underscore and minus sign

    error parsing domains with certain special characters, ('_' . '-'), underscore and minus sign

    ripgen-2

    ERROR : thread 'main' panicked at 'Failed to create Ripgen iterator: ErrorParsingDomain("463103032_uk.pal.dev.site.yahoo.com")', /home/rocky/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen-0.1.2/src/main.rs:25:7 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

    opened by r0ckYr 1
  • I got these errors. Please help

    I got these errors. Please help

    How to install https://github.com/resyncgg/ripgen in Parrotsec OS.

    I got these errors.

    root@cyberghazi-vmwarevirtualplatform:/# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh info: downloading installer warning: it looks like you have an existing installation of Rust at: warning: /usr/bin warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first. warning: Otherwise you may have confusion unless you are careful with your PATH warning: If you are sure that you want both rustup and your already installed Rust warning: then please reply y' oryes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes warning: or pass `-y' to ignore all ignorable checks. error: cannot install while Rust is installed

    Continue? (y/N) N

    error: cannot install while Rust is installed root@cyberghazi-vmwarevirtualplatform:/# apt install cargo Reading package lists... Done Building dependency tree... Done Reading state information... Done cargo is already the newest version (0.47.0-3+b1). cargo set to manually installed. The following packages were automatically installed and are no longer required: figlet insserv libio-pty-perl libipc-run-perl lshw-gtk moreutils startpar sysv-rc Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 529 not upgraded. root@cyberghazi-vmwarevirtualplatform:/# ls bin etc initrd.img lib32 media proc sbin tmp vmlinuz boot exploitdb initrd.img.old lib64 mnt root srv usr vmlinuz.old dev home lib libx32 opt run sys var root@cyberghazi-vmwarevirtualplatform:/# git clone https://github.com/resyncgg/ripgen.git Cloning into 'ripgen'... remote: Enumerating objects: 115, done. remote: Counting objects: 100% (115/115), done. remote: Compressing objects: 100% (79/79), done. remote: Total 115 (delta 51), reused 89 (delta 34), pack-reused 0 Receiving objects: 100% (115/115), 21.61 KiB | 553.00 KiB/s, done. Resolving deltas: 100% (51/51), done. root@cyberghazi-vmwarevirtualplatform:/# ls bin etc initrd.img lib32 media proc run sys var boot exploitdb initrd.img.old lib64 mnt ripgen sbin tmp vmlinuz dev home lib libx32 opt root srv usr vmlinuz.old root@cyberghazi-vmwarevirtualplatform:/# cd ripgen root@cyberghazi-vmwarevirtualplatform:/ripgen# ls Cargo.toml README.md ripgen ripgen_lib root@cyberghazi-vmwarevirtualplatform:/ripgen# cargo install ripgen Updating crates.io index error: failed to download ripgen v0.1.3

    Caused by: unable to get packages from source

    Caused by: failed to parse manifest at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ripgen-0.1.3/Cargo.toml

    Caused by: failed to parse the edition key

    Caused by: this version of Cargo is older than the 2021 edition, and only supports 2015 and 2018 editions. root@cyberghazi-vmwarevirtualplatform:/ripgen#

    opened by CyberGhazi786 0
  • Request for -f option like dnsgen

    Request for -f option like dnsgen

    DNSgen has an option (-f / --fast) to generate lower amount of domains with most probable words only. This is very useful when passing large number of subdomains to the tool as the output can be very large without this option.

    opened by proabiral 0
  • add option to disable custom words on RipgenManager

    add option to disable custom words on RipgenManager

    It would be useful to have an option to disable chaining words with: crate::words::extract_words(domain_components.iter(), word_filter)

    Perhaps adding a parameter extract_custom: bool to RipgenManager::new().

    opened by iustin24 0
  • Swap words unexpected behaviour

    Swap words unexpected behaviour

    Right now swap_words_transform only swaps words if domain_components contains words from the wordlist.

    There should probably be two different transforms:

    Input words:

    staging
    dev
    

    Input subdomains:

    promo.staging.google.com
    

    swap_all_words():

    dev.staging.google.com
    staging.staging.google.com
    promo.dev.google.com
    promo.staging.google.com
    

    swap_words():

    promo.dev.google.com
    
    opened by iustin24 0
Owner
resync
resync
Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Sarat Chandra 6 May 6, 2022
Original Version Management System based on Git

nss (noshishi) Original Version Management System based on Git. Learning git and rust for good developer. Usage Install cargo install nssi how to nss

nopeNoshishi 4 Feb 13, 2023
Provides utility functions to perform a graceful shutdown on an tokio-rs based service

tokio-graceful-shutdown IMPORTANT: This crate is in an early stage and not ready for production. This crate provides utility functions to perform a gr

null 61 Jan 8, 2023
A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator

tmux-thumbs A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints. Usage Press ( prefix + Space

Ferran Basora 598 Jan 2, 2023
Rust version of tomnomnom/waybackurls

wayback-rs Rust version of tomnomnom/waybackurls Command line interface for fetching url from Wayback Machine, CommonCrawl, VirusTotal.

null 3 Oct 22, 2021
Convert Hygea calendar to an iCal file to easily import it to Google Calendar (Rust version)

Hygea to iCal Goal Hygea provides a calendar via PDF and an application called Recycle. I just wanted to use an iCal file to import it in my calendar.

Guillaume Quittet 2 Oct 28, 2021
A simplified but faster version of Routerify

Routerify lite Routerify-lite is a simplified but faster version of Routerify. It only provides below functions: path matching error handling Why not

jinhua luo 7 Dec 30, 2022
🦸‍♂️ Recast migrates your old extensions to AndroidX, making them compatible with the latest version of Kodular.

Recast Recast helps make your old extensions compatible with Kodular Creator version 1.5.0 or above. Prerequisites To use Recast, you need to have Jav

Shreyash Saitwal 13 Dec 28, 2022
Incremental, multi-version remote backup tool for block devices.

bsync Incremental, multi-version remote backup tool for block devices. The on-disk backup format is a SQLite database and I've been dogfooding this on

Heyang Zhou 7 Aug 21, 2022
Wrapped ICP (WICP) - A composable and interoperable wrapped version of ICP.

Wrapped ICP - WICP Wrapped ICP (WICP) is a wrapped version of the IC's native token, ICP. Each WICP will be backed 1:1 with ICP, meaning that 1 WICP w

Psychedelic 16 Sep 23, 2022
Ferris has to escape the creepers using a modified version of Dijkstra called A*

Ferris has to escape the creepers using a modified version of Dijkstra called A*

Security Union 13 Oct 30, 2022
A future version of Pokétwo

poketwo-next Pokétwo brings the Pokémon experience to Discord. Catch randomly-spawning pokémon in your servers, trade them to expand your collection,

Pokétwo 13 Aug 20, 2022
Rc version `tokio-rs/bytes`

RcBytes The aim for this crate is to implement a Rc version bytes, which means that the structs in this crate does not implement the Sync and Send. Th

Al Liu 2 Aug 1, 2022
Github mirror of codeberg repo. Monitor live bandwidth usage/ network speed on PC. Native version also available for Android, separately.

Netspeed Monitor Netspeed is a cross-platform desktop application that shows the live upload speed, download speed and day's usage as an overlay. Feat

Vishnu N K 16 May 3, 2023
A lending version of the `Stream` trait

lending-stream A lending version of Stream API Docs | Releases | Contributing Installation $ cargo add lending-stream Safety This crate uses #![deny(u

Yosh 5 Aug 14, 2023
ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust.

gigagei ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust. Installing Use latest pre-built binary from releases Buildi

veleth 10 Jun 17, 2022
A fast, multi-threaded line counting utility written in Rust.

xloc A fast, multi-threaded line counting utility written in Rust. What is xloc A drop in replacement for bash's wc -l. Your project has x lines of co

null 1 Nov 15, 2021
A cli utility written in Rust that allows fetching all the labels of a project, save those as a YAML file

A cli utility written in Rust that allows fetching all the labels of a project, save those as a YAML file that you can easily edit or save as backup and apply a saved preset to new repositories.

Chevdor 4 May 5, 2022
Tons of extension utility functions for Rust

LazyExt Tons of extension utility functions for Rust. English | 简体中文 Status Name Status Crate Documents Introduction lazyext-slice Alpha Thousands of

Al Liu 2 Dec 5, 2022