Skip to content

Basic flood detection #8

@josephernest

Description

@josephernest

Rough idea:

On connect of a new client ws :

 bytesent[ws] = 0

We should do this each time a message is posted by a user ws :

 bytesent[ws] += len(message)

Then we should measure if the increase is more than, say, 1kB per minute. If so deconnect, and store the IP of the potential spammer.

If user comes back and second flood, add to IP ban list...

Something else: how to get IP from ws here with websocket: https://github.com/josephernest/talktalktalk/blob/master/talktalktalk.py#L75 ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions