Wifi-Connect 2017B beta (Deprecated)

Message
Author
Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#61 Post by Scooby »

stemsee wrote:Well I didn't mean anything adversitive, but the gui was incomplete using your suggestion!

But thanks anyway!
incomplete when running from /tmp the file scansr3 yes
but not from within your code.

If you had tried to comment out $choose in your code result would have been exactly the same as with it!

The suggestion of trying . scansr3 in /tmp was more a proof of concept
in response to your statement
stemsee wrote: if $choose is scrapped I think there will be no gui!!!

stemsee

#62 Post by stemsee »

yeah, it works. I see why now?

stemsee

#63 Post by stemsee »

The script is slowly having refinements applied.

Yad notification in the tray will have an updating display of ip mac up/down loads in MB (thanks to Fredx181). Dhcpcd will be operating on one interface in particular and not generally. If any script is called again then the tray will close as a new one opens.

Might be ready in a couple weeks. I have other things to do first!

stemsee

#64 Post by stemsee »

Wifi-Connect-7
needs testing.

changed some code to follow ip acquisition and report on event.
clicking on tray icon shows rx and tx data.
etho eth1 wlan0 wlan1 configure individually now.
Random Mac as default restated.
yaf-splash replaced with yad --timeout
works with wl3s0 interface.
close tray in menu not working for the minute!
needs testing.
Last edited by stemsee on Tue 21 Nov 2017, 07:37, edited 1 time in total.

stemsee

#65 Post by stemsee »

Here is version 8. Reordered code so that defaultwifi connectiion script gets created in ~/Startup/
two bugs in menu etc
Last edited by stemsee on Tue 21 Nov 2017, 07:37, edited 1 time in total.

stemsee

#66 Post by stemsee »

I am currently implementing encryption for profiles and saved variables. I am using bcrypt (because it is on my system), but probably will end up using gpg. Encryption will be available only for wifi-connect and wifiprofi, eduroam and defaultwifi but not wifi-connect2 script.

stemsee

#67 Post by stemsee »

Here is Wifi-Connect-10

Encryption works with wifi-connect script, for profiles and variables.

Wifi-Connect has its own directories now at /root/.wifi-connect
first squashed - wifi-connect.sfs - then encrypted to: wifi-connect.sfs.bfe

Encrypted with aes-256-cbc

wifi-connect2 script does not have encryption.
Last edited by stemsee on Tue 21 Nov 2017, 07:37, edited 1 time in total.

stemsee

#68 Post by stemsee »

So, script ends abruptly without notice when no networks are found. This happens because the results of the scan are sent to /tmp/scanrs, but only if there is at least one result! The subsequent code crashes if that file is not found. Solution then is to test for the file and if not found display a notification pane on the desktop!

V11 has the above and updates for all scripts to accomodate de/encryption changes.
Last edited by stemsee on Tue 21 Nov 2017, 07:37, edited 1 time in total.

stemsee

#69 Post by stemsee »

Bug fixes
Last edited by stemsee on Tue 21 Nov 2017, 07:38, edited 1 time in total.

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#70 Post by Puppyt »

Well I can't *wait* to try this out when I get back to uni - thanks stemsee!
Had just thrown a Puppy into a Win7 X300 ThinkPad I was given recently, chose a small netbook version (Simplicity LxPup 16.04) for times when I couldn't stomache the drag of the uni wince machines (as in "meat grinders for the soul") for internet searching. Tried my old approaches (archived on other Eduroam threads) to no avail, had to regress back to Win7 and was peeved that the uni Eduroam login occurred seamlessly within that PITA. Re-discovered your thread here on your network interface with built-in eduroamyfriendliness - and finally got it working only after (!) I realised that I didn't have yad on board. Installed yad-0.19.1-i486-s14 from the PPM. Reckon I can be proud to be using mobile Puppy on campus again - Cheers stemsee!
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

stemsee

#71 Post by stemsee »

You and me both, Puppyt!! Though you might want to upgrade yad to a newer version as it is at 0.36.3 with a lot of new features and improvements, some of which may be implemented in these scripts!

Glad someone else benefits from my efforts and reports it!

However here is another update and after installing hostapd and dnsmasq, along with a kernel that has masquerade module you can create a wifi hotspot, or share wifi from usb tethered mobile phone or ethernet to wifi, or wifi to wifi etc etc Thanks to rcrsn51's new routermaker script (which I have included in this package (I may have modified it a bit or not!))

So Hotspot script now working. Also updated interface name detection and use.

Needs morre testing of course.
EDIT: tested on FatDog, XenialDog (pristine), DpupWheezy
Last edited by stemsee on Tue 21 Nov 2017, 07:38, edited 2 times in total.

stemsee

#72 Post by stemsee »

A few improvements and mistakes corrected.
Last edited by stemsee on Tue 21 Nov 2017, 07:38, edited 1 time in total.

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#73 Post by Puppyt »

Cheers stemsee! I have it working in the LxPup environment, strangely only after a reboot and with some peculiarities I didn't have time to work through - was looking to test in something other than LXDE but it was working, so all good. Sorry not to have responded earlier - currently on placement/rotations so flat out. Have downloaded your updated pet and thanks very much for the heads-up on the yad version - perhaps that's where things weren't so seamless for me. BFN and thanks VERY much :)

UPDATE: Works great, writing from my uni Eduroam login now - no dramas thank you stemsee :) I have some random IP-add dialogue that pops up and doesn't self close that gets a bit distracting, and I'm sure I'll work out the kinks with the LxPup windows environment (will test again with a Wheezy/Tahr pup etc when I can over the weekend). Have a great weekend and thanks again!
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

stemsee

#74 Post by stemsee »

Can you make a screen shot of the random ip-add and post it?

stemsee

#75 Post by stemsee »

This script continually scans for wifi access points and shows in a pane on the desktop. I use it to on my laptop to walk around and see what is available from different rooms.

save as /usr/sbin/scanner
chmod 755 /usr/sbin/scanner
in term 'scanner'
depends on yad and iwlist
Does not affect browsing or downloads.

Code: Select all

#!/bin/sh
while true
do
int=wlan0
scan=`iwlist $int scan | grep -e 'ESSID' -e 'Address' | cut -f1,2,3 -d '"' | tr '          ' '?' | sed 's/?//g' | tr '\nQ' ' Q' | tr '\nE' ' E' | sed 's/Cell/\nCell/g' | sed 's/-Address//g' | cut -c8-99`
if [[ ! -z "$scan" ]]; then
echo "$scan" | awk '{print $2}' | cut -f2 -d':'| yad --geometry=200x300-60-60 --no-buttons --skip-taskbar --undecorated --list --column="networks" --timeout 6 &
sleep 1
else
sleep 1
fi
done

stemsee

#76 Post by stemsee »

Here is an improved 'live AP update scanner' which will now be included in wifi-connect.pet

Code: Select all

#!/bin/sh
if [ ! -f /tmp/69 ]; then
touch /tmp/69
elif [[ -f /tmp/69 ]]; then
rm -f /tmp/69
killall scanner
exit 0
fi
wlanfn () { 
wit=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | cut -f1 -d ' '`
case $wit in
wl*) int=$wit;;
usb0) int=usb0;;
esac
wit2=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | tr '\n' ' ' | cut -f24 -d ' '`
case $wit2 in
wl*) int2=$wit2;;
usb0) int2=usb0;;
usb1) int2=usb1;;
*) int2="insert 2nd card";;
esac
}
wlanfn
if [ -f /tmp/69 ]; then
while true
do
scan=`iwlist $int scan | grep -e 'ESSID' -e 'Quality' -e 'Address' | sed 's/                    //g' | tr '\n' ' ' | awk '{print $10,$5,$6,$20,$15,$16,$30,$25,$26,$40,$35,$36,$50,$45,$46,$60,$55,$56,$70,$65,$66,$80,$75,$76,$90,$85,$86,$100,$95,$96,$110,$105,$106,$120,$115,$116}' | sed 's|/70 |\n|g'`
if [[ ! -z "$scan" ]]; then
items=`echo "$scan" | sed 's/ESSID://g' | sed 's/ /  /g' | sed 's/Quality=/Q/g' | awk '{print $1,$3,$2}' | sort -rk2`
yad --geometry=343x333-60-60 --no-buttons --skip-taskbar --undecorated --list --separator=  --column=networks --column=Quality --column=Mac $items --timeout 6 &
sleep 4
else
sleep 1
fi
done
fi

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#77 Post by Puppyt »

Hi stemsee - sorry for the delay in my reply. Since I emailed you that feedback I was able to test it again briefly at uni to try to get some screenshots of the non-fading dialogues, and wasn't able to replicate the behaviour as reported. I think it might have been something to do with the earlier version of yad I was using (have been juggling a lot of issues of late, been a blur), and not some sort of throwback with the LxPup environment I was using. Wasn't able to get the time to test it in other setups yet, but all good :)
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

stemsee

#78 Post by stemsee »

no probs!

Scanner script is now a full blown wifi AP connection tool.
Profiles not saved.
No encryption.
The quickest connection tool on the planet!
A little buggy at the moment. Maybe need to retry two or three times.
The easiest to use ever!!

What needs to be done is to filter the encryption key flag so pop up password dialogue works only when necessary ie key:on condition.

Tray icon click info needs work.

This does have a tray menu as per wifi-connect, but also has live AP available display on desktop. Just click whichever AP you can see to connect!

password popup up dialogue opens everytime at the moment whether needed or not.

Here is the code just place in /usr/sbin/scanner and make executable.

Code: Select all

#!/bin/sh
depsfn () { # check dependencies
	[[ -f /tmp/depends ]] && rm -f /tmp/depends
	for dep in iwlist yad sort tac ifconfig iwlist wpa_supplicant dhcpcd
	do
		deps=`which $dep`
	if [[ -z "$deps" ]]; then
		echo "$dep" >> /tmp/depends
	fi
	done
	[[ -f /tmp/depends ]] && zenity --info --text "Dependencies need installing\n `cat /tmp/depends`" --timeout 8
	#[[f /tmp/depends ]] && exit 0
}
depsfn
startinfn () {
rm -f /tmp/onclick 2> /dev/null
rm -f /tmp/scans* 2> /dev/null
yad --undecorated --no-buttons --skip-taskbar --text "Starting Connection" --timeout 2 &
CURRENTIPS=$(ip addr show | grep $int | grep inet | awk '{print $2}')
ifconfig $int up
ifconfig $int down
for I in $CURRENTIPS; do ip addr del $I dev $int; done 2> /dev/null
ip route flush dev $int 2> /dev/null
rm -f /var/db/dhcpcd-${int}.lease 2> /dev/null
rm -f /var/lib/dhcpcd/dhcpcd-${int}.lease 2> /dev/null
killall -9 dhcpcd 2> /dev/null
killall -9 wpa_supplicant 2> /dev/null
rm -f /var/lib/dhcpcd/*.info 2> /dev/null
rm -f /var/run/dhcpcd*.pid 2> /dev/null
rm -f /var/run/wpa_supplicant/* 2> /dev/null
ifconfig $int up
}

ocfn () {
if [ -z "$password" ]; then
echo "ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid='$netsel1'
key_mgmt=NONE
}
" > /tmp/netsel
elif [[ ! -z "$password" ]]; then
echo "ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid='$netsel1'
scan_ssid=1
psk='$password'
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
}
" > /tmp/netsel
fi
}
passwordfn () {
userdata=`yad --window-icon=/usr/share/pixmaps/wifi.png --image="/usr/share/pixmaps/wifi.png" --title "PAssword $nets" --form --field=name --field=Password:H --field=Confirm:H`
password=`echo $userdata | cut -f2 -d '|'`
password2=`echo $userdata | cut -f3 -d '|'`
usernm=`echo $userdata | cut -f1 -d '|'`
if [[ "$password2" != "$password" ]]; then
	yad --window --width 400 --image=/usr/share/pixmaps/wifi.png --title "Passwords don't match"
	 --text "Try again"
	passwordfn
fi
}

if [ ! -f /tmp/69 ]; then
touch /tmp/69
elif [[ -f /tmp/69 ]]; then
rm -f /tmp/69
killall scanner
exit 0
fi
wlanfn () { 
wit=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | cut -f1 -d ' '`
case $wit in
wl*) int=$wit;;
usb0) int=usb0;;
esac
wit2=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | tr '\n' ' ' | cut -f24 -d ' '`
case $wit2 in
wl*) int2=$wit2;;
usb0) int2=usb0;;
usb1) int2=usb1;;
*) int2="insert 2nd card";;
esac
}
wlanfn
connectfn () {
	echo "$nets"
	netsel1=`echo $nets | cut -f1 -d'Q'`
	passwordfn
	ocfn
	cat /tmp/netsel | tr "'" '"' > /tmp/netself
if [[  ! -z "$netsel1" ]]; then
	startinfn
	dhcpcd -k "$int"
	wpa_supplicant -Dwext -i "$int" -c /tmp/netself -B
	sleep 4
	dhcpcd -z "$int"
	pics3=/usr/share/icons/oxygen/22x22/devices
pics2=/usr/share/pixmaps/puppy
pics=/usr/share/pixmaps
scanres=`ifconfig -a $int | grep -e 'RX' -e 'TX' -e 'ESSID'`
yad --notification --kill-parent --listen \
    --image=/usr/share/pixmaps/wifi.png --text="$scanres" \
    --command="/tmp/scanetinfos" --menu="Live Networks!bash -c scanner!$pics/wireless.png|New-Connection!wifi-connect!$pics/wifi124.png|Saved Profiles!wifiprofi!$pics/wireless.png|Browser!defaultbrowser!$pics/browser24.png|Re-connect!wifi-connect wlan0-u!$pics/wifi124.png|Disconnect!wifi-connect wlan0-d!$pics/wifi124x.png|Wlan1!wifi-connect wlan1-u!$pics/wifi224.png|wlan1 Disconnect!wifi-connect wlan1-d!$pics/wifi224x.png|Ethernet 1!wifi-connect eth0-u!$pics3/network-wired.png|Ethernet 1 $mytext10!wifi-connect eth0-d!/usr/share/icons/oxygen/22x22/devices/network-wiredx.png|Ethernet 2!wifi-connect eth1-u!$pics3/network-wired.png|Ethernet 2 $mytext10!wifi-connect eth1-d!/usr/share/icons/oxygen/22x22/devices/network-wiredx.png|Connect mobile!wifi-connect usb0-u!/usr/share/icons/oxygen/22x22/devices/phone.png|Disconnect mobile!wifi-connect usb0-d!/usr/share/icons/oxygen/22x22/devices/phonex.png|Close Tray!/tmp/wifitray1!/usr/share/icons/oxygen/22x22/actions/application-exit.png" &
pid=$!
echo "#!/bin/sh
pid=$pid
kill $pid
" > /tmp/wifitray1
chmod 755 /tmp/wifitray1
echo '#!/bin/sh
scaninfos=`ifconfig -a wlan0 | tr "\n" " " | awk '{print $5,$7,$16,$17,$22,$23}' | sed "s/addr:/ip:/" | sed "s/RX packets/RX/" | sed "s/TX packets/TX/" | sed "s/^/mac::/"`
yad --geometry=300x20-300-20 --undecorated --no-buttons --skip-taskbar --text="$scaninfos" --timeout=4
unset scaninfos
' > /tmp/scanetinfos
chmod 755 /tmp/scanetinfos
fi
}
[[ -f /tmp/wifitray1 ]] && /tmp/wifitray1
if [ -f /tmp/69 ]; then
while true
do
ecann=`iwlist $int scan`
scan=`echo "$ecann" | grep -e 'ESSID' -e 'Quality' -e 'Address' | sed 's/          //g' | sed 's/                    //g' | tr '\n' ' ' | awk '{print $10,$5,$6,$20,$15,$16,$30,$25,$26,$40,$35,$36,$50,$45,$46,$60,$55,$56,$70,$65,$66,$80,$75,$76,$90,$85,$86,$100,$95,$96,$110,$105,$106,$120,$115,$116}' | sed 's|/70 |\n|g'`
if [[ ! -z "$scan" ]]; then
	items=`echo "$scan" | sed 's/ESSID://g' | sed 's/ /  /g' | sed 's/Quality=/Q/g' | awk '{print $1,$3,$2}' | sort -rk2`
	echo "nets=`zenity --geometry=343x333-30-30 --no-buttons --skip-taskbar --undecorated --list --separator=  --column=networks --column=Quality --column=Mac $items --timeout 6 --timeout-indicator=top`" > /tmp/net &
sleep 4
else
	sleep 1
fi
. /tmp/net
	if [[ ! -z "$nets" ]]; then
	connectfn &
	/tmp/wifitray1
	fi
done
fi

stemsee

#79 Post by stemsee »

Improved

Code: Select all

#!/bin/sh
depsfn () { # check dependencies
	[[ -f /tmp/depends ]] && rm -f /tmp/depends
	for dep in iwlist yad sort tac ifconfig iwlist wpa_supplicant dhcpcd
	do
		deps=`which $dep`
	if [[ -z "$deps" ]]; then
		echo "$dep" >> /tmp/depends
	fi
	done
	[[ -f /tmp/depends ]] && zenity --info --text "Dependencies need installing\n `cat /tmp/depends`" --timeout 8
	#[[f /tmp/depends ]] && exit 0
}
depsfn
startinfn () {
rm -f /tmp/onclick 2> /dev/null
rm -f /tmp/scans* 2> /dev/null
yad --undecorated --no-buttons --skip-taskbar --text "Starting Connection" --timeout 2 &
CURRENTIPS=$(ip addr show | grep $int | grep inet | awk '{print $2}')
ifconfig $int up
ifconfig $int down
for I in $CURRENTIPS; do ip addr del $I dev $int; done 2> /dev/null
ip route flush dev $int 2> /dev/null
rm -f /var/db/dhcpcd-${int}.lease 2> /dev/null
rm -f /var/lib/dhcpcd/dhcpcd-${int}.lease 2> /dev/null
killall -9 dhcpcd 2> /dev/null
killall -9 wpa_supplicant 2> /dev/null
rm -f /var/lib/dhcpcd/*.info 2> /dev/null
rm -f /var/run/dhcpcd*.pid 2> /dev/null
rm -f /var/run/wpa_supplicant/* 2> /dev/null
ifconfig $int up
}

ocfn () {
if [ -z "$password" ]; then
echo "ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid='$netsel1'
key_mgmt=NONE
}
" > /tmp/netsel
elif [[ ! -z "$password" ]]; then
echo "ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid='$netsel1'
scan_ssid=1
psk='$password'
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
}
" > /tmp/netsel
fi
}
passwordfn () {
userdata=`yad --width=600 --window-icon=/usr/share/pixmaps/wifi.png --image="/usr/share/pixmaps/wifi.png" --title "PAssword $nets" --form --field=name --field=Password:H --field=Confirm:H`
password=`echo $userdata | cut -f2 -d '|'`
password2=`echo $userdata | cut -f3 -d '|'`
usernm=`echo $userdata | cut -f1 -d '|'`
if [[ "$password2" != "$password" ]]; then
	yad --window  --image=/usr/share/pixmaps/wifi.png --title "Passwords don't match"
	 --text "Try again"
	passwordfn
fi
if [ "$ONN" = on ]; then
	if [[ -z "$password" ]]; then
		exit 0
	fi
fi
}

if [ ! -f /tmp/69 ]; then
	touch /tmp/69
elif [[ -f /tmp/69 ]]; then
	rm -f /tmp/69
	killall scanner
	exit 0
fi
wlanfn () { 
wit=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | cut -f1 -d ' '`
case $wit in
	wl*) int=$wit;;
	usb0) int=usb0;;
esac
wit2=`ifconfig -a | cut -f1 -d ' ' | grep -e 'wl' -e 'usb' | tr '\n' ' ' | cut -f24 -d ' '`
case $wit2 in
	wl*) int2=$wit2;;
	usb0) int2=usb0;;
	usb1) int2=usb1;;
	*) int2="insert 2nd card";;
esac
}
wlanfn
connectfn () {
	if [ "$ONN" = on ]; then
		passwordfn
	fi
	ocfn
	cat /tmp/netsel | tr "'" '"' > /tmp/netself
if [[  ! -z "$netsel1" ]]; then
	startinfn
	dhcpcd -k "$int"
	wpa_supplicant -Dwext -i "$int" -c/tmp/netself -B
	sleep 2
	dhcpcd -z "$int"
	sleep 2
	pics3=/usr/share/icons/oxygen/22x22/devices
pics2=/usr/share/pixmaps/puppy
pics=/usr/share/pixmaps
scanres=`ifconfig -a $int | grep -e 'ESSID' -e 'Add'`
yad --notification --kill-parent --listen \
    --image=/usr/share/pixmaps/wifi.png --text="$scanres" \
    --command="/tmp/scanetinfos" --menu="Live Networks!bash -c scanner!$pics/wireless.png|New-Connection!wifi-connect!$pics/wifi124.png|Saved Profiles!wifiprofi!$pics/wireless.png|Browser!defaultbrowser!$pics/browser24.png|Re-connect!wifi-connect wlan0-u!$pics/wifi124.png|Disconnect!wifi-connect wlan0-d!$pics/wifi124x.png|Wlan1!wifi-connect wlan1-u!$pics/wifi224.png|wlan1 Disconnect!wifi-connect wlan1-d!$pics/wifi224x.png|Ethernet 1!wifi-connect eth0-u!$pics3/network-wired.png|Ethernet 1 $mytext10!wifi-connect eth0-d!/usr/share/icons/oxygen/22x22/devices/network-wiredx.png|Ethernet 2!wifi-connect eth1-u!$pics3/network-wired.png|Ethernet 2 $mytext10!wifi-connect eth1-d!/usr/share/icons/oxygen/22x22/devices/network-wiredx.png|Connect mobile!wifi-connect usb0-u!/usr/share/icons/oxygen/22x22/devices/phone.png|Disconnect mobile!wifi-connect usb0-d!/usr/share/icons/oxygen/22x22/devices/phonex.png|Close Tray!/tmp/wifitray1!/usr/share/icons/oxygen/22x22/actions/application-exit.png" &
pid=$!
echo "#!/bin/sh
pid=$pid
kill $pid
" > /tmp/wifitray1
chmod 755 /tmp/wifitray1
fi
}
[[ -f /tmp/wifitray1 ]] && /tmp/wifitray1
if [ -f /tmp/69 ]; then
while true
do
ecann=`iwlist $int scan | grep -e 'ESSID' -e 'Quality' -e 'Address' -e 'key' | sed 's/          //g' | tr '\n' ' ' | sed 's/Quality=//g' | sed 's/level=//g' | sed 's/ESSID://g' | sed 's/key://g' | sed 's|Cell|\nCell|g'`
if [[ ! -z "$" ]]; then
a=12
echo "$ecann" > /tmp/ecann
rm /tmp/finds
while read line
do
a="$a"
b=$((a - 7))
c=$((a - 6))
d=$((a - 4))
e=$((a - 1))
echo $line | cut -d' ' -f$a,$b,$c,$d,$e | awk '{print $5,$1,$2,$3,$4}' >> /tmp/finds
done < /tmp/ecann
	items=`cat /tmp/finds | sed 's/ -/ /g' | sed 's/"//g' | sed 's/ /|/g' | awk -F'|' '{print $1,$2,$3,$4,$5}' | sort -k5`
	echo "nets=`zenity --window-icon=/usr/share/pixmaps/wireless.png --geometry=200x400-30-30 --no-buttons --skip-taskbar --list --separator='|' --column=essid --column=mac --column=quality --column=power --column=passkey $items --timeout 12 --timeout-indicator=top`" > /tmp/net &
sleep 10
else
	sleep 1
fi
sed -i 's/=/="/' /tmp/net
sed -i 's/$/"/g' /tmp/net
. /tmp/net
	netsel1=`echo $nets | cut -f1 -d'|'`
	ONN=`echo $nets | cut -d'|' -f5`
	if [[ ! -z "$netsel1" ]]; then
		connectfn &
		[[ -f /tmp/wifitray1 ]] && /tmp/wifitray1
	fi
done
fi
Attachments
capture7100.png
(47.9 KiB) Downloaded 353 times

stemsee

#80 Post by stemsee »

wifi-connect-20
with scanner connection app.
Last edited by stemsee on Tue 21 Nov 2017, 07:36, edited 1 time in total.

Post Reply