Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client isConnected [possible BUG] #55

Open
Schrolli91 opened this issue Sep 22, 2020 · 1 comment
Open

client isConnected [possible BUG] #55

Schrolli91 opened this issue Sep 22, 2020 · 1 comment

Comments

@Schrolli91
Copy link
Member

Schrolli91 commented Sep 22, 2020

The client will check his connect status by send a packet with <keep-alive>.
But its possible that the client will spam this packet to the server instance.
We should take a network record (wireshark) and check how many packets are sent by this mechanism.

There is also a problem with the error handling if received data are broken:

20.09.2020 21:25:01,286 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv header: '12        '
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv 10 bytes:

<keep-aliv
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Add data to queue
20.09.2020 21:25:01,288 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### send: [ack]
20.09.2020 21:25:01,290 - Thread-6        server          handle             [INFO    ] Client disconnected: 192.168.192.###
20.09.2020 21:25:01,367 - MainThread      bw_server       <module>           [INFO    ] get data from 192.168.192.### (waited in queue 0.079 sec.)
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [DEBUG   ] 0 packet(s) still waiting in queue
20.09.2020 21:25:01,368 - MainThread      packet          init           [DEBUG   ] create bwPacket from string
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [ERROR   ] BOSWatch interrupted by an error
Traceback (most recent call last):
  File "bw_server.py", line 101, in <module>
    bwPacket = Packet((data[1]))
  File "/opt/boswatch3/boswatch/packet.py", line 35, in init
    self._packet = eval(str(bwPacket.strip()))
  File "<string>", line 1
    <keep-aliv
    ^
SyntaxError: invalid syntax
20.09.2020 21:25:01,370 - MainThread      bw_server       <module>           [DEBUG   ] Starting shutdown routine
@Schrolli91 Schrolli91 changed the title client isConnected [possible problem] client isConnected [possible BUG] Sep 22, 2020
@Schrolli91 Schrolli91 added the Bug label Sep 22, 2020
@wattenre
Copy link

wattenre commented Aug 7, 2021

07.08.2021 14:19:42,851 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 recv header: '12        '
07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 recv 6 bytes:
<keep-
07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Add data to queue
07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 send: [ack]
07.08.2021 14:19:42,887 - Thread-3        server          handle             [INFO    ] Client disconnected: 172.27.236.5
07.08.2021 14:19:42,949 - MainThread      bw_server       <module>           [INFO    ] get data from 172.27.236.5 (waited in queue 0.097 sec.)
07.08.2021 14:19:42,950 - MainThread      bw_server       <module>           [DEBUG   ] 0 packet(s) still waiting in queue
07.08.2021 14:19:42,950 - MainThread      packet          __init__           [DEBUG   ] create bwPacket from string
07.08.2021 14:19:42,950 - MainThread      bw_server       <module>           [ERROR   ] BOSWatch interrupted by an error
Traceback (most recent call last):
  File "bw_server.py", line 101, in <module>
    bwPacket = Packet((data[1]))
  File "/opt/boswatch3/boswatch/packet.py", line 35, in __init__
    self._packet = eval(str(bwPacket.strip()))
  File "<string>", line 1
    <keep-
    ^
SyntaxError: invalid syntax
07.08.2021 14:19:42,964 - MainThread      bw_server       <module>           [DEBUG   ] Starting shutdown routine
07.08.2021 14:19:42,964 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterMainPOC
07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.modeFilter] onUnload()
07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.regexFilter] onUnload()
07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.doubleFilter] onUnload()
07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.descriptor] onUnload()
07.08.2021 14:19:42,966 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterAlarm
07.08.2021 14:19:42,966 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.regexFilter] onUnload()
07.08.2021 14:19:42,966 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.fcmrts] onUnload()
07.08.2021 14:19:42,966 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.telegram] onUnload()
07.08.2021 14:19:42,966 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterLog
07.08.2021 14:19:42,967 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.mysql] onUnload()
07.08.2021 14:19:43,260 - MainThread      server          stop               [DEBUG   ] TCPServer stopped
07.08.2021 14:19:43,260 - MainThread      broadcast       stop               [WARNING ] udp broadcast server always stopped
07.08.2021 14:19:43,260 - MainThread      bw_server       <module>           [DEBUG   ] BOSWatch server has stopped ...

Aug 07 14:19:43 openvpn-vm python3[26715]:   File "/opt/boswatch3/boswatch/network/server.py", line 53, in handle
Aug 07 14:19:43 openvpn-vm python3[26715]:     length = int(header.strip())
Aug 07 14:19:43 openvpn-vm python3[26715]: ValueError: invalid literal for int() with base 10: 'alive>12'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants