This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'awesome_print' | |
require 'msgpack' | |
require 'public_suffix' | |
require 'singleton' | |
class DGAScore | |
include Singleton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
DOMAINS = %w(.doesntexist.com .dnsalias.com .dynalias.com) | |
DICT = %w(as un si speed no r in me da a o c try to n h call us why q | |
k old j g how ri i net t ko tu host on ad portal na order b ask l s d | |
po cat for m off own e f p le is) | |
DICT_LEN = DICT.length | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'awesome_print' | |
require 'msgpack' | |
class DGAScore | |
include Singleton | |
NS = (1..4) | |
NGRAMS_FILE = '/tmp/ngrams' |