@@ -0,0 +1,1447 @@
+'''%0A    DGA of Mydoom%0A'''%0A%0Aimport argparse%0Afrom datetime import datetime %0A%0Adef dga(date, seed, nr, tlds):%0A    _sld = %5B'e', 'v', 'l', 'k', 'r', 'd', 'o', 'h', 'l', 'p'%5D%0A    magic = 'nj'%0A    len_sld = len(_sld)%0A    for i in range(len_sld):%0A        for j in range(len(magic)):%0A            _sld%5Bi%5D = chr(ord(_sld%5Bi%5D) %5E ((ord(magic%5Bj%5D) + i * j) & 0xff))%0A%0A    _seed = seed + date.year + date.month + date.day%0A%0A    for i in range(nr):%0A        if i == nr - 1:%0A            _seed = seed%0A%0A        _seed = ((_seed * 0x19660d) + 0x3c6ef35f) & 0xffffffff%0A%0A        sld = ''%0A        tld = ''%0A        m = _seed%0A        for j in range(len_sld):%0A            idx = m %25 len_sld%0A            sld += _sld%5Bidx%5D%0A            if j == 0:%0A                if idx %3C 7:%0A                    tld = tlds%5Bidx%5D%0A                else:%0A                    tld = tlds%5B-1%5D%0A%0A            m = m / len_sld%0A%0A        print sld + '.' + tld%0A%0Aif __name__==%22__main__%22:%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('-t', '--time', help=%22Seconds since January 1, 1970 UTC%22)%0A    parser.add_argument(%22-n%22, %22--nr%22, help=%22nr of domains%22, type=int, default=51)%0A    parser.add_argument(%22-s%22, %22--seed%22, help=%22RAND_MAX%22, default=%220xfa8%22)%0A    parser.add_argument(%22-T%22, %22--tlds%22, help=%22TLD%22, default=%22com-biz-us-net-org-ws-info-in%22)%0A%0A    args = parser.parse_args()%0A%0A    d = datetime.utcfromtimestamp(int(args.time))%0A    tlds = args.tlds.split('-')%0A    dga(d, int(args.seed, 16), args.nr, tlds)%0A

Create dga.py