From 105d5f16ac1f73853198f0b02c84b26207dcf35c Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Mon, 28 May 2012 18:19:19 +0200 Subject: [PATCH] Catch 'ASName' in whois answer --- lg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lg.py b/lg.py index 86d1835..fcb05c3 100755 --- a/lg.py +++ b/lg.py @@ -262,9 +262,9 @@ ASNAME_CACHE = load_cache_pickle(ASNAME_CACHE_FILE, {}) def get_as_name(_as): if not ASNAME_CACHE.has_key(_as): whois_answer = whois_command("as%s" % _as) - as_name = re.search('as-name: (.*)', whois_answer) + as_name = re.search('(as-name|ASName): (.*)', whois_answer) if as_name: - ASNAME_CACHE[_as] = as_name.group(1).strip() + ASNAME_CACHE[_as] = as_name.group(2).strip() else: ASNAME_CACHE[_as] = _as save_cache_pickle(ASNAME_CACHE_FILE, ASNAME_CACHE)