question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

syntax / usage SetSSID, SetSecurityKeys

See original GitHub issue

sorry i didnt know where to ask

so enabling WLAN like that works for me:

fc.call_action('WLANConfiguration3', 'SetEnable', NewEnable=True)

i wanted to set the SSID / Key, but im still not lucky

fc.call_action('WLANConfiguration3', 'SetSSID', NewSSID='guest-net')

current error say 402 / Argument error

same goes for setting the keys

fc.call_action('WLANConfiguration3', 'SetSecurityKeys', NewPreSharedKey='St4Rk3SP422w0rD')

i got the SSID set with ‘SetEnable’ instead of SetSSID

fc.call_action('WLANConfiguration3', 'SetEnable', NewSSID='guest-net') which confuses me even more

so i tried this

arguments={'SetSSID': {'NewSSID': 'guest-net'}}
fc.call_action("WLANConfiguration3", 'SetEnable', arguments=arguments)

i got no error like befor, but nothing was changed

pls help

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
solderdot72commented, Nov 14, 2020

I did some more trials and found a quick and dirty hack which actually works. I am aware that this is far from being good code, however I would say this is a confirmation that AVM’s statement is true: In this case the ‘s:’ is malicious. I did as follows:

In soaper.py I added below line 226 (this is in the method execute(), the following code snippet:

        if 'NewKeyPassphrase' in body:
            print (body)
            print ('replacing......................................')
            body = body.replace('s:NewWEPKey0', 'NewWEPKey0')
            body = body.replace('s:NewWEPKey1', 'NewWEPKey1')
            body = body.replace('s:NewWEPKey2', 'NewWEPKey2')
            body = body.replace('s:NewWEPKey3', 'NewWEPKey3')
            body = body.replace('s:NewPreSharedKey', 'NewPreSharedKey')
            body = body.replace('s:NewKeyPassphrase', 'NewKeyPassphrase')
            print (body)

This removes the ‘s:’ from that very body in that very case. This works fine, the password gets changed.

So my script looks like as follows:

from fritzconnection import FritzConnection
import pprint

pp = pprint.PrettyPrinter(indent=2)
fc=FritzConnection(address='192.168.2.1', user='FritzConnection', password='Dr3QL78ZYG58Nn98GVsx', use_tls=True)

securityKeys = fc.call_action('WLANConfiguration:3', 'GetSecurityKeys')
pp.pprint(securityKeys)

securityKeys['NewKeyPassphrase']='MeinPasswortIstUnfassbarGut'
pp.pprint(securityKeys)
fc.call_action('WLANConfiguration3',
               'SetSecurityKeys',
               arguments=securityKeys)

securityKeys = fc.call_action('WLANConfiguration:3', 'GetSecurityKeys')
pp.pprint(securityKeys)

The following output is generated:

{ 'NewKeyPassphrase': 'MeinPasswortIstPrima',
  'NewPreSharedKey': 'FC5EE08753F83ADA475B75CB65476525B37184349E09E0C178001A6DA02C2DBA',
  'NewWEPKey0': '',
  'NewWEPKey1': '',
  'NewWEPKey2': '',
  'NewWEPKey3': ''}
{ 'NewKeyPassphrase': 'MeinPasswortIstUnfassbarGut',
  'NewPreSharedKey': 'FC5EE08753F83ADA475B75CB65476525B37184349E09E0C178001A6DA02C2DBA',
  'NewWEPKey0': '',
  'NewWEPKey1': '',
  'NewWEPKey2': '',
  'NewWEPKey3': ''}
<s:Body><u:SetSecurityKeys xmlns:u="urn:dslforum-org:service:WLANConfiguration:3"><s:NewWEPKey0></s:NewWEPKey0><s:NewWEPKey1></s:NewWEPKey1><s:NewWEPKey2></s:NewWEPKey2><s:NewWEPKey3></s:NewWEPKey3><s:NewPreSharedKey>FC5EE08753F83ADA475B75CB65476525B37184349E09E0C178001A6DA02C2DBA</s:NewPreSharedKey><s:NewKeyPassphrase>MeinPasswortIstUnfassbarGut</s:NewKeyPassphrase></u:SetSecurityKeys></s:Body>
replacing......................................
<s:Body><u:SetSecurityKeys xmlns:u="urn:dslforum-org:service:WLANConfiguration:3"><NewWEPKey0></NewWEPKey0><NewWEPKey1></NewWEPKey1><NewWEPKey2></NewWEPKey2><NewWEPKey3></NewWEPKey3><NewPreSharedKey>FC5EE08753F83ADA475B75CB65476525B37184349E09E0C178001A6DA02C2DBA</NewPreSharedKey><NewKeyPassphrase>MeinPasswortIstUnfassbarGut</NewKeyPassphrase></u:SetSecurityKeys></s:Body>
{ 'NewKeyPassphrase': 'MeinPasswortIstUnfassbarGut',
  'NewPreSharedKey': '48F93E91801FB6E2EE1374E5B9026CEA92468FC0C9CBD7DE2B3D139DD04B9850',
  'NewWEPKey0': '',
  'NewWEPKey1': '',
  'NewWEPKey2': '',
  'NewWEPKey3': ''}

So to me it looks like AVM support is right and the ‘s:’ should not be there.

0reactions
DanielR92commented, Nov 17, 2020

Hello everybody, I also tried to fix the problem for the last two days. I came across this post today. Thanks to @solderdot72, I would have been about to bother with wireshark. This workaround helps me first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

setsid command in Linux with Examples - GeeksforGeeks
setsid command in Linux system is used to run a program in a new session. ... Syntax: setsid [options] program [arguments].
Read more >
- setsid()
The setsid() function creates a new session with the calling process becoming the process group leader with no controlling terminal.
Read more >
gpg - Unix, Linux Command - Tutorialspoint
This command can be used to force a trust database check at any time. The processing is identical to that of --update-trustdb but...
Read more >
Toybox 0.8.8 command help
Use ctrl-alt-F1 to switch from X11 to a virtual terminal, and alt-F6 (or F7, or F8) to get back. cksum. usage: cksum [-IPLN]...
Read more >
Running Commands on a Remote Linux / UNIX Host - nixCraft
Explains how to execute or run a commands on a remote Linux or Unix host server using the ssh command and get output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found