Skip to content

botlabsDev/bedep_dga-extended

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytest

bedep_dga - extended

Initially published and forked from https://github.com/arbor/bedep_dga #ThanksForSharing @tildedennis

The original bedep_dga.py script is awesome work, but it lacks an option to calculate the bedep domains used in the past.

This extended version provides:

  • an option to calculate all domains ever used by bedep till today.
  • switched from original currency file (eurofxref-hist-90d.xml) to fill history (eurofxref-hist.xml) from same source
  • add file cache to prevent unnecessary downloads
  • fixed off by one bug - domains are generated by data from Tuesday, published on Wednesday, valid from Thursday till the following Wednesday
  • fixed "no Tuesday data" bug - some Tuesdays exist without currency data
  • add some tests

Setup Environement

$ git clone https://github.com/botlabsDev/bedep_dga
$ cd bedep_dga
$ . ./bootstrap # create virtualenv and activate 

Execute DGA

## get currently used domains for this week
(venv) $ bedep_dga

## get domains used for next week - works only on Wednesday. 
(venv) $ bedep_dga --next-week

## get domains from specific start date till today 
(venv) $ bedep_dga --start 2020-01-01

## get domains from specific start date till specific end date
(venv) $ bedep_dga --start 2020-01-01 --end 2020-02-01

Create CSV

(venv) $ bedep_dga > domains.csv

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%