Giter Site home page Giter Site logo

dsieve's Introduction

dsieve Tweet

Filter and enrich a list of subdomains by level

dsieve

Take a single domain or read an input file and extract unique parent domains, enrich subdomains, filter subdomains by level, or find out which subdomains have the most number of sub-subdomains (or sub-sub-subdomains or sub-sub-sub...). Dsieve supports any format of URL, with or without protocol, port, path, parameters.

Installation

Binary

Binaries are available in the latest release.

Docker

docker run quay.io/trickest/dsieve

From source

go install github.com/trickest/dsieve@latest

Usage

  -f string
    	Filter domain level. Use python slice notation to select range.
    	Example input: foo.bar.baz.tld
    	  -f 3      bar.baz.tld
    	  -f 3:     bar.baz.tld, foo.bar.baz.tld
    	  -f 2:4    baz.tld, bar.baz.tld
    	  -f :3     tld, baz.tld
  -i string
    	Input url or domain
  -if string
    	Input file path, one url/domain per line.
  -o string
    	Output file path, optional
  -top int
    	Only consider top X subdomains of a certain level and return all their subdomains

Domains can be passed through stdin as well.

cat domains.txt | dsieve -f 2

Example

test.txt
a.foo.target.com
b.foo.target.com
c.foo.target.com
a.bar.target.com
b.bar.target.com
a.baz.target.com
# All levels by default
$ dsieve -if test.txt
a.foo.target.com
foo.target.com
target.com
b.foo.target.com
c.foo.target.com
a.bar.target.com
bar.target.com
b.bar.target.com
a.baz.target.com
baz.target.com

# Level 2, the main domain
$ dsieve -if test.txt -f 2
target.com

# Level 3, one level above the main domain
$ dsieve -if test.txt -f 3
foo.target.com
bar.target.com
baz.target.com

# Levels 2 and above, main domain and all its subdomains
$ dsieve -if test.txt -f 2:
a.foo.target.com
foo.target.com
target.com
b.foo.target.com
c.foo.target.com
a.bar.target.com
bar.target.com
b.bar.target.com
a.baz.target.com
baz.target.com

# The top one level 3 subdomain with the highest number of sub-subdomains
$ dsieve -if test.txt -f 3 -top 1
foo.target.com

# The top two level 3 subdomain with the highest number of sub-subdomains
$ dsieve -if test.txt -f 3 -top 2
foo.target.com
bar.target.com

Report Bugs / Feedback

We look forward to any feedback you want to share with us or if you're stuck with a problem you can contact us at [email protected]. You can also create an Issue or pull request on the Github repository.

Where does this fit in your methodology?

Dsieve is an integral part of many workflows in the Trickest store. Sign up on trickest.com to get access to these workflows or build your own from scratch!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.