enter image description here Good evening, dear users.

Perhaps the post is stupid, but I am very interested and I did not find the answer. Is it possible, via a TCP packet, to transmit information about devices, such as, for example, RAM, video card, processor, etc.

Another amendment is that I am on Linux (I run the program through Wine), and the client itself is only for Windows.

Any references to the literature - I will be grateful. Help me please!

  • The wireshark program is free software, so it compiles perfectly and runs on any popular operating system. including A package with this program is also present in the repositories of all popular gnu / linux operating system distributions. - aleksandr barakin

1 answer 1

Is it possible, via a TCP packet, to transmit information about devices, such as, for example, RAM, video card, processor, etc.

Yes of course. for example, using the netcat program:

$ while :; do echo 'ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ»ΡŒΠ½Π°Ρ информация' | nc -l 12345; done 

Now the program will listen to the tcp port number 12345 on all interfaces and provide the specified information in response to the connection.

You can get this information from another machine. for example, using the same netcat program:

 $ nc ip-адрСс-ΠΈΠ»ΠΈ-имя-ΠΏΠ΅Ρ€Π²ΠΎΠΉ-ΠΌΠ°ΡˆΠΈΠ½Ρ‹ 12345 ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ»ΡŒΠ½Π°Ρ информация 

or using any web client (browser including):

 $ curl http://ip-адрСс-ΠΈΠ»ΠΈ-имя-ΠΏΠ΅Ρ€Π²ΠΎΠΉ-ΠΌΠ°ΡˆΠΈΠ½Ρ‹:12345 ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ»ΡŒΠ½Π°Ρ информация 

Of course, the echo 'ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ»ΡŒΠ½Π°Ρ информация' command can be replaced with any other one that returns something useful to stdout . for example, lspci , or a whole set of commands (then they need to be enclosed in curly braces to form a single stream of stdout ):

 $ while :; do { lspci; cat /proc/meminfo; cat /proc/cpuinfo; } | nc -l 12345; done 

and, of course, you can see the contents of the packets received by your machine, for example, using wireshark .

  • Thank you very much! But is it possible to read device id and transfer it? The command: lspci, transmits incomplete information about devices. Besides, how could a client get it? Does he have access rights? Ask if the questions are stupid. - Ivan Zamurenko
  • I read the manual team and found everything you need. Thank you very much again! - Ivan Zamurenko