diff --git a/README.md b/README.md deleted file mode 100644 index 0c9fe8a..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Simple-Babelweb -A very simple Babel Web for babeld v1.8 -* Just clone it to your favorite httpd directory. diff --git a/babel.html b/babel.html new file mode 100644 index 0000000..087b773 --- /dev/null +++ b/babel.html @@ -0,0 +1,134 @@ +#!/usr/bin/haserl + +<% +echo -en "Content-Type: text/html\r\n\r\n" +HOSTNAME="$(uci -q get "fff.system.hostname")" + +data=$(echo "dump" | nc ::1 33123) + +%> + + + + <%= ${HOSTNAME} %> + + + + + + + +

Simple Babelweb

+
+
+ + + + + + +
+
+

Babel information

+ + + + + + + + + + + + + +
<% echo "$data" | head -n 1 %>
<% echo "$data" | head -n 2 | tail -n 1 %>
<% echo "$data" | head -n 3 | tail -n 1 %>
<% echo "$data" | head -n 4 | tail -n 1 %>
+
+ +<% +if ! [ ${GET_routes} ] && ! [ ${GET_v4table} ] && ! [ ${GET_v6table} ] && ! [ ${GET_weg} ] ; then + %> + +

Interfaces

+ <% + echo "$data" | grep interface | while read line ; do + echo "$line" + echo "
" + done + %> +
+

Neighbours

+ <% + echo "$data" | grep neighbour | while read line ; do + echo $line + echo "
" + done + %> +
+

Redistributed routes

+ <% + echo "$data" | grep xroute | while read line ; do + echo $line + echo "
" + done + %> +<% +fi + +echo "" +if [ ${GET_routes} ]; then + %> +

All routes

+ <% + echo "$data" | grep -w route | while read line ; do + echo "" + done +fi + +if [ ${GET_v4table} ]; then + %> +

Show IPv6 Routing Tabele

+ <% + v4routen=$(ip ro sh tab 10) + echo "$v4routen" | while read line ; do + echo "" + done +fi + +if [ ${GET_v6table} ]; then + %> +

Show IPv6 Routing Tabele

+ <% + v6routen=$(ip -6 ro sh tab 10) + echo "$v6routen" | while read line ; do + echo "" + done +fi + +if [ ${GET_weg} ]; then + %> +

Wege zu <%# echo ${GET_ip} %>

+ <% + echo "$data" | grep -w route | grep "${GET_ip}" | while read line ; do + echo "" + done +fi +%> +
$line
$line
$line
$line
+ +