diff --git a/lg.py b/lg.py
index d08ff82..8a31ef1 100755
--- a/lg.py
+++ b/lg.py
@@ -26,6 +26,7 @@ def add_links(text):
else:
line = re.sub(r'AS(\d+)', r'AS\1',line)
line = re.sub(r'(\d+\.\d+\.\d+\.\d+)', r'\1',line)
+ line = re.sub(r'([0-9a-fA-F:]*)', r'\1',line)
ret_text.append(line)
return "\n".join(ret_text)
@@ -52,7 +53,7 @@ def inject_all_host():
@app.route("/")
def hello():
- return render_template('index.html')
+ return redirect("/summary/%s/ipv4" % "+".join(app.config["HOST_MAPPING"].keys()) )
def error_page(text):
return render_template('error.html', data = { "error": text } ), 500
@@ -70,7 +71,7 @@ def whois(query):
return jsonify(output=output, title=query)
SUMMARY_UNWANTED_PROTOS = ["Kernel", "Static", "Device"]
-SUMMARY_RE_MATCH = r"(?P[\w_]+)\s+(?P\w+)\s+(?P\w+)\s+(?P\w+)\s+(?P((|\d\d\d\d-\d\d-\d\d\s)(|\d\d:)\d\d:\d\d|\w\w\w\d\d))(\s+(?P.+)|)"
+SUMMARY_RE_MATCH = r"(?P[\w_]+)\s+(?P\w+)\s+(?P\w+)\s+(?P\w+)\s+(?P((|\d\d\d\d-\d\d-\d\d\s)(|\d\d:)\d\d:\d\d|\w\w\w\d\d))($|\s+(?P.*))"
@app.route("/summary/")
@app.route("/summary//")