# HG changeset patch # User Pascal Bellard # Date 1302957649 -7200 # Node ID 75908c400f8ba0b2c7ad9ad8f98eafdd067ab74e # Parent 2dd85684201efacc649942a201d03cf0d0dbccc7 network.cgi: pscan is too slow, needs its own page diff -r 2dd85684201e -r 75908c400f8b lib/libtazpanel --- a/lib/libtazpanel Sat Apr 16 14:05:38 2011 +0200 +++ b/lib/libtazpanel Sat Apr 16 14:40:49 2011 +0200 @@ -61,8 +61,10 @@ ip=`ifconfig | grep -A 1 $i | grep inet | \ awk '{ print $2 }' | cut -d ":" -f 2` echo "connected$ip" + echo "" + echo "Scan ports" else - echo "--------" + echo "--------" fi } @@ -75,6 +77,7 @@ `gettext "Name"` `gettext "Status"` `gettext "IP Address"` + EOT for i in `ls /sys/class/net` diff -r 2dd85684201e -r 75908c400f8b network.cgi --- a/network.cgi Sat Apr 16 14:05:38 2011 +0200 +++ b/network.cgi Sat Apr 16 14:40:49 2011 +0200 @@ -91,6 +91,19 @@ # case " $(GET) " in + *\ scan\ *) + # Scan open ports + scan=$(GET scan) + xhtml_header + LOADING_MSG=$(gettext "Scanning open ports...") + loading_msg + cat << EOT +

`gettext "Port scanning for"` $scan

+
+$(pscan -b $scan)
+
+EOT + ;; *\ eth\ *) # Wired connections settings xhtml_header @@ -115,7 +128,7 @@ fi . /etc/network.conf cat << EOT -

`gettext "Ethernet connection`

+

`gettext "Ethernet connection"`

$(gettext "Setup a static IP")

@@ -171,7 +184,7 @@ LOADING_MSG=$(gettext "Scanning wireless interface...") loading_msg cat << EOT -

`gettext "Wireless connection`

+

`gettext "Wireless connection"`

$(gettext "Start") @@ -205,9 +218,9 @@ xhtml_header hostname=$(cat /etc/hostname) cat << EOT -

`gettext "Networking`

+

`gettext "Networking"`

- `gettext "Manage network connections and services` + `gettext "Manage network connections and services"`

@@ -271,12 +284,6 @@
 $(netstat -anp 2> /dev/null | sed '/UNIX domain sockets/,$d')
 
- - -

`gettext "Local ports scan"`

-
-$(pscan -b localhost)
-
EOT ;; esac