Hi there,
I propose you a small software that I made to display the wifi keys registered in a local network.
I made it because when I go to my customers, either they don't know the wifi key and have to look for it in the box interface or behind the box, or the key is 3miles long which makes me waste time.
So this little software will show you the key of the SSID of your local network and will copy it in the clipboard.
UPDATE v1.01
Should now work with english, german or french windows.
- Windows Only
Notes
- Wifi connection must be your primary connection
- You must have a wifi interface (or wifi usb key connected)
- The service : WLAN auto config service must be at least on "automatic" (which is logically the case).
Thanks for your feedback.
Translated with www.DeepL.com/Translator (free version)
Download : MyWifi.zip
Code: Select all
; My Wifikeys
; My Wifikeys
; By Ar-S // 2021-09-21
; v1.01 adding english findstring strings.
; Thanks to Barry - Englsih keyword
; Thanks Cyllceaux - Deutch keyword
NewList ssid.s()
; Catch SSID
param$ = "wlan show profiles"
p=RunProgram("netsh",param$,"",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read|#PB_Program_Error)
If p
While ProgramRunning(p)
If AvailableProgramOutput(p)
t$ = ReadProgramString(p)
n1=FindString(t$,":")
If n1
n2=Len(t$)
r$=Mid(t$,n1+1,n2-n1)
AddElement (ssid())
ssid() = r$
EndIf
EndIf
err$ = ReadProgramError(p)
If err$
o$+"<ERR> " + err$ +#CRLF$
EndIf
Wend
CloseProgram(p)
EndIf
If ListSize (ssid()) = 0
MessageRequester("Erreur","No wifi is connected on this machine or it is not the main connection."+Chr(10)+"This program will end",0)
End
EndIf
If OpenWindow(0, 0, 0, 360, 60, "LDV MULTIMEDIA MY WIFIKEYS v1.01", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
GO = 0
ComboBoxGadget(1,1,1,358,30)
ForEach ssid()
AddGadgetItem(1, -1, ssid() )
Next
RemoveGadgetItem(1,0)
SetGadgetState(1,0)
StringGadget(2,1,32,358,30,"",#PB_String3D_ReadOnly)
Repeat
Event = WaitWindowEvent()
Select EventGadget()
Case 1
If EventType() = #PB_EventType_Change
ssid$ = GetGadgetText(1)
param$="wlan show profile name="+Chr(34)+Trim(ssid$)+Chr(34)+" key=clear"
p2=RunProgram("netsh",param$,"",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read|#PB_Program_Error)
If p2
r2$ = ""
While ProgramRunning(p2)
If AvailableProgramOutput(p2)
t$ = ReadProgramString(p2)+#CRLF$
FR = FindString(t$,"Contenu de la cl",1,#PB_String_NoCase) ; français
UK = FindString(t$,"key content",1,#PB_String_NoCase) ; English
DE = FindString(t$,"sselinhalt",1,#PB_String_NoCase) ; Deutch
If FR <> 0
r2$ = t$
ElseIf UK <> 0
r2$ = t$
ElseIf DE <> 0
r2$ = t$
EndIf
If r2$ <> ""
n1=FindString(r2$,":")
n2=Len(r2$)
r2$=Mid(r2$,n1+1,n2-n1)
Else
r2$ = "No active wifi detected :[ "
EndIf
EndIf
err$ = ReadProgramError(p2)
If err$
o$+"<ERR> " + err$ +#CRLF$
EndIf
Wend
CloseProgram(p2)
Else
Debug "erreur"
EndIf
SetGadgetText(2,"Wifi key : "+ r2$)
SetClipboardText(r2$)
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf