Python - How to make a Packet logger from a server?

Asked

Viewed 84 times

0

Python - How to make a Packet logger from a server?

Hi, I was wondering how do I create a python Packet logger that would have the following functionality:

  • Receive information from the game server, Example: i clicked on a button it would have to return the package that the server sent to represent this action

Which ones modules I would have to use it so I could do this program?

Obs: If you don’t understand what I meant by the post, comment on what you don’t understand so I can explain better!

1 answer

1


Your question is very broad, so let’s go in pieces. If you just want a logger, you can run Python 2.7/3.X logging lib to capture these details and put them in a log file.

Can you already print and receive these network details? If yes, you could just add logging by simple lines of code.

Here is the lib: https://docs.python.org/3/library/logging.html

  • With it logging library I can capture a log received by clicking on a button or an action ?

  • You can, if you set it up for that! Read the library documentation and you can do it! You will use a command like logging.info("Botao clicado")

Browser other questions tagged

You are not signed in. Login or sign up in order to post.