Giter VIP home page Giter VIP logo

rsdga's Introduction

RSDGA

Really Simple Domain Generation Algorithm

Short and to the point Go library for generating domain names based on supplied parameters. A Domain Generation Algorithm is used to circumvent general domain blocklists by generating seemingly random domain names (In this case: using the current date along with an optional seed, hashed with MD5). A better description and overview can be found here.

Written for the Hands-on Writing Malware in Go talk at BSidesDC 2019.

For legal use only.

Pretty simple (One might say really simple):

import (
	"fmt"
	"time"

	"github.com/cs-5/rsdga"
)

func main() {
	t := time.Now()

	/* Use the current time to supply the year, month, and day. Use ".com" as the TLD */
	gen := rsdga.New(t.Year(), int(t.Month()), t.Day(), "com")

	/* Print out 5 domains */
	for i := 0; i < 5; i++ {
		fmt.Println(gen.Next())
	}
}

Output:

7cf3c19ef5871a8bdca3288bac26f615.com
813ed870de75f3605f7d4b2a0fe93608.com
6d06004feb188a4a463affbdbfff51d3.com
e285c151730d8a5ec59369d609df3e07.com
bec43b55c54522cfa12eaaef55c6f460.com

Make a new Generator

Without a seed: generator := rsdga.New(2019, 01, 01, "com")

With a seed: generator := rsdga.NewSeeded(2019, 01, 01, 1234, "com")

Get Domain

domain := generator.Next()

rsdga's People

Contributors

cs-5 avatar

Watchers

James Cloos avatar

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.