Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
recieve tcp-packets and save them in file/database

New User

Oct 5, 2010, 2:46 AM

Views: 3204
recieve tcp-packets and save them in file/database


I am new to Perl and is learning, but I need help with a script right now.

It shall listen on a certain tcp-port and accept multiple connections to it.

On connect, the sender will send one or several packages per session, not more than 100 bytes each packet, with information.

Initially, the information shall be saved to a mysql-database, where source IP, timestamp and data is saved in respective fields in a temporary table for later processing.

Also, there should be possible to send a command via tcp from localhost to terminate the script.

Thats all. When I learn more about Perl, I will develope the script to decode the information and save it directly to the target database.

Thank you very much.