Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias alias alias alias alias Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad orelse TryExcept body Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad NameLoad handlers ExceptHandler type NameLoad body If Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return TupleLoad TupleLoad Str Str Str Str NameLoad decorator_list decorator_list
N/A N/A 

Scan multiple DNSBLs for IP addresss or domain.

Copyright (c) 2012, 2013 Rob Cakebread
All rights reserved.


If you give the domain, musubi will try to find all your IP addresses
for each mail server by querying MX DNS records and then doing a lookup
for the IPs. If your mail server uses round-robin DNS, this of course
won't find all the IPs. You must find out the IP CIDR range and then
give that, e.g.

   musubi scan 192.0.64.0/24


 N/A sys N/A logging N/A dns cliff.lister Lister IPy IP N/A requests dnsbl Base netdns get_mx_hosts ips_from_domains get_txt build_query net_calc verify_domain N/A requests_log N/A N/A logging getLogger requests N/A N/A N/A requests_log setLevel N/A logging WARNING N/A DNSBL_LIST http://musubi.cakebread.info/dnsbl.txt N/A req N/A N/A requests get DNSBL_LIST N/A N/A N/A req status_code 200 N/A N/A BASE_DNSBLS N/A N/A N/A req text split N/A dnsbllist BASE_DNSBLS Scan N/A Lister N/A N/A Scan multiple DNSBLs by IP or domain N/A log N/A N/A logging getLogger __name__ get_parser N/A N/A self prog_name N/A N/A N/A parser N/A N/A N/A super Scan self get_parser prog_name N/A N/A N/A parser add_argument scan nargs ? default None N/A parser N/A dnsbl_check N/A N/A self ip N/A N/A N/A backend N/A Base ip ip dnsbls BASE_DNSBLS N/A N/A N/A backend check N/A dnsbl_scanner N/A N/A self rdata ip N/A N/A N/A N/A dnsbl blacklisted N/A N/A self dnsbl_check ip N/A N/A blacklisted N/A N/A N/A N/A N/A Scan log debug N/A blacklisted: %s dnsbl N/A N/A N/A query N/A build_query ip dnsbl N/A txt N/A N/A get_txt query N/A 0 N/A N/A N/A N/A N/A dns resolver NoAnswer N/A N/A N/A N/A N/A Scan log debug N/A No TXT record for %s query N/A N/A N/A rdata append N/A ip dnsbl blacklisted txt N/A rdata N/A take_action N/A N/A self parsed_args N/A N/A N/A This could be a lot prettier if I used these as arguments
        instead of trying to detect input type --IP --domain --range
        It's just easier to use without them, hmm.
         N/A arg N/A parsed_args scan N/A rdata N/A N/A N/A / arg N/A N/A ips N/A net_calc arg N/A N/A N/A N/A ip N/A IP arg N/A ips N/A ip N/A N/A N/A ValueError N/A N/A N/A verify_domain arg N/A N/A hosts N/A get_mx_hosts arg N/A ips N/A ips_from_domains hosts N/A N/A N/A RuntimeError N/A Can not lookup domain: %s arg N/A ip ips N/A N/A ip N/A str ip N/A rdata N/A N/A self dnsbl_scanner rdata ip N/A N/A N/A len rdata N/A N/A N/A N/A N/A Scan log debug Not found on any DNSBL lists. N/A N/A N/A sys exit 0 N/A N/A N/A N/A Scan log debug rdata N/A N/A N/A IP DNSBL Host Response Code DNS TXT Record rdata N/A N/A